fix ScreenGap loading, fixes #218

This commit is contained in:
StapleButter 2017-12-12 02:32:11 +01:00
parent 2333b17029
commit 904316de60

View File

@ -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;