Skip to content

Commit

Permalink
Update sdltiles.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
sonphantrung authored Nov 18, 2024
1 parent d002847 commit a3fd06b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/sdltiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ std::unique_ptr<cataimgui::client> imclient;

#if defined(__IPHONEOS__)
#include <CataclysmExperimental-Swift.h>
#include <SDL_render.h>
#endif

#if defined(EMSCRIPTEN)
Expand Down Expand Up @@ -405,9 +404,13 @@ static void WinCreate()
// TODO: Not too sure why this works to make fullscreen on Android behave. :/
if( window_flags & SDL_WINDOW_FULLSCREEN || window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP
|| window_flags & SDL_WINDOW_MAXIMIZED ) {
SDL_GetRendererOutputSize( ::window.get(), &WindowWidth, &WindowHeight );
DebugLog( D_INFO, DC_ALL ) << "WindowWidth (as I don't know why tf it badly cropped): " << WindowWidth;
DebugLog( D_INFO, DC_ALL ) << "WindowHeight (as I don't know why tf it badly cropped): " << WindowHeight;
SDL_GetWindowSize( ::window.get(), &WindowWidth, &WindowHeight );
#if defined(__IPHONEOS__)
WindowWidth = WindowWidth * 2;
WindowHeight = WindowHeight * 2;
#endif
DebugLog( D_INFO, DC_ALL ) << "WindowWidth: " << WindowWidth;
DebugLog( D_INFO, DC_ALL ) << "WindowHeight: " << WindowHeight;
}
#endif

Expand Down

0 comments on commit a3fd06b

Please sign in to comment.