Make --windowed available on all platform and make sure to trigger resize

This commit is contained in:
iota97 2020-10-10 15:22:59 +02:00
parent dfb5cd37d9
commit cd42f8b3a6
2 changed files with 7 additions and 4 deletions

View file

@ -595,8 +595,14 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
#endif
if (!strncmp(argv[i], "--pause-menu-exit", strlen("--pause-menu-exit")))
g_Config.bPauseMenuExitsEmulator = true;
if (!strcmp(argv[i], "--fullscreen"))
if (!strcmp(argv[i], "--fullscreen")) {
g_Config.bFullScreen = true;
System_SendMessage("toggle_fullscreen", "1");
}
if (!strcmp(argv[i], "--windowed")) {
g_Config.bFullScreen = false;
System_SendMessage("toggle_fullscreen", "0");
}
if (!strcmp(argv[i], "--touchscreentest"))
gotoTouchScreenTest = true;
if (!strcmp(argv[i], "--gamesettings"))

View file

@ -564,9 +564,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
break;
}
if (wideArgs[i] == L"--windowed")
g_Config.bFullScreen = false;
if (wideArgs[i].find(gpuBackend) != std::wstring::npos && wideArgs[i].size() > gpuBackend.size()) {
const std::wstring restOfOption = wideArgs[i].substr(gpuBackend.size());