mirror of https://github.com/stella-emu/stella.git
fixed missing events in debugger
This commit is contained in:
parent
bc109182a0
commit
cacee1528e
|
@ -961,11 +961,9 @@ PhysicalKeyboardHandler::FixedPromptMapping = {
|
|||
{Event::UIDown, KBDK_DOWN, KBDM_SHIFT},
|
||||
{Event::UILeft, KBDK_DOWN},
|
||||
{Event::UIRight, KBDK_UP},
|
||||
|
||||
};
|
||||
#endif // DEBUGGER_SUPPORT
|
||||
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultJoystickMapping = {
|
||||
{Event::LeftJoystickUp, KBDK_UP},
|
||||
|
|
|
@ -75,6 +75,10 @@ class PhysicalKeyboardHandler
|
|||
return myKeyMap.get(mode, key, mod);
|
||||
}
|
||||
|
||||
bool checkEventForKey(EventMode mode, StellaKey key, StellaMod mod) const {
|
||||
return myKeyMap.check(mode, key, mod);
|
||||
}
|
||||
|
||||
#ifdef BSPF_UNIX
|
||||
/** See comments on 'myAltKeyCounter' for more information. */
|
||||
uInt8& altKeyCount() { return myAltKeyCounter; }
|
||||
|
|
|
@ -138,9 +138,9 @@ void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
|||
}
|
||||
|
||||
// Do not handle emulation events which have the same mapping as menu events
|
||||
if(instance().eventHandler().eventForKey(EventMode::kMenuMode, key, mod) == Event::NoType)
|
||||
if(!instance().eventHandler().checkEventForKey(EventMode::kMenuMode, key, mod))
|
||||
{
|
||||
// handle emulation keys second (can be remapped)
|
||||
// handle emulation keys second (can be remapped)
|
||||
const Event::Type event = instance().eventHandler().eventForKey(EventMode::kEmulationMode, key, mod);
|
||||
switch(event)
|
||||
{
|
||||
|
@ -227,7 +227,6 @@ void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
|||
Dialog::handleKeyDown(key, mod);
|
||||
}
|
||||
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DebuggerDialog::handleKeyUp(StellaKey key, StellaMod mod)
|
||||
{
|
||||
|
|
|
@ -195,6 +195,9 @@ class EventHandler
|
|||
Event::Type eventForKey(EventMode mode, StellaKey key, StellaMod mod) const {
|
||||
return myPKeyHandler->eventForKey(mode, key, mod);
|
||||
}
|
||||
bool checkEventForKey(EventMode mode, StellaKey key, StellaMod mod) const {
|
||||
return myPKeyHandler->checkEventForKey(mode, key, mod);
|
||||
}
|
||||
Event::Type eventForJoyAxis(EventMode mode, int stick, JoyAxis axis, JoyDir adir, int button) const {
|
||||
return myPJoyHandler->eventForAxis(mode, stick, axis, adir, button);
|
||||
}
|
||||
|
|
|
@ -787,7 +787,7 @@ void LauncherDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
|||
|
||||
if(StellaModTest::isControl(mod) &&
|
||||
!(myPattern && myPattern->isHighlighted()
|
||||
&& instance().eventHandler().eventForKey(EventMode::kEditMode, key, mod) != Event::NoType))
|
||||
&& instance().eventHandler().checkEventForKey(EventMode::kEditMode, key, mod)))
|
||||
{
|
||||
handled = true;
|
||||
switch(key)
|
||||
|
|
Loading…
Reference in New Issue