Skip to content
Permalink
Browse files

Adjust MMX menu variable and position.

It should only appear on `x86`.
  • Loading branch information
denisfa authored and rkitover committed Sep 6, 2019
1 parent 27b038b commit 51fa150f1c0e2876b66e5b185fb3912f960e0035
Showing with 15 additions and 0 deletions.
  1. +2 −0 src/wx/cmdevents.cpp
  2. +13 −0 src/wx/guiinit.cpp
@@ -2803,8 +2803,10 @@ EVT_HANDLER(ApplyPatches, "Apply IPS/UPS/IPF patches if found")

EVT_HANDLER(MMX, "Enable MMX")
{
#ifdef MMX
GetMenuOptionInt("MMX", disableMMX, 1);
update_opts();
#endif
}

EVT_HANDLER(KeepOnTop, "Keep window on top")
@@ -2833,6 +2833,17 @@ bool MainFrame::BindControls()
continue;
}
#endif
#ifndef MMX

if (cmdtab[i].cmd_id == XRCID("MMX"))
{
if (mi)
mi->GetMenu()->Remove(mi);
cmdtab[i].cmd_id = XRCID("NOOP");
cmdtab[i].mi = NULL;
continue;
}
#endif

if (mi) {
// wxgtk provides no way to retrieve stock label/accel
@@ -2911,6 +2922,7 @@ bool MainFrame::BindControls()
// remove this item from the menu completely
wxMenuItem* gdbmi = XRCITEM("GDBMenu");
gdbmi->GetMenu()->Remove(gdbmi);
gdbmi = NULL;
#endif

// if a recent menu is present, save its location
@@ -2981,6 +2993,7 @@ bool MainFrame::BindControls()
MenuOptionIntMask("JoypadAutoholdR", autohold, KEYM_R);
MenuOptionIntMask("JoypadAutoholdSelect", autohold, KEYM_SELECT);
MenuOptionIntMask("JoypadAutoholdStart", autohold, KEYM_START);
MenuOptionIntMask("MMX", disableMMX, 1);
MenuOptionBool("EmulatorSpeedupToggle", turbo);
MenuOptionIntRadioValue("LinkType0Nothing", gopts.gba_link_type, 0);
MenuOptionIntRadioValue("LinkType1Cable", gopts.gba_link_type, 1);

0 comments on commit 51fa150

Please sign in to comment.
You can’t perform that action at this time.