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.
This commit is contained in:
Edênis Freindorfer Azevedo 2019-06-11 19:52:00 -03:00 committed by Rafael Kitover
parent 69b581f7e5
commit dfa4fec3d5
2 changed files with 16 additions and 2 deletions

View File

@ -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

View File

@ -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>