diff --git a/libs/resinfs b/libs/resinfs index 21a3398..108eea7 160000 --- a/libs/resinfs +++ b/libs/resinfs @@ -1 +1 @@ -Subproject commit 21a3398f6df2ba9791bd14075457095eb9b975fc +Subproject commit 108eea78911ab833fd31390aa2a7f956f9f30628 diff --git a/src/DrawUtils.cpp b/src/DrawUtils.cpp index 5137f73..6da678d 100644 --- a/src/DrawUtils.cpp +++ b/src/DrawUtils.cpp @@ -244,6 +244,13 @@ void CST_filledCircleRGBA(CST_Renderer* renderer, uint32_t x, uint32_t y, uint32 #endif } +CST_DisplayMode CST_GetCurrentDisplayMode() +{ + CST_DisplayMode currentMode; + SDL_GetCurrentDisplayMode(0, ¤tMode); + return currentMode; +} + void CST_SetWindowSize(CST_Window* window, int w, int h) { // actually resize the window, and adjust it for high DPI diff --git a/src/DrawUtils.hpp b/src/DrawUtils.hpp index 59a437a..d44b549 100644 --- a/src/DrawUtils.hpp +++ b/src/DrawUtils.hpp @@ -26,6 +26,8 @@ typedef SDL_Surface CST_Surface; typedef SDL_Color CST_Color; typedef SDL_Rect CST_Rect; +typedef SDL_DisplayMode CST_DisplayMode; + class RootDisplay; class InputEvents; @@ -75,6 +77,7 @@ void CST_rectangleRGBA ( Uint8 r, Uint8 g, Uint8 b, Uint8 a ); float CST_GetDpiScale(); +CST_DisplayMode CST_GetCurrentDisplayMode(); void CST_SetWindowSize(CST_Window* renderer, int w, int h); void CST_Delay(int time); diff --git a/src/RootDisplay.cpp b/src/RootDisplay.cpp index 5c6731d..01580f8 100644 --- a/src/RootDisplay.cpp +++ b/src/RootDisplay.cpp @@ -78,6 +78,8 @@ RootDisplay::RootDisplay() setScreenResolution(640, 480); #elif defined(_3DS) || defined(_3DS_MOCK) setScreenResolution(400, 480); // 3ds has a special resolution! +#elif defined(__WIIU__) + setScreenResolution(CST_GetCurrentDisplayMode().w, CST_GetCurrentDisplayMode().h); #else // setScreenResolution(640, 480); setScreenResolution(1280, 720);