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::UIDown, KBDK_DOWN, KBDM_SHIFT},
|
||||||
{Event::UILeft, KBDK_DOWN},
|
{Event::UILeft, KBDK_DOWN},
|
||||||
{Event::UIRight, KBDK_UP},
|
{Event::UIRight, KBDK_UP},
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif // DEBUGGER_SUPPORT
|
#endif // DEBUGGER_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultJoystickMapping = {
|
PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultJoystickMapping = {
|
||||||
{Event::LeftJoystickUp, KBDK_UP},
|
{Event::LeftJoystickUp, KBDK_UP},
|
||||||
|
|
|
@ -75,6 +75,10 @@ class PhysicalKeyboardHandler
|
||||||
return myKeyMap.get(mode, key, mod);
|
return myKeyMap.get(mode, key, mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool checkEventForKey(EventMode mode, StellaKey key, StellaMod mod) const {
|
||||||
|
return myKeyMap.check(mode, key, mod);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef BSPF_UNIX
|
#ifdef BSPF_UNIX
|
||||||
/** See comments on 'myAltKeyCounter' for more information. */
|
/** See comments on 'myAltKeyCounter' for more information. */
|
||||||
uInt8& altKeyCount() { return myAltKeyCounter; }
|
uInt8& altKeyCount() { return myAltKeyCounter; }
|
||||||
|
|
|
@ -138,7 +138,7 @@ void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not handle emulation events which have the same mapping as menu events
|
// 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);
|
const Event::Type event = instance().eventHandler().eventForKey(EventMode::kEmulationMode, key, mod);
|
||||||
|
@ -227,7 +227,6 @@ void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod, bool repeated)
|
||||||
Dialog::handleKeyDown(key, mod);
|
Dialog::handleKeyDown(key, mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void DebuggerDialog::handleKeyUp(StellaKey key, StellaMod mod)
|
void DebuggerDialog::handleKeyUp(StellaKey key, StellaMod mod)
|
||||||
{
|
{
|
||||||
|
|
|
@ -195,6 +195,9 @@ class EventHandler
|
||||||
Event::Type eventForKey(EventMode mode, StellaKey key, StellaMod mod) const {
|
Event::Type eventForKey(EventMode mode, StellaKey key, StellaMod mod) const {
|
||||||
return myPKeyHandler->eventForKey(mode, key, mod);
|
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 {
|
Event::Type eventForJoyAxis(EventMode mode, int stick, JoyAxis axis, JoyDir adir, int button) const {
|
||||||
return myPJoyHandler->eventForAxis(mode, stick, axis, adir, button);
|
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) &&
|
if(StellaModTest::isControl(mod) &&
|
||||||
!(myPattern && myPattern->isHighlighted()
|
!(myPattern && myPattern->isHighlighted()
|
||||||
&& instance().eventHandler().eventForKey(EventMode::kEditMode, key, mod) != Event::NoType))
|
&& instance().eventHandler().checkEventForKey(EventMode::kEditMode, key, mod)))
|
||||||
{
|
{
|
||||||
handled = true;
|
handled = true;
|
||||||
switch(key)
|
switch(key)
|
||||||
|
|
Loading…
Reference in New Issue