From 89f14ea58674771e6906764134e5ee5075120adb Mon Sep 17 00:00:00 2001 From: Andrey Filipenkov Date: Sat, 6 Aug 2022 17:51:48 +0300 Subject: [PATCH] improve setting window resolution fix kambala-decapitator/vcmi#3 --- client/CMT.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/CMT.cpp b/client/CMT.cpp index eac7bad39..da184f672 100644 --- a/client/CMT.cpp +++ b/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);