Code cleanup, formatting, etc.

This commit is contained in:
Stephen Anthony 2019-05-28 11:39:49 -02:30
parent c4443715cc
commit d1df80b41d
6 changed files with 4 additions and 27 deletions

View File

@ -289,10 +289,7 @@ void PhysicalJoystickHandler::setStickDefaultMapping(int stick,
// Left joystick up/down directions (assume joystick zero or two and hat 0)
setDefaultHat(stick, 0, JoyHat::UP, Event::JoystickZeroUp);
setDefaultHat(stick, 0, JoyHat::DOWN, Event::JoystickZeroDown);
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
// Left joystick (assume joystick zero or two, buttons two..four)
setDefaultBtn(stick, 2, Event::CmdMenuMode);
setDefaultBtn(stick, 3, Event::OptionsMenuMode);
@ -317,10 +314,7 @@ void PhysicalJoystickHandler::setStickDefaultMapping(int stick,
// Right joystick up/down directions (assume joystick one or three and hat 0)
setDefaultHat(stick, 0, JoyHat::UP, Event::JoystickOneUp);
setDefaultHat(stick, 0, JoyHat::DOWN, Event::JoystickOneDown);
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
// Right joystick (assume joystick one or three, buttons two..four)
setDefaultBtn(stick, 2, Event::CmdMenuMode);
setDefaultBtn(stick, 3, Event::OptionsMenuMode);

View File

@ -147,7 +147,7 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod
setDefaultKey(Event::CmdMenuMode , KBDK_BACKSLASH);
setDefaultKey(Event::TimeMachineMode , KBDK_T);
setDefaultKey(Event::DebuggerMode , KBDK_GRAVE);
setDefaultKey(Event::ExitMode , KBDK_ESCAPE);
setDefaultKey(Event::ExitMode , KBDK_ESCAPE);
#ifdef BSPF_MACOS
setDefaultKey(Event::Quit , KBDK_Q, KBDM_ALT);
#else
@ -208,10 +208,7 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod
setDefaultKey(Event::ToggleCollisions , KBDK_PERIOD, KBDM_SHIFT | KBDM_ALT);
setDefaultKey(Event::ToggleBits , KBDK_PERIOD, KBDM_ALT);
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
setDefaultKey(Event::ConsoleColorToggle , KBDK_F4); // back ("COLOR","B/W")
setDefaultKey(Event::ConsoleLeftDiffToggle , KBDK_F6); // front ("SKILL P1")
setDefaultKey(Event::ConsoleRightDiffToggle , KBDK_F8); // front ("SKILL P2")
@ -247,10 +244,7 @@ void PhysicalKeyboardHandler::setDefaultMapping(Event::Type event, EventMode mod
setDefaultKey(Event::Quit , KBDK_Q, KBDM_CTRL);
#endif
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
setDefaultKey(Event::UIUp , KBDK_F9); // front ("SAVE")
setDefaultKey(Event::UIDown , KBDK_F2); // front ("RESET")
setDefaultKey(Event::UINavPrev , KBDK_F11); // front ("LOAD")

View File

@ -449,16 +449,14 @@ void Dialog::handleKeyDown(StellaKey key, StellaMod mod)
// Shift-Tab sets previous widget in current tab
Event::Type e = Event::NoType;
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
// FIXME - I don't think this will compile!
#if defined(RETRON77)
// special keys used for R77
else if (key == KBDK_F13)
e = Event::UITabPrev;
else if (key == KBDK_BACKSPACE)
e = Event::UITabNext;
#endif
#endif
// Check the keytable now, since we might get one of the above events,
// which must always be processed before any widget sees it.

View File

@ -413,10 +413,7 @@ void InputDialog::setDefaults()
myDPaddleLabel->setLabel("10");
myMPaddleSpeed->setValue(10);
myMPaddleLabel->setLabel("10");
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
myDejitterBase->setValue(2);
myDejitterDiff->setValue(6);
#else

View File

@ -523,11 +523,8 @@ int StellaSettingsDialog::valueToLevel(int value)
void StellaSettingsDialog::openHelp()
{
// Create an help dialog, similar to the in-game one
// FIXME - use the R77 define in the final release
// use the '1' define for testing
if (myHelpDialog == nullptr)
#if defined(RETRON77)
// #if 1
myHelpDialog = make_unique<R77HelpDialog>(instance(), parent(), _font);
#else
myHelpDialog = make_unique<HelpDialog>(instance(), parent(), _font);

View File

@ -94,10 +94,7 @@ class StellaSettingsDialog : public Dialog
StaticTextWidget* myRightPortDetected;
unique_ptr<GUI::MessageBox> myConfirmMsg;
// FIXME - use the R77 define in the final release
// use the '1' define for testing
#if defined(RETRON77)
// #if 1
unique_ptr<R77HelpDialog> myHelpDialog;
#else
unique_ptr<HelpDialog> myHelpDialog;