Skip to content

Commit

Permalink
Merge pull request #16130 from hrydgard/show-menu-bar-setting
Browse files Browse the repository at this point in the history
Add hidden ini file setting that you can use to hide the menu bar on Windows
  • Loading branch information
hrydgard committed Sep 29, 2022
2 parents 7a4830e + f8f5256 commit 8afbf51
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions Core/Config.cpp
Expand Up @@ -610,6 +610,7 @@ static ConfigSetting generalSettings[] = {
ConfigSetting("PauseWhenMinimized", &g_Config.bPauseWhenMinimized, false, true, true),
ConfigSetting("DumpDecryptedEboots", &g_Config.bDumpDecryptedEboot, false, true, true),
ConfigSetting("FullscreenOnDoubleclick", &g_Config.bFullscreenOnDoubleclick, true, false, false),
ConfigSetting("ShowMenuBar", &g_Config.bShowMenuBar, true, true, false),

ReportedConfigSetting("MemStickInserted", &g_Config.bMemStickInserted, true, true, true),
ConfigSetting("EnablePlugins", &g_Config.bLoadPlugins, true, true, true),
Expand Down
1 change: 1 addition & 0 deletions Core/Config.h
Expand Up @@ -191,6 +191,7 @@ struct Config {
int iWindowY;
int iWindowWidth; // Windows and other windowed environments
int iWindowHeight;
bool bShowMenuBar; // Windows-only

float fUITint;
float fUISaturation;
Expand Down
7 changes: 2 additions & 5 deletions Windows/MainWindow.cpp
Expand Up @@ -334,9 +334,6 @@ namespace MainWindow
dwStyle &= ~WS_POPUP;
// Re-add caption and border styles.
dwStyle |= WS_OVERLAPPEDWINDOW;

// Put back the menu bar.
::SetMenu(hWnd, menu);
} else {
// If the window was maximized before going fullscreen, make sure to restore first
// in order not to have the taskbar show up on top of PPSSPP.
Expand All @@ -353,8 +350,8 @@ namespace MainWindow

::SetWindowLong(hWnd, GWL_STYLE, dwStyle);

// Remove the menu bar. This can trigger WM_SIZE
::SetMenu(hWnd, goingFullscreen ? NULL : menu);
// Remove the menu bar. This can trigger WM_SIZE because the contents change size.
::SetMenu(hWnd, goingFullscreen || !g_Config.bShowMenuBar ? NULL : menu);

if (g_Config.UseFullScreen() != goingFullscreen) {
g_Config.bFullScreen = goingFullscreen;
Expand Down

0 comments on commit 8afbf51

Please sign in to comment.