Skip to content
Permalink
Browse files

Fix missing shortcuts from key bindings.

Correct set WXK_NUMPAD_{ADD,SUBTRACT} for default volume controls and
enable users to change it via menu "Options > Key Shortcuts".

Also allow users to use both these buttons for other input.
  • Loading branch information
denisfa authored and rkitover committed Jun 11, 2019
1 parent 69b581f commit dfa4fec3d5f2a4caa7ac07c965af92410e34d668
Showing with 16 additions and 2 deletions.
  1. +4 −2 src/wx/widgets/keyedit.cpp
  2. +12 −0 src/wx/xrc/MainMenu.xrc
@@ -124,10 +124,12 @@ wxString wxKeyTextCtrl::ToString(int mod, int key)

#endif

if (s.empty() || (key != wxT('-') && s[s.size() - 1] == wxT('-'))
|| (key != wxT('+') && s[s.size() - 1] == wxT('+')))
if (s.empty() || (key != wxT('-') && s[s.size() - 1] == wxT('-') && s != wxT("Num -"))
|| (key != wxT('+') && s[s.size() - 1] == wxT('+') && s != wxT("Num +")))
{
// bad key combo; probably also generates an assertion in wx
return wxEmptyString;
}

// hacky workaround for bug in wx 3.1+ not parsing key display names, or
// parsing modifiers that aren't a combo correctly
@@ -334,6 +334,18 @@
<object class="wxMenuItem" name="SoundConfigure">
<label>_Configure ...</label>
</object>
<object class="wxMenuItem" name="IncreaseVolume">
<label>_Increase volume</label>
<checkable>0</checkable>
</object>
<object class="wxMenuItem" name="DecreaseVolume">
<label>_Decrease volume</label>
<checkable>0</checkable>
</object>
<object class="wxMenuItem" name="ToggleSound">
<label>_Toggle sound</label>
<checkable>0</checkable>
</object>
<object class="separator"/>
<object class="wxMenuItem" name="GBASoundInterpolation">
<label>_GBA sound interpolation</label>

0 comments on commit dfa4fec

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