mirror of https://github.com/stella-emu/stella.git
reordered and grouped event handling
This commit is contained in:
parent
8c2c9ebb60
commit
29fee4c580
|
@ -448,10 +448,6 @@ AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting)
|
||||||
std::bind(&Console::changePhosphor, &myOSystem.console(), _1),
|
std::bind(&Console::changePhosphor, &myOSystem.console(), _1),
|
||||||
std::bind(&TIASurface::setScanlineIntensity, &myOSystem.frameBuffer().tiaSurface(), _1),
|
std::bind(&TIASurface::setScanlineIntensity, &myOSystem.frameBuffer().tiaSurface(), _1),
|
||||||
std::bind(&Console::toggleInter, &myOSystem.console(), _1),
|
std::bind(&Console::toggleInter, &myOSystem.console(), _1),
|
||||||
// Following functions are not used when cycling settings but for "direct only" hotkeys
|
|
||||||
std::bind(&StateManager::changeState, &myOSystem.state(), _1),
|
|
||||||
std::bind(&PaletteHandler::changeCurrentAdjustable, &myOSystem.frameBuffer().tiaSurface().paletteHandler(), _1),
|
|
||||||
std::bind(&TIASurface::changeCurrentNTSCAdjustable, &myOSystem.frameBuffer().tiaSurface(), _1),
|
|
||||||
// Debug settings
|
// Debug settings
|
||||||
std::bind(&FrameBuffer::toggleFrameStats, &myOSystem.frameBuffer(), _1),
|
std::bind(&FrameBuffer::toggleFrameStats, &myOSystem.frameBuffer(), _1),
|
||||||
std::bind(&Console::toggleP0Bit, &myOSystem.console(), _1),
|
std::bind(&Console::toggleP0Bit, &myOSystem.console(), _1),
|
||||||
|
@ -471,6 +467,10 @@ AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting)
|
||||||
std::bind(&Console::toggleFixedColors, &myOSystem.console(), _1),
|
std::bind(&Console::toggleFixedColors, &myOSystem.console(), _1),
|
||||||
std::bind(&Console::toggleColorLoss, &myOSystem.console(), _1),
|
std::bind(&Console::toggleColorLoss, &myOSystem.console(), _1),
|
||||||
std::bind(&Console::toggleJitter, &myOSystem.console(), _1),
|
std::bind(&Console::toggleJitter, &myOSystem.console(), _1),
|
||||||
|
// Following functions are not used when cycling settings but for "direct only" hotkeys
|
||||||
|
std::bind(&StateManager::changeState, &myOSystem.state(), _1),
|
||||||
|
std::bind(&PaletteHandler::changeCurrentAdjustable, &myOSystem.frameBuffer().tiaSurface().paletteHandler(), _1),
|
||||||
|
std::bind(&TIASurface::changeCurrentNTSCAdjustable, &myOSystem.frameBuffer().tiaSurface(), _1),
|
||||||
};
|
};
|
||||||
|
|
||||||
return ADJUST_FUNCTIONS[int(setting)];
|
return ADJUST_FUNCTIONS[int(setting)];
|
||||||
|
@ -616,20 +616,9 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
if(!myAllowAllDirectionsFlag && pressed)
|
if(!myAllowAllDirectionsFlag && pressed)
|
||||||
myEvent.set(Event::JoystickOneLeft, 0);
|
myEvent.set(Event::JoystickOneLeft, 0);
|
||||||
break;
|
break;
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
case Event::Fry:
|
|
||||||
if(!repeated) myFryingFlag = pressed;
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::ReloadConsole:
|
|
||||||
if(pressed && !repeated) myOSystem.reloadConsole(true);
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::PreviousMultiCartRom:
|
|
||||||
if(pressed && !repeated) myOSystem.reloadConsole(false);
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// Audio & Video events (with global hotkeys)
|
||||||
case Event::VolumeDecrease:
|
case Event::VolumeDecrease:
|
||||||
if(pressed)
|
if(pressed)
|
||||||
{
|
{
|
||||||
|
@ -675,6 +664,62 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case Event::ToggleFullScreen:
|
||||||
|
if (pressed && !repeated)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().toggleFullscreen();
|
||||||
|
myAdjustSetting = AdjustSetting::FULLSCREEN;
|
||||||
|
myAdjustActive = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifdef ADAPTABLE_REFRESH_SUPPORT
|
||||||
|
case Event::ToggleAdaptRefresh:
|
||||||
|
if (pressed && !repeated)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().toggleAdaptRefresh();
|
||||||
|
myAdjustSetting = AdjustSetting::ADAPT_REFRESH;
|
||||||
|
myAdjustActive = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case Event::OverscanDecrease:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().changeOverscan(-1);
|
||||||
|
myAdjustSetting = AdjustSetting::OVERSCAN;
|
||||||
|
myAdjustActive = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::OverscanIncrease:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().changeOverscan(+1);
|
||||||
|
myAdjustSetting = AdjustSetting::OVERSCAN;
|
||||||
|
myAdjustActive = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::FormatDecrease:
|
||||||
|
if (pressed && !repeated)
|
||||||
|
{
|
||||||
|
myOSystem.console().selectFormat(-1);
|
||||||
|
myAdjustSetting = AdjustSetting::TVFORMAT;
|
||||||
|
myAdjustActive = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::FormatIncrease:
|
||||||
|
if (pressed && !repeated)
|
||||||
|
{
|
||||||
|
myOSystem.console().selectFormat(+1);
|
||||||
|
myAdjustSetting = AdjustSetting::TVFORMAT;
|
||||||
|
myAdjustActive = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
case Event::VCenterDecrease:
|
case Event::VCenterDecrease:
|
||||||
if(pressed)
|
if(pressed)
|
||||||
{
|
{
|
||||||
|
@ -711,72 +756,20 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::PreviousPaletteAttribute:
|
case Event::PaletteDecrease:
|
||||||
if(pressed)
|
if (pressed && !repeated)
|
||||||
{
|
{
|
||||||
myOSystem.frameBuffer().tiaSurface().paletteHandler().cycleAdjustable(-1);
|
myOSystem.frameBuffer().tiaSurface().paletteHandler().cyclePalette(-1);
|
||||||
myAdjustDirect = AdjustSetting::PALETTE_CHANGE_ATTRIBUTE;
|
myAdjustSetting = AdjustSetting::PALETTE;
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::NextPaletteAttribute:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().paletteHandler().cycleAdjustable(+1);
|
|
||||||
myAdjustDirect = AdjustSetting::PALETTE_CHANGE_ATTRIBUTE;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::PaletteAttributeDecrease:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().paletteHandler().changeCurrentAdjustable(-1);
|
|
||||||
myAdjustDirect = AdjustSetting::PALETTE_CHANGE_ATTRIBUTE;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::PaletteAttributeIncrease:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().paletteHandler().changeCurrentAdjustable(+1);
|
|
||||||
myAdjustDirect = AdjustSetting::PALETTE_CHANGE_ATTRIBUTE;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::ToggleFullScreen:
|
|
||||||
if(pressed && !repeated)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().toggleFullscreen();
|
|
||||||
myAdjustSetting = AdjustSetting::FULLSCREEN;
|
|
||||||
myAdjustActive = true;
|
myAdjustActive = true;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef ADAPTABLE_REFRESH_SUPPORT
|
case Event::PaletteIncrease:
|
||||||
case Event::ToggleAdaptRefresh:
|
if (pressed && !repeated)
|
||||||
if(pressed && !repeated)
|
|
||||||
{
|
{
|
||||||
myOSystem.frameBuffer().toggleAdaptRefresh();
|
myOSystem.frameBuffer().tiaSurface().paletteHandler().cyclePalette(+1);
|
||||||
myAdjustSetting = AdjustSetting::ADAPT_REFRESH;
|
myAdjustSetting = AdjustSetting::PALETTE;
|
||||||
myAdjustActive = true;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case Event::OverscanDecrease:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().changeOverscan(-1);
|
|
||||||
myAdjustSetting = AdjustSetting::OVERSCAN;
|
|
||||||
myAdjustActive = true;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::OverscanIncrease:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().changeOverscan(+1);
|
|
||||||
myAdjustSetting = AdjustSetting::OVERSCAN;
|
|
||||||
myAdjustActive = true;
|
myAdjustActive = true;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -852,58 +845,6 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
myAdjustActive = true;
|
myAdjustActive = true;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::PreviousAttribute:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().setNTSCAdjustable(-1);
|
|
||||||
myAdjustDirect = AdjustSetting::NTSC_CHANGE_ATTRIBUTE;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::NextAttribute:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().setNTSCAdjustable(+1);
|
|
||||||
myAdjustDirect = AdjustSetting::NTSC_CHANGE_ATTRIBUTE;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::DecreaseAttribute:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().changeCurrentNTSCAdjustable(-1);
|
|
||||||
myAdjustDirect = AdjustSetting::NTSC_CHANGE_ATTRIBUTE;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::IncreaseAttribute:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().changeCurrentNTSCAdjustable(+1);
|
|
||||||
myAdjustDirect = AdjustSetting::NTSC_CHANGE_ATTRIBUTE;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::ScanlinesDecrease:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().setScanlineIntensity(-1);
|
|
||||||
myAdjustSetting = AdjustSetting::SCANLINES;
|
|
||||||
myAdjustActive = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::ScanlinesIncrease:
|
|
||||||
if(pressed)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().setScanlineIntensity(+1);
|
|
||||||
myAdjustSetting = AdjustSetting::SCANLINES;
|
|
||||||
myAdjustActive = true;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::PhosphorDecrease:
|
case Event::PhosphorDecrease:
|
||||||
if(pressed)
|
if(pressed)
|
||||||
{
|
{
|
||||||
|
@ -931,29 +872,20 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::ToggleColorLoss:
|
case Event::ScanlinesDecrease:
|
||||||
if (pressed && !repeated)
|
if (pressed)
|
||||||
{
|
{
|
||||||
myOSystem.console().toggleColorLoss();
|
myOSystem.frameBuffer().tiaSurface().setScanlineIntensity(-1);
|
||||||
myAdjustSetting = AdjustSetting::COLOR_LOSS;
|
myAdjustSetting = AdjustSetting::SCANLINES;
|
||||||
myAdjustActive = true;
|
myAdjustActive = true;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::PaletteDecrease:
|
case Event::ScanlinesIncrease:
|
||||||
if(pressed && !repeated)
|
if (pressed)
|
||||||
{
|
{
|
||||||
myOSystem.frameBuffer().tiaSurface().paletteHandler().cyclePalette(-1);
|
myOSystem.frameBuffer().tiaSurface().setScanlineIntensity(+1);
|
||||||
myAdjustSetting = AdjustSetting::PALETTE;
|
myAdjustSetting = AdjustSetting::SCANLINES;
|
||||||
myAdjustActive = true;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::PaletteIncrease:
|
|
||||||
if(pressed && !repeated)
|
|
||||||
{
|
|
||||||
myOSystem.frameBuffer().tiaSurface().paletteHandler().cyclePalette(+1);
|
|
||||||
myAdjustSetting = AdjustSetting::PALETTE;
|
|
||||||
myAdjustActive = true;
|
myAdjustActive = true;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -967,19 +899,75 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::ToggleTurbo:
|
///////////////////////////////////////////////////////////////////////////
|
||||||
if (pressed && !repeated) myOSystem.console().toggleTurbo();
|
// Direct key Audio & Video events
|
||||||
return;
|
case Event::PreviousPaletteAttribute:
|
||||||
|
if (pressed)
|
||||||
case Event::ToggleJitter:
|
|
||||||
if (pressed && !repeated)
|
|
||||||
{
|
{
|
||||||
myOSystem.console().toggleJitter();
|
myOSystem.frameBuffer().tiaSurface().paletteHandler().cycleAdjustable(-1);
|
||||||
myAdjustSetting = AdjustSetting::JITTER;
|
myAdjustDirect = AdjustSetting::PALETTE_CHANGE_ATTRIBUTE;
|
||||||
myAdjustActive = true;
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case Event::NextPaletteAttribute:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().tiaSurface().paletteHandler().cycleAdjustable(+1);
|
||||||
|
myAdjustDirect = AdjustSetting::PALETTE_CHANGE_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::PaletteAttributeDecrease:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().tiaSurface().paletteHandler().changeCurrentAdjustable(-1);
|
||||||
|
myAdjustDirect = AdjustSetting::PALETTE_CHANGE_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::PaletteAttributeIncrease:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().tiaSurface().paletteHandler().changeCurrentAdjustable(+1);
|
||||||
|
myAdjustDirect = AdjustSetting::PALETTE_CHANGE_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::PreviousAttribute:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().tiaSurface().setNTSCAdjustable(-1);
|
||||||
|
myAdjustDirect = AdjustSetting::NTSC_CHANGE_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::NextAttribute:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().tiaSurface().setNTSCAdjustable(+1);
|
||||||
|
myAdjustDirect = AdjustSetting::NTSC_CHANGE_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::DecreaseAttribute:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().tiaSurface().changeCurrentNTSCAdjustable(-1);
|
||||||
|
myAdjustDirect = AdjustSetting::NTSC_CHANGE_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::IncreaseAttribute:
|
||||||
|
if (pressed)
|
||||||
|
{
|
||||||
|
myOSystem.frameBuffer().tiaSurface().changeCurrentNTSCAdjustable(+1);
|
||||||
|
myAdjustDirect = AdjustSetting::NTSC_CHANGE_ATTRIBUTE;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// Debug events (with global hotkeys)
|
||||||
|
|
||||||
case Event::ToggleFrameStats:
|
case Event::ToggleFrameStats:
|
||||||
if (pressed && !repeated)
|
if (pressed && !repeated)
|
||||||
{
|
{
|
||||||
|
@ -989,51 +977,6 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::ToggleTimeMachine:
|
|
||||||
if (pressed && !repeated) myOSystem.state().toggleTimeMachine();
|
|
||||||
return;
|
|
||||||
|
|
||||||
#ifdef PNG_SUPPORT
|
|
||||||
case Event::ToggleContSnapshots:
|
|
||||||
if (pressed && !repeated) myOSystem.png().toggleContinuousSnapshots(false);
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::ToggleContSnapshotsFrame:
|
|
||||||
if (pressed && !repeated) myOSystem.png().toggleContinuousSnapshots(true);
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case Event::HandleMouseControl:
|
|
||||||
if (pressed && !repeated) handleMouseControl();
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::ToggleSAPortOrder:
|
|
||||||
if (pressed && !repeated) toggleSAPortOrder();
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::FormatDecrease:
|
|
||||||
if(pressed && !repeated)
|
|
||||||
{
|
|
||||||
myOSystem.console().selectFormat(-1);
|
|
||||||
myAdjustSetting = AdjustSetting::TVFORMAT;
|
|
||||||
myAdjustActive = true;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::FormatIncrease:
|
|
||||||
if(pressed && !repeated)
|
|
||||||
{
|
|
||||||
myOSystem.console().selectFormat(+1);
|
|
||||||
myAdjustSetting = AdjustSetting::TVFORMAT;
|
|
||||||
myAdjustActive = true;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::ToggleGrabMouse:
|
|
||||||
if (pressed && !repeated && !myOSystem.frameBuffer().fullScreen())
|
|
||||||
myOSystem.frameBuffer().toggleGrabMouse();
|
|
||||||
return;
|
|
||||||
|
|
||||||
case Event::ToggleP0Collision:
|
case Event::ToggleP0Collision:
|
||||||
if (pressed && !repeated)
|
if (pressed && !repeated)
|
||||||
{
|
{
|
||||||
|
@ -1169,8 +1112,29 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case Event::ToggleColorLoss:
|
||||||
|
if (pressed && !repeated)
|
||||||
|
{
|
||||||
|
myOSystem.console().toggleColorLoss();
|
||||||
|
myAdjustSetting = AdjustSetting::COLOR_LOSS;
|
||||||
|
myAdjustActive = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::ToggleJitter:
|
||||||
|
if (pressed && !repeated)
|
||||||
|
{
|
||||||
|
myOSystem.console().toggleJitter();
|
||||||
|
myAdjustSetting = AdjustSetting::JITTER;
|
||||||
|
myAdjustActive = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// State events
|
||||||
|
|
||||||
case Event::SaveState:
|
case Event::SaveState:
|
||||||
if(pressed && !repeated)
|
if (pressed && !repeated)
|
||||||
{
|
{
|
||||||
myOSystem.state().saveState();
|
myOSystem.state().saveState();
|
||||||
myAdjustDirect = AdjustSetting::STATE;
|
myAdjustDirect = AdjustSetting::STATE;
|
||||||
|
@ -1183,7 +1147,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::PreviousState:
|
case Event::PreviousState:
|
||||||
if(pressed)
|
if (pressed)
|
||||||
{
|
{
|
||||||
myOSystem.state().changeState(-1);
|
myOSystem.state().changeState(-1);
|
||||||
myAdjustDirect = AdjustSetting::STATE;
|
myAdjustDirect = AdjustSetting::STATE;
|
||||||
|
@ -1191,7 +1155,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::NextState:
|
case Event::NextState:
|
||||||
if(pressed)
|
if (pressed)
|
||||||
{
|
{
|
||||||
myOSystem.state().changeState(+1);
|
myOSystem.state().changeState(+1);
|
||||||
myAdjustDirect = AdjustSetting::STATE;
|
myAdjustDirect = AdjustSetting::STATE;
|
||||||
|
@ -1203,7 +1167,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Event::LoadState:
|
case Event::LoadState:
|
||||||
if(pressed && !repeated)
|
if (pressed && !repeated)
|
||||||
{
|
{
|
||||||
myOSystem.state().loadState();
|
myOSystem.state().loadState();
|
||||||
myAdjustDirect = AdjustSetting::STATE;
|
myAdjustDirect = AdjustSetting::STATE;
|
||||||
|
@ -1251,6 +1215,52 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
if (pressed) enterTimeMachineMenuMode(1000, true);
|
if (pressed) enterTimeMachineMenuMode(1000, true);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// Misc events
|
||||||
|
|
||||||
|
case Event::ToggleTurbo:
|
||||||
|
if (pressed && !repeated) myOSystem.console().toggleTurbo();
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::Fry:
|
||||||
|
if (!repeated) myFryingFlag = pressed;
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::ReloadConsole:
|
||||||
|
if (pressed && !repeated) myOSystem.reloadConsole(true);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::PreviousMultiCartRom:
|
||||||
|
if (pressed && !repeated) myOSystem.reloadConsole(false);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::ToggleTimeMachine:
|
||||||
|
if (pressed && !repeated) myOSystem.state().toggleTimeMachine();
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifdef PNG_SUPPORT
|
||||||
|
case Event::ToggleContSnapshots:
|
||||||
|
if (pressed && !repeated) myOSystem.png().toggleContinuousSnapshots(false);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::ToggleContSnapshotsFrame:
|
||||||
|
if (pressed && !repeated) myOSystem.png().toggleContinuousSnapshots(true);
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case Event::HandleMouseControl:
|
||||||
|
if (pressed && !repeated) handleMouseControl();
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::ToggleSAPortOrder:
|
||||||
|
if (pressed && !repeated) toggleSAPortOrder();
|
||||||
|
return;
|
||||||
|
|
||||||
|
case Event::ToggleGrabMouse:
|
||||||
|
if (pressed && !repeated && !myOSystem.frameBuffer().fullScreen())
|
||||||
|
myOSystem.frameBuffer().toggleGrabMouse();
|
||||||
|
return;
|
||||||
|
|
||||||
case Event::TakeSnapshot:
|
case Event::TakeSnapshot:
|
||||||
if(pressed && !repeated) myOSystem.frameBuffer().tiaSurface().saveSnapShot();
|
if(pressed && !repeated) myOSystem.frameBuffer().tiaSurface().saveSnapShot();
|
||||||
return;
|
return;
|
||||||
|
@ -1363,7 +1373,6 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
if(myComboTable[combo][i] != Event::NoType)
|
if(myComboTable[combo][i] != Event::NoType)
|
||||||
handleEvent(myComboTable[combo][i], pressed, repeated);
|
handleEvent(myComboTable[combo][i], pressed, repeated);
|
||||||
return;
|
return;
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// Events which relate to switches()
|
// Events which relate to switches()
|
||||||
|
@ -1488,6 +1497,7 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||||
myOSystem.console().switches().update();
|
myOSystem.console().switches().update();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
case Event::NoType: // Ignore unmapped events
|
case Event::NoType: // Ignore unmapped events
|
||||||
|
|
|
@ -395,6 +395,7 @@ class EventHandler
|
||||||
enum class AdjustSetting
|
enum class AdjustSetting
|
||||||
{
|
{
|
||||||
NONE = -1,
|
NONE = -1,
|
||||||
|
// *** Audio & Video group ***
|
||||||
VOLUME,
|
VOLUME,
|
||||||
ZOOM,
|
ZOOM,
|
||||||
FULLSCREEN,
|
FULLSCREEN,
|
||||||
|
@ -424,11 +425,7 @@ class EventHandler
|
||||||
PHOSPHOR,
|
PHOSPHOR,
|
||||||
SCANLINES,
|
SCANLINES,
|
||||||
INTERPOLATION,
|
INTERPOLATION,
|
||||||
// Only used via direct hotkeys
|
// *** Debug group ***
|
||||||
STATE,
|
|
||||||
PALETTE_CHANGE_ATTRIBUTE,
|
|
||||||
NTSC_CHANGE_ATTRIBUTE,
|
|
||||||
// Debug
|
|
||||||
STATS,
|
STATS,
|
||||||
P0_ENAM,
|
P0_ENAM,
|
||||||
P1_ENAM,
|
P1_ENAM,
|
||||||
|
@ -447,7 +444,11 @@ class EventHandler
|
||||||
FIXED_COL,
|
FIXED_COL,
|
||||||
COLOR_LOSS,
|
COLOR_LOSS,
|
||||||
JITTER,
|
JITTER,
|
||||||
// Ranges
|
// *** Only used via direct hotkeys ***
|
||||||
|
STATE,
|
||||||
|
PALETTE_CHANGE_ATTRIBUTE,
|
||||||
|
NTSC_CHANGE_ATTRIBUTE,
|
||||||
|
// *** Ranges ***
|
||||||
NUM_ADJ,
|
NUM_ADJ,
|
||||||
START_AV_ADJ = VOLUME,
|
START_AV_ADJ = VOLUME,
|
||||||
END_AV_ADJ = INTERPOLATION,
|
END_AV_ADJ = INTERPOLATION,
|
||||||
|
|
Loading…
Reference in New Issue