Skip to content

Commit

Permalink
Add an option to disable windows menu bar
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaMoo committed Apr 1, 2019
1 parent c0d5b4b commit 3c49485
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ static ConfigSetting systemParamSettings[] = {
ConfigSetting("WlanAdhocChannel", &g_Config.iWlanAdhocChannel, PSP_SYSTEMPARAM_ADHOC_CHANNEL_AUTOMATIC, true, true),
#if defined(USING_WIN_UI)
ConfigSetting("BypassOSKWithKeyboard", &g_Config.bBypassOSKWithKeyboard, false, true, true),
ConfigSetting("DisableWinMenu", &g_Config.bDisableWinMenu, false, true, true),
#endif
ConfigSetting("WlanPowerSave", &g_Config.bWlanPowerSave, (bool) PSP_SYSTEMPARAM_WLAN_POWERSAVE_OFF, true, true),
ReportedConfigSetting("EncryptSave", &g_Config.bEncryptSave, true, true, true),
Expand Down
1 change: 1 addition & 0 deletions Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ struct Config {
// TODO: Make this work with your platform, too!
#if defined(USING_WIN_UI)
bool bBypassOSKWithKeyboard;
bool bDisableWinMenu;
#endif

// Debugger
Expand Down
1 change: 1 addition & 0 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,7 @@ void OtherSettingsScreen::CreateViews() {
list->Add(new CheckBox(&g_Config.bSimpleFrameStats, gr->T("Display simple frame stats(heavy!)")));
list->Add(new CheckBox(&g_Config.bSavestateScreenshotResLimit, gr->T("Limit resolution of savestates screenshots")));
list->Add(new CheckBox(&g_Config.bDiscordPresence, n->T("Send Discord(3rd party software) Presence information")));
list->Add(new CheckBox(&g_Config.bDisableWinMenu, n->T("Disable Windows menu bar")));
}

void OtherSettingsScreen::onFinish(DialogResult result) {
Expand Down
6 changes: 6 additions & 0 deletions Windows/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ namespace MainWindow
if (graphicsContext) {
graphicsContext->Resume();
}

if (g_Config.bDisableWinMenu)
SetMenu(hwndMain, NULL);
}

void Minimize() {
Expand Down Expand Up @@ -503,6 +506,9 @@ namespace MainWindow

WindowsRawInput::Init();

if (g_Config.bDisableWinMenu)
SetMenu(hwndMain, NULL);

SetFocus(hwndMain);

return TRUE;
Expand Down

0 comments on commit 3c49485

Please sign in to comment.