diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-12-12 02:32:11 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-12-12 02:32:11 +0100 |
commit | 904316de604dcba269f5c0e254f272570d2c049d (patch) | |
tree | 98f3ebb62baf3a77199c35da0e6fc241971aa142 /src/libui_sdl | |
parent | 2333b17029bb4dd4b291586c1dfadb8d92d027a4 (diff) |
fix ScreenGap loading, fixes #218
Diffstat (limited to 'src/libui_sdl')
-rw-r--r-- | src/libui_sdl/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index eb6a108..61742b5 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -1184,16 +1184,20 @@ int main(int argc, char** argv) #define SANITIZE(var, min, max) if ((var < min) || (var > max)) var = 0; SANITIZE(ScreenRotation, 0, 3); - SANITIZE(ScreenGap, 0, 5); SANITIZE(ScreenLayout, 0, 2); SANITIZE(ScreenSizing, 0, 3); #undef SANITIZE uiMenuItemSetChecked(MenuItem_ScreenRot[ScreenRotation], 1); - uiMenuItemSetChecked(MenuItem_ScreenGap[ScreenGap], 1); uiMenuItemSetChecked(MenuItem_ScreenLayout[ScreenLayout], 1); uiMenuItemSetChecked(MenuItem_ScreenSizing[ScreenSizing], 1); + for (int i = 0; i < 6; i++) + { + if (ScreenGap == kScreenGap[i]) + uiMenuItemSetChecked(MenuItem_ScreenGap[i], 1); + } + OnSetScreenRotation(MenuItem_ScreenRot[ScreenRotation], MainWindow, (void*)&kScreenRot[ScreenRotation]); EmuRunning = 2; |