From fa4b027dbd498e72f32124ebca6fac9724f000cd Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 27 Nov 2017 18:16:40 -0600 Subject: [PATCH] winport: add --windowed-fullscreen --- desmume/src/commandline.cpp | 4 ++++ desmume/src/commandline.h | 1 + desmume/src/frontend/windows/main.cpp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/desmume/src/commandline.cpp b/desmume/src/commandline.cpp index 3303dc097..4cfd01446 100644 --- a/desmume/src/commandline.cpp +++ b/desmume/src/commandline.cpp @@ -76,6 +76,7 @@ CommandLine::CommandLine() , language(1) //english by default , disable_sound(0) , disable_limiter(0) +, windowed_fullscreen(0) , _rtc_day(-1) , _rtc_hour(-1) { @@ -115,6 +116,8 @@ static const char* help_string = \ " Increases the resolution of GPU rendering by this" ENDL " multipler; 1:256x192 (default), 2:512x384," ENDL " 3:768x576, 4:1024x768, 5:1280x960" ENDL +" --windowed-fullscreen" ENDL +" Launches in windowed fullscreen (same as alt+enter)" ENDL #else " --nojoy Disables joystick support" ENDL #endif @@ -241,6 +244,7 @@ bool CommandLine::parse(int argc,char **argv) { "3d-texture-smoothing-enable", no_argument, &_texture_smooth, 1 }, #ifdef HOST_WINDOWS { "gpu-resolution-multiplier", required_argument, NULL, OPT_GPU_RESOLUTION_MULTIPLIER }, + { "windowed-fullscreen", no_argument, &windowed_fullscreen, 1 }, #else { "nojoy", no_argument, &_commandline_linux_nojoy, 1}, #endif diff --git a/desmume/src/commandline.h b/desmume/src/commandline.h index 16542c0c4..23b392b9c 100644 --- a/desmume/src/commandline.h +++ b/desmume/src/commandline.h @@ -63,6 +63,7 @@ public: bool _slot1_fat_dir_type; int disable_sound; int disable_limiter; + int windowed_fullscreen; bool parse(int argc,char **argv); diff --git a/desmume/src/frontend/windows/main.cpp b/desmume/src/frontend/windows/main.cpp index 80af64a05..9df002719 100755 --- a/desmume/src/frontend/windows/main.cpp +++ b/desmume/src/frontend/windows/main.cpp @@ -3477,6 +3477,9 @@ int _main() MainWindow->Show(SW_NORMAL); + if(cmdline.windowed_fullscreen) + ToggleFullscreen(); + //DEBUG TEST HACK //driver->VIEW3D_Init(); //driver->view3d->Launch();