mirror of
https://github.com/libretro/stella2023.git
synced 2024-11-30 04:10:40 +00:00
add hotkey for toggling interpolation (ctrl+i)
This commit is contained in:
parent
8782a39ce7
commit
356f06598d
@ -1554,6 +1554,12 @@
|
||||
<td>Control + p</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Toggle display interpolation</td>
|
||||
<td>Control + i</td>
|
||||
<td>Control + i</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Toggle sound on/off</td>
|
||||
<td>Control + ]</td>
|
||||
|
@ -457,6 +457,7 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo
|
||||
{Event::ScanlinesIncrease, KBDK_0, MOD3},
|
||||
{Event::ToggleColorLoss, KBDK_L, KBDM_CTRL},
|
||||
{Event::TogglePalette, KBDK_P, KBDM_CTRL},
|
||||
{Event::ToggleInter, KBDK_I, KBDM_CTRL},
|
||||
{Event::ToggleJitter, KBDK_J, MOD3},
|
||||
{Event::ToggleFrameStats, KBDK_L, MOD3},
|
||||
{Event::ToggleTimeMachine, KBDK_T, MOD3},
|
||||
|
@ -550,6 +550,21 @@ void Console::setPalette(const string& type)
|
||||
myTIA->enableFixedColors(true);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::toggleInter()
|
||||
{
|
||||
bool enabled = myOSystem.settings().getBool("tia.inter");
|
||||
|
||||
myOSystem.settings().setValue("tia.inter", !enabled);
|
||||
|
||||
// ... and apply potential setting changes to the TIA surface
|
||||
myOSystem.frameBuffer().tiaSurface().updateSurfaceSettings();
|
||||
ostringstream ss;
|
||||
|
||||
ss << "Interpolation " << (!enabled ? "enabled" : "disabled");
|
||||
myOSystem.frameBuffer().showMessage(ss.str());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::togglePhosphor()
|
||||
{
|
||||
|
@ -215,6 +215,12 @@ class Console : public Serializable, public ConsoleIO
|
||||
*/
|
||||
void setPalette(const string& palette);
|
||||
|
||||
/**
|
||||
Toggle interpolation on/off
|
||||
*/
|
||||
void toggleInter();
|
||||
|
||||
|
||||
/**
|
||||
Toggles phosphor effect.
|
||||
*/
|
||||
|
@ -120,6 +120,8 @@ class Event
|
||||
CompuMateQuote, CompuMateBackspace, CompuMateEquals, CompuMatePlus,
|
||||
CompuMateSlash,
|
||||
|
||||
ToggleInter,
|
||||
|
||||
LastType
|
||||
};
|
||||
|
||||
|
@ -527,6 +527,10 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
||||
if (pressed && !repeated) myOSystem.console().togglePalette();
|
||||
return;
|
||||
|
||||
case Event::ToggleInter:
|
||||
if (pressed && !repeated) myOSystem.console().toggleInter();
|
||||
return;
|
||||
|
||||
case Event::ToggleJitter:
|
||||
if (pressed && !repeated) myOSystem.console().toggleJitter();
|
||||
return;
|
||||
@ -1835,6 +1839,7 @@ EventHandler::EmulActionList EventHandler::ourEmulActionList = { {
|
||||
{ Event::FormatDecrease, "Decrease display format", "" },
|
||||
{ Event::FormatIncrease, "Increase display format", "" },
|
||||
{ Event::TogglePalette, "Switch palette (Standard/Z26/User)", "" },
|
||||
{ Event::ToggleInter, "Toggle display interpolation", "" },
|
||||
|
||||
// TV effects:
|
||||
{ Event::VidmodeStd, "Disable TV effects", "" },
|
||||
@ -1961,7 +1966,7 @@ const Event::EventSet EventHandler::AudioVideoEvents = {
|
||||
Event::FormatDecrease, Event::FormatIncrease,
|
||||
Event::VCenterDecrease, Event::VCenterIncrease,
|
||||
Event::OverscanDecrease, Event::OverscanIncrease,
|
||||
Event::TogglePalette,
|
||||
Event::TogglePalette, Event::ToggleInter
|
||||
};
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -464,7 +464,7 @@ class EventHandler
|
||||
#else
|
||||
PNG_SIZE = 0,
|
||||
#endif
|
||||
EMUL_ACTIONLIST_SIZE = 140 + PNG_SIZE + COMBO_SIZE,
|
||||
EMUL_ACTIONLIST_SIZE = 141 + PNG_SIZE + COMBO_SIZE,
|
||||
MENU_ACTIONLIST_SIZE = 18
|
||||
;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user