From 6617a9dccdf693c25b8f2cd19214fd988bad6ffe Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 2 Jan 2019 20:55:37 -0800 Subject: [PATCH] Switch: Adapt to egl changes --- src/platform/switch/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/platform/switch/main.c b/src/platform/switch/main.c index c8d2fbd3d..a6e8d9941 100644 --- a/src/platform/switch/main.c +++ b/src/platform/switch/main.c @@ -120,7 +120,7 @@ static bool initEgl() { goto _fail1; } - s_surface = eglCreateWindowSurface(s_display, config, "", NULL); + s_surface = eglCreateWindowSurface(s_display, config, nwindowGetDefault(), NULL); if (!s_surface) { goto _fail1; } @@ -403,6 +403,7 @@ static void _setFrameLimiter(struct mGUIRunner* runner, bool limit) { } } frameLimiter = limit; + eglSwapInterval(s_surface, limit); } static bool _running(struct mGUIRunner* runner) { @@ -663,11 +664,12 @@ int main(int argc, char* argv[]) { .submenu = 0, .state = 7, .validStates = (const char*[]) { - "3", "4", "5", "6", "7", "8", "9", + "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "20", "30" }, .stateMappings = (const struct GUIVariant[]) { + GUI_V_U(2), GUI_V_U(3), GUI_V_U(4), GUI_V_U(5), @@ -684,7 +686,7 @@ int main(int argc, char* argv[]) { GUI_V_U(20), GUI_V_U(30), }, - .nStates = 15 + .nStates = 16 }, }, .nConfigExtra = 2,