瀏覽代碼

improve setting window resolution

fix kambala-decapitator/vcmi#3
Andrey Filipenkov 3 年之前
父節點
當前提交
89f14ea586
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      client/CMT.cpp

+ 3 - 1
client/CMT.cpp

@@ -1036,7 +1036,9 @@ static bool recreateWindow(int w, int h, int bpp, bool fullscreen, int displayIn
 		if (displayIndex < 0)
 			displayIndex = 0;
 	}
-#ifndef VCMI_IOS
+#ifdef VCMI_IOS
+	SDL_GetWindowSize(mainWindow, &w, &h);
+#else
 	if(!checkVideoMode(displayIndex, w, h))
 	{
 		logGlobal->error("Error: SDL says that %dx%d resolution is not available!", w, h);