From 32bb4d7db5c37f3776cf70f2105401f9504c8be3 Mon Sep 17 00:00:00 2001 From: The Dax Date: Wed, 10 Jul 2013 14:22:22 -0400 Subject: [PATCH] Windows UI: Add INI option to allow emulator to start in fullscreen mode on launch. --- Core/Config.cpp | 2 ++ Core/Config.h | 3 +++ Windows/WndMainWindow.cpp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/Core/Config.cpp b/Core/Config.cpp index d427acc6ac..b8bb540ff1 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -113,6 +113,7 @@ void Config::Load(const char *iniFileName) graphics->Get("VertexCache", &bVertexCache, true); #ifdef _WIN32 graphics->Get("FullScreen", &bFullScreen, false); + graphics->Get("FullScreenOnLaunch", &bFullScreenOnLaunch, false); #endif #ifdef BLACKBERRY graphics->Get("PartialStretch", &bPartialStretch, pixel_xres == pixel_yres); @@ -233,6 +234,7 @@ void Config::Save() graphics->Set("VertexCache", bVertexCache); #ifdef _WIN32 graphics->Set("FullScreen", bFullScreen); + graphics->Set("FullScreenOnLaunch", &bFullScreenOnLaunch); #endif #ifdef BLACKBERRY graphics->Set("PartialStretch", bPartialStretch); diff --git a/Core/Config.h b/Core/Config.h index 5dc49ee3d4..54f6ab7c2b 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -80,6 +80,9 @@ public: bool SSAntiAliasing; // for Windows, too bool bVertexCache; bool bFullScreen; +#ifdef _WIN32 + bool bFullScreenOnLaunch; +#endif int iAnisotropyLevel; bool bTrueColor; bool bFramebuffersToMem; diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 9ac7619339..fc33a25a87 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -272,6 +272,9 @@ namespace MainWindow Update(); SetPlaying(0); + + if(g_Config.bFullScreenOnLaunch) + _ViewFullScreen(hwndMain); ShowWindow(hwndMain, nCmdShow);