mirror of https://github.com/stella-emu/stella.git
key for entering Options dialog can now be remapped as documented
This commit is contained in:
parent
c86aa6957b
commit
d3662ee9c8
|
@ -214,7 +214,8 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod
|
||||||
void PhysicalKeyboardHandler::eraseMapping(Event::Type event, EventMode mode)
|
void PhysicalKeyboardHandler::eraseMapping(Event::Type event, EventMode mode)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < KBDK_LAST; ++i)
|
for(int i = 0; i < KBDK_LAST; ++i)
|
||||||
if(myKeyTable[i][mode] == event && i != KBDK_TAB)
|
// This key cannot be remapped
|
||||||
|
if(myKeyTable[i][mode] == event && !(i == KBDK_TAB && mode == EventMode::kMenuMode))
|
||||||
myKeyTable[i][mode] = Event::NoType;
|
myKeyTable[i][mode] = Event::NoType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,7 +256,7 @@ bool PhysicalKeyboardHandler::addMapping(Event::Type event, EventMode mode,
|
||||||
StellaKey key)
|
StellaKey key)
|
||||||
{
|
{
|
||||||
// These keys cannot be remapped
|
// These keys cannot be remapped
|
||||||
if(key == KBDK_TAB || Event::isAnalog(event))
|
if(key == KBDK_TAB && mode == EventMode::kMenuMode || Event::isAnalog(event))
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
myKeyTable[key][mode] = event;
|
myKeyTable[key][mode] = event;
|
||||||
|
|
|
@ -769,8 +769,6 @@ void EventHandler::setActionMappings(EventMode mode)
|
||||||
prepend = "Alt + ']' (*)";
|
prepend = "Alt + ']' (*)";
|
||||||
else if(event == Event::SoundToggle)
|
else if(event == Event::SoundToggle)
|
||||||
prepend = modifier + " + ']' (*)";
|
prepend = modifier + " + ']' (*)";
|
||||||
else if(event == Event::OptionsMenuMode)
|
|
||||||
prepend = "Tab (*)";
|
|
||||||
else if(event == Event::UINavNext)
|
else if(event == Event::UINavNext)
|
||||||
prepend = "Tab (*)";
|
prepend = "Tab (*)";
|
||||||
else if(event == Event::UINavPrev)
|
else if(event == Event::UINavPrev)
|
||||||
|
|
Loading…
Reference in New Issue