From: <sag...@us...> - 2014-04-22 15:55:32
|
Revision: 4015 http://sourceforge.net/p/modplug/code/4015 Author: saga-games Date: 2014-04-22 15:55:21 +0000 (Tue, 22 Apr 2014) Log Message: ----------- [Imp] Don't require shift key to be pressed when entering numeric effect letters on French keyboards (https://forum.openmpt.org/index.php?topic=5279.0) [Fix] Mixer setup: Changing the filter window didn't mark the dialog as modified. Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/Mpdlgs.cpp Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2014-04-17 01:37:05 UTC (rev 4014) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2014-04-22 15:55:21 UTC (rev 4015) @@ -1642,7 +1642,6 @@ { std::istringstream iStrm(std::string(pData, nSize)); LoadFile(iStrm, std::wstring(), pTempCS); - FreeResource(hglob); } } else { @@ -1855,7 +1854,7 @@ bool CCommandSet::QuickChange_SetEffects(const CModSpecifications &modSpecs) //-------------------------------------------------------------------------- { - int choices=0; + int choices = 0; KeyCombination kc(kCtxViewPatternsFX, 0, 0, kKeyEventDown); for(CommandID cmd = kcFixedFXStart; cmd <= kcFixedFXend; cmd = static_cast<CommandID>(cmd + 1)) @@ -1887,13 +1886,16 @@ if(codeNmod != -1) { kc.KeyCode(LOBYTE(codeNmod)); - kc.Modifier(HIBYTE(codeNmod) & 0x07); //We're only interest in the bottom 3 bits. + kc.Modifier(0); + // Don't add modifier keys, since on French keyboards, numbers are input using Shift. + // We don't really want that behaviour here, and I'm sure we don't want that in other cases on other layouts as well. + //kc.Modifier(HIBYTE(codeNmod) & 0x07); //We're only interest in the bottom 3 bits. Add(kc, cmd, true); } - if (kc.KeyCode() >= '0' && kc.KeyCode() <= '9') //for numbers, ensure numpad works too + if (effect >= '0' && effect <= '9') //for numbers, ensure numpad works too { - kc.KeyCode(VK_NUMPAD0 + (kc.KeyCode() - '0')); + kc.KeyCode(VK_NUMPAD0 + (effect - '0')); Add(kc, cmd, true); } } Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-04-17 01:37:05 UTC (rev 4014) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-04-22 15:55:21 UTC (rev 4015) @@ -728,15 +728,13 @@ BEGIN_MESSAGE_MAP(COptionsMixer, CPropertyPage) ON_WM_HSCROLL() ON_WM_VSCROLL() - ON_CBN_SELCHANGE(IDC_COMBO_FILTER, OnResamplerChanged) - ON_EN_UPDATE(IDC_WFIRCUTOFF, OnSettingsChanged) - ON_EN_UPDATE(IDC_COMBO_FILTERWINDOW, OnSettingsChanged) - ON_EN_UPDATE(IDC_RAMPING_IN, OnRampingChanged) - ON_EN_UPDATE(IDC_RAMPING_OUT, OnRampingChanged) - ON_CBN_SELCHANGE(IDC_COMBO_POLYPHONY, OnSettingsChanged) - // slider stereo sep - ON_COMMAND(IDC_CHECK_SOFTPAN, OnSettingsChanged) - // slider preamp + ON_CBN_SELCHANGE(IDC_COMBO_FILTER, OnResamplerChanged) + ON_CBN_SELCHANGE(IDC_COMBO_FILTERWINDOW, OnSettingsChanged) + ON_CBN_SELCHANGE(IDC_COMBO_POLYPHONY, OnSettingsChanged) + ON_EN_UPDATE(IDC_WFIRCUTOFF, OnSettingsChanged) + ON_EN_UPDATE(IDC_RAMPING_IN, OnRampingChanged) + ON_EN_UPDATE(IDC_RAMPING_OUT, OnRampingChanged) + ON_COMMAND(IDC_CHECK_SOFTPAN, OnSettingsChanged) END_MESSAGE_MAP() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |