mirror of https://github.com/stella-emu/stella.git
Add hotkey to change scanline adjustment. For now, this is only a stub.
This commit is contained in:
parent
1667d4df60
commit
6e2a254cee
|
@ -428,6 +428,8 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo
|
|||
{Event::VidmodeIncrease, KBDK_EQUALS, MOD3},
|
||||
{Event::VCenterDecrease, KBDK_PAGEDOWN, MOD3},
|
||||
{Event::VCenterIncrease, KBDK_PAGEUP, MOD3},
|
||||
{Event::ScanlineAdjustDecrease, KBDK_PAGEDOWN, KBDM_SHIFT | MOD3},
|
||||
{Event::ScanlineAdjustIncrease, KBDK_PAGEUP, KBDM_SHIFT | MOD3},
|
||||
{Event::VolumeDecrease, KBDK_LEFTBRACKET, MOD3},
|
||||
{Event::VolumeIncrease, KBDK_RIGHTBRACKET, MOD3},
|
||||
{Event::SoundToggle, KBDK_RIGHTBRACKET, KBDM_CTRL},
|
||||
|
|
|
@ -684,6 +684,27 @@ void Console::updateVcenter(Int32 vcenter)
|
|||
if (vcenter != myTIA->vcenter()) myTIA->setVcenter(vcenter);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::changeScanlineAdjust(int direction)
|
||||
{
|
||||
// Get correct setting, depending on whether we're in NTSC or PAL
|
||||
// Int32 adjust = myOSystem.settings().getInt("tia.adjustscanlines.ntsc");
|
||||
|
||||
if(direction == +1) // increase scanline adjustment
|
||||
{
|
||||
cerr << "adjust scanline +\n";
|
||||
}
|
||||
else if(direction == -1) // decrease scanline adjustment
|
||||
{
|
||||
cerr << "adjust scanline -\n";
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
// Set new adjustment, updating the correct setting
|
||||
// ...
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::setTIAProperties()
|
||||
{
|
||||
|
|
|
@ -269,6 +269,15 @@ class Console : public Serializable, public ConsoleIO
|
|||
*/
|
||||
void changeVerticalCenter(int direction);
|
||||
|
||||
/**
|
||||
Change the "TIA scanline adjust" variable.
|
||||
Note that there are currently two of these (NTSC and PAL). The currently
|
||||
active mode will determine which one is used.
|
||||
|
||||
@param direction +1 indicates increase, -1 indicates decrease.
|
||||
*/
|
||||
void changeScanlineAdjust(int direction);
|
||||
|
||||
/**
|
||||
Returns the current framerate.
|
||||
*/
|
||||
|
|
|
@ -84,6 +84,7 @@ class Event
|
|||
VidmodeStd, VidmodeRGB, VidmodeSVideo, VidModeComposite, VidModeBad, VidModeCustom,
|
||||
PreviousAttribute, NextAttribute, DecreaseAttribute, IncreaseAttribute,
|
||||
ScanlinesDecrease, ScanlinesIncrease, VCenterDecrease, VCenterIncrease,
|
||||
ScanlineAdjustDecrease, ScanlineAdjustIncrease,
|
||||
|
||||
ToggleP0Collision, ToggleP0Bit, ToggleP1Collision, ToggleP1Bit,
|
||||
ToggleM0Collision, ToggleM0Bit, ToggleM1Collision, ToggleM1Bit,
|
||||
|
|
|
@ -424,6 +424,14 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
if (pressed) myOSystem.console().changeVerticalCenter(+1);
|
||||
return;
|
||||
|
||||
case Event::ScanlineAdjustDecrease:
|
||||
if (pressed) myOSystem.console().changeScanlineAdjust(-1);
|
||||
return;
|
||||
|
||||
case Event::ScanlineAdjustIncrease:
|
||||
if (pressed) myOSystem.console().changeScanlineAdjust(+1);
|
||||
return;
|
||||
|
||||
case Event::ToggleFullScreen:
|
||||
if (pressed && !repeated) myOSystem.frameBuffer().toggleFullscreen();
|
||||
return;
|
||||
|
@ -1843,6 +1851,8 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
|
|||
{ Event::OverscanIncrease, "Increase overscan in fullscreen mode", "" },
|
||||
{ Event::VCenterIncrease, "Move display up", "" },
|
||||
{ Event::VCenterDecrease, "Move display down", "" },
|
||||
{ Event::ScanlineAdjustIncrease, "Increase scanline adjust", "" },
|
||||
{ Event::ScanlineAdjustDecrease, "Decrease scanline adjust", "" },
|
||||
{ Event::FormatDecrease, "Decrease display format", "" },
|
||||
{ Event::FormatIncrease, "Increase display format", "" },
|
||||
{ Event::TogglePalette, "Switch palette (Standard/Z26/User)", "" },
|
||||
|
@ -1972,6 +1982,7 @@ const Event::EventSet EventHandler::AudioVideoEvents = {
|
|||
Event::PhosphorDecrease, Event::PhosphorIncrease, Event::TogglePhosphor,
|
||||
Event::FormatDecrease, Event::FormatIncrease,
|
||||
Event::VCenterDecrease, Event::VCenterIncrease,
|
||||
Event::ScanlineAdjustDecrease, Event::ScanlineAdjustIncrease,
|
||||
Event::OverscanDecrease, Event::OverscanIncrease,
|
||||
Event::TogglePalette, Event::ToggleInter
|
||||
};
|
||||
|
|
|
@ -464,7 +464,7 @@ class EventHandler
|
|||
#else
|
||||
PNG_SIZE = 0,
|
||||
#endif
|
||||
EMUL_ACTIONLIST_SIZE = 141 + PNG_SIZE + COMBO_SIZE,
|
||||
EMUL_ACTIONLIST_SIZE = 143 + PNG_SIZE + COMBO_SIZE,
|
||||
MENU_ACTIONLIST_SIZE = 18
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in New Issue