added two more methods to global hotkeys

updated and restructured hotkey documentation
This commit is contained in:
thrust26 2020-05-16 13:00:38 +02:00
parent 9e7940af95
commit 15dbea7d74
9 changed files with 219 additions and 150 deletions

View File

@ -22,6 +22,11 @@
* Added 'Custom' palette, generated from user controlled phase shifts. * Added 'Custom' palette, generated from user controlled phase shifts.
* Added that adjustable audio & video settings are displayed as gauge bars
* Added four global hotkeys which allow selecting and changing numerous
audio & video settings without having to remember the dedicated hotkeys
* Added 'Turbo' mode, runs the game as fast as the computer allows. * Added 'Turbo' mode, runs the game as fast as the computer allows.
* Added that paddle centering (per ROM) and sensitivity can be adjusted * Added that paddle centering (per ROM) and sensitivity can be adjusted
@ -39,6 +44,9 @@
* Added displaying last write address in the debugger. * Added displaying last write address in the debugger.
* Added debugger pseudo-register '_scanend', which gives the number of
scanlines at the end of the last frame.
* Added detection of color and audio data in DiStella. * Added detection of color and audio data in DiStella.
* Restored 'cfg' directory for Distella config files. * Restored 'cfg' directory for Distella config files.
@ -47,9 +55,6 @@
* Removed unused CV+ and DASH bank switching types. * Removed unused CV+ and DASH bank switching types.
* Added debugger pseudo-register '_scanend', which gives the number of
scanlines at the end of the last frame.
-Have fun! -Have fun!

View File

@ -1336,8 +1336,100 @@
</table> </table>
<p><b>Palettes (can be remapped, only active in TIA mode)</b></p> <p><b>Audio & Video Keys (can be remapped)</b></p>
<table BORDER=2 cellpadding=4>
<tr>
<th>Function</th>
<th>Key (Standard)</th>
<th>Key (macOS)</th>
</tr>
<tr>
<td>Toggle sound</td>
<td>Control + ]</td>
<td>Control + ]</td>
</tr>
<tr>
<td><i>Decrease</i> volume</td>
<td>Alt + [</td>
<td>Cmd + [</td>
</tr>
<tr>
<td><i>Increase</i> volume</td>
<td>Alt + ]</td>
<td>Cmd + ]</td>
</tr>
<tr>
<td>Switch to next <i>larger</i> zoom level in windowed mode,
</br>toggle stretching in fullscreen mode</td>
<td>Alt + =</td>
<td>Cmd + =</td>
</tr>
<tr>
<td>Switch to next <i>smaller</i> zoom level in windowed mode,
</br>toggle stretching in fullscreen mode</td>
<td>Alt + -</td>
<td>Cmd + -</td>
</tr>
<tr>
<td>Toggle windowed/fullscreen mode</td>
<td>Alt + Enter</td>
<td>Cmd + Enter</td>
</tr>
<tr>
<td><i>Decrease</i> overscan in fullscreen mode</td>
<td>Shift + PageDown</td>
<td>Shift-Fn + Down arrow</td>
</tr>
<tr>
<td><i>Increase</i> overscan in fullscreen mode</td>
<td>Shift + PageUp</td>
<td>Shift-Fn + Up arrow</td>
</tr>
<tr>
<td>Move display <i>down</i> (uses "Display.VCenter")</td>
<td>Alt + PageDown</td>
<td>Cmd-Fn + Down arrow</td>
</tr>
<tr>
<td>Move display <i>up</i> (uses "Display.VCenter")</td>
<td>Alt + PageUp</td>
<td>Cmd-Fn + Up arrow</td>
</tr>
<tr>
<td><i>Decrease</i> vertical display size</td>
<td>Shift-Alt + PageUp</td>
<td>Shift-Cmd-Fn + Up arrow</td>
</tr>
<tr>
<td><i>Increase</i> vertical display size</td>
<td>Shift-Alt + PageDown</td>
<td>Shift-Cmd-Fn + Down arrow</td>
</tr>
<tr>
<td>Switch to <i>previous</i> display format (NTSC/PAL/SECAM etc.)</td>
<td>Shift-Control + f</td>
<td>Shift-Control + f</td>
</tr>
<tr>
<td>Switch to <i>next</i> display format (NTSC/PAL/SECAM etc.)</td>
<td>Control + f</td>
<td>Control + f</td>
</tr>
<tr>
<td>Toggle display interpolation</td>
<td>Control + i</td>
<td>Control + i</td>
</tr>
<tr>
<td colspan="3"><center><font size="-1">
These settings can also be changed using <a href="#GlobalKeys"><b>Global Audio & Video Keys</a></font></center>
</td>
</tr>
</table>
<p><b>Palettes Keys (can be remapped)</b></p>
<table BORDER=2 cellpadding=4> <table BORDER=2 cellpadding=4>
<tr> <tr>
<th>Function</th> <th>Function</th>
@ -1346,43 +1438,48 @@
</tr> </tr>
<tr> <tr>
<td>Select previous palette (Standard/Z26/User/Custom)</td> <td>Select <i>previous</i> palette (Standard/z26/User/Custom)</td>
<td>Shift-Control + p</td> <td>Shift-Control + p</td>
<td>Shift-Control + p</td> <td>Shift-Control + p</td>
</tr> </tr>
<tr> <tr>
<td>Select next palette (Standard/Z26/User/Custom)</td> <td>Select <i>next</i> palette (Standard/z26/User/Custom)</td>
<td>Control + p</td> <td>Control + p</td>
<td>Control + p</td> <td>Control + p</td>
</tr> </tr>
<tr> <tr>
<td>Select previous palette attribute</td> <td>Select <i>previous</i> palette attribute</td>
<td>Shift-Alt + 9</td> <td>Shift-Alt + 9</td>
<td>Shift-Cmd + 9</td> <td>Shift-Cmd + 9</td>
</tr> </tr>
<tr> <tr>
<td>Select next palette attribute</td> <td>Select <i>next</i> palette attribute</td>
<td>Alt + 9</td> <td>Alt + 9</td>
<td>Cmd + 9</td> <td>Cmd + 9</td>
</tr> </tr>
<tr> <tr>
<td>Decrease selected palette attribute</td> <td><i>Decrease</i> selected palette attribute</td>
<td>Shift-Alt + 0</td> <td>Shift-Alt + 0</td>
<td>Shift-Cmd + 0</td> <td>Shift-Cmd + 0</td>
</tr> </tr>
<tr> <tr>
<td>Increase selected palette attribute</td> <td><i>Increase</i> selected palette attribute</td>
<td>Alt + 0</td> <td>Alt + 0</td>
<td>Cmd + 0</td> <td>Cmd + 0</td>
</tr> </tr>
<tr>
<td colspan="3"><center><font size="-1">
These settings can also be changed using <a href="#GlobalKeys"><b>Global Audio & Video Keys</a></font></center>
</td>
</tr>
</table> </table>
<p><b>TV effects (can be remapped, only active in TIA mode)</b></p> <p><b>TV effects Keys (can be remapped)</b></p>
<table BORDER=2 cellpadding=4> <table BORDER=2 cellpadding=4>
<tr> <tr>
@ -1391,73 +1488,112 @@
<th>Key (macOS)</th> <th>Key (macOS)</th>
</tr> </tr>
<tr> <tr>
<td>Select previous TV effects preset</td> <td>Select <i>previous</i> TV effects preset</td>
<td>Shift-Alt + 1</td> <td>Shift-Alt + 1</td>
<td>Shift-Cmd + 1</td> <td>Shift-Cmd + 1</td>
</tr> </tr>
<tr> <tr>
<td>Select next TV effects preset</td> <td>Select <i>next</i> TV effects preset</td>
<td>Alt + 1</td> <td>Alt + 1</td>
<td>Cmd + 1</td> <td>Cmd + 1</td>
</tr> </tr>
<tr> <tr>
<td>Select previous 'Custom' mode attribute (*)</td> <td>Select <i>previous</i> 'Custom' mode attribute (*)</td>
<td>Shift-Alt + 2</td> <td>Shift-Alt + 2</td>
<td>Shift-Cmd + 2</td> <td>Shift-Cmd + 2</td>
</tr> </tr>
<tr> <tr>
<td>Select next 'Custom' mode attribute (*)</td> <td>Select <i>next</i> 'Custom' mode attribute (*)</td>
<td>Alt + 2</td> <td>Alt + 2</td>
<td>Cmd + 2</td> <td>Cmd + 2</td>
</tr> </tr>
<tr> <tr>
<td>Decrease 'Custom' selected attribute value (*)</td> <td><i>Decrease</i> 'Custom' selected attribute value (*)</td>
<td>Shift-Alt + 3</td> <td>Shift-Alt + 3</td>
<td>Shift-Cmd + 3</td> <td>Shift-Cmd + 3</td>
</tr> </tr>
<tr> <tr>
<td>Increase 'Custom' selected attribute value (*)</td> <td><i>Increase</i> 'Custom' selected attribute value (*)</td>
<td>Alt + 3</td> <td>Alt + 3</td>
<td>Cmd + 3</td> <td>Cmd + 3</td>
</tr> </tr>
<tr> <tr>
<td>Toggle 'phosphor' mode</td> <td>Toggle 'phosphor' mode</td>
<td>Alt + p</td> <td>Alt + p</td>
<td>Cmd + p</td> <td>Cmd + p</td>
</tr> </tr>
<tr> <tr>
<td>Decrease 'phosphor' blend</td> <td><i>Decrease</i> 'phosphor' blend</td>
<td>Shift-Alt + 4</td> <td>Shift-Alt + 4</td>
<td>Shift-Cmd + 4</td> <td>Shift-Cmd + 4</td>
</tr> </tr>
<tr> <tr>
<td>Increase 'phosphor' blend</td> <td><i>Increase</i> 'phosphor' blend</td>
<td>Alt + 4</td> <td>Alt + 4</td>
<td>Cmd + 4</td> <td>Cmd + 4</td>
</tr> </tr>
<tr> <tr>
<td>Decrease scanline intensity</td> <td><i>Decrease</i> scanline intensity</td>
<td>Shift-Alt + 5</td> <td>Shift-Alt + 5</td>
<td>Shift-Cmd + 5</td> <td>Shift-Cmd + 5</td>
</tr> </tr>
<tr> <tr>
<td>Increase scanline intensity</td> <td><i>Increase</i> scanline intensity</td>
<td>Alt + 5</td> <td>Alt + 5</td>
<td>Cmd + 5</td> <td>Cmd + 5</td>
</tr> </tr>
<tr> <tr>
<td colspan="3"><center><font size="-1"> <td colspan="3"><center><font size="-1">
Items marked as (*) will also switch to 'Custom' preset mode</font></center></td> These settings can also be changed using <a href="#GlobalKeys"><b>Global Audio & Video Keys</a></font></center>
</td>
</tr>
<tr>
<td colspan="3"><center><font size="-1">
Items marked as (*) will also switch to 'Custom' mode</font></center></td>
</tr> </tr>
</table> </table>
<p><b><a name="GlobalKeys">Global Audio & Video Keys</a> (can be remapped)</b></p>
<p>These keys allow selecting and changing audio & video settings without having to remember the
dedicated keys.</p>
<table BORDER=2 cellpadding=4>
<tr>
<th>Function</th>
<th>Key (Standard)</th>
<th>Key (macOS)</th>
</tr>
<tr>
<td>Select <i>previous</i> AV setting</td>
<td>End</td>
<td>Fn + Left arrow</td>
</tr>
<tr>
<td>Select <i>next</i> AV setting</td>
<td>Home</td>
<td>Fn + Right arrow</td>
</tr>
<tr>
<td><i>Decrease</i> current AV setting</td>
<td>PageDown</td>
<td>Fn + Down arrow</td>
</tr>
<tr>
<td><i>Increase</i> current AV setting
<td>PageUp</td>
<td>Fn + Up arrow</td>
</tr>
</table>
<p>Notes:
<ul>
<li>Only available if UI messages are enabled.</li>
<li>Currently not available settings are automatically skipped.</li>
<li>If a setting was selected via dedicated key, its value can also be changed with the
global keys.</li>
</ul>
</p></br>
<a name="DeveloperKeys"></a> <a name="DeveloperKeys"></a>
<p><b>Developer Keys in TIA mode (can be remapped)</b></p> <p><b>Developer Keys (can be remapped)</b></p>
<table BORDER=2 cellpadding=4> <table BORDER=2 cellpadding=4>
<tr> <tr>
@ -1575,7 +1711,7 @@
</tr> </tr>
</table> </table>
<p><b>Other Keys (can be remapped)</b></p> <p><b>Other Emulation Keys (can be remapped)</b></p>
<table BORDER=2 cellpadding=4> <table BORDER=2 cellpadding=4>
<tr> <tr>
@ -1583,93 +1719,11 @@
<th>Key (Standard)</th> <th>Key (Standard)</th>
<th>Key (macOS)</th> <th>Key (macOS)</th>
</tr> </tr>
<tr>
<td>Switch to next <i>larger</i> zoom level in windowed mode,
</br>toggle stretching in fullscreen mode</td>
<td>Alt + =</td>
<td>Cmd + =</td>
</tr>
<tr>
<td>Switch to next <i>smaller</i> zoom level in windowed mode,
</br>toggle stretching in fullscreen mode</td>
<td>Alt + -</td>
<td>Cmd + -</td>
</tr>
<tr>
<td>Toggle fullscreen/windowed mode</td>
<td>Alt + Enter</td>
<td>Cmd + Enter</td>
</tr>
<tr>
<td>Decrease overscan in fullscreen mode</td>
<td>Shift + PageDown</td>
<td>Shift + PageDown</td>
</tr>
<tr>
<td>Increase overscan in fullscreen mode</td>
<td>Shift + PageUp</td>
<td>Shift + PageUp</td>
</tr>
<tr>
<td>Move display <i>up</i> (uses "Display.VCenter")</td>
<td>Alt + PageUp</td>
<td>Cmd + PageUp</td>
</tr>
<tr>
<td>Move display <i>down</i> (uses "Display.VCenter")</td>
<td>Alt + PageDown</td>
<td>Cmd + PageDown</td>
</tr>
<tr>
<td>Switch display format in <i>decreasing</i> order (NTSC/PAL/SECAM etc.)</td>
<td>Shift-Control + f</td>
<td>Shift-Control + f</td>
</tr>
<tr>
<td>Switch display format in <i>increasing</i> order (NTSC/PAL/SECAM etc.)</td>
<td>Control + f</td>
<td>Control + f</td>
</tr>
<tr>
<td>Toggle display interpolation</td>
<td>Control + i</td>
<td>Control + i</td>
</tr>
<tr> <tr>
<td>Toggle 'Turbo' mode</td> <td>Toggle 'Turbo' mode</td>
<td>Control + t</td> <td>Control + t</td>
<td>Control + t</td> <td>Control + t</td>
</tr> </tr>
<tr>
<td>Toggle sound on/off</td>
<td>Control + ]</td>
<td>Control + ]</td>
</tr>
<tr>
<td>Decrease volume</td>
<td>Alt + [</td>
<td>Cmd + [</td>
</tr>
<tr>
<td>Increase volume</td>
<td>Alt + ]</td>
<td>Cmd + ]</td>
</tr>
<tr> <tr>
<td>Switch mouse between controller emulation modes</br>(see <b>Game Properties - <a href="#Controller">Controller</a></b>)</td> <td>Switch mouse between controller emulation modes</br>(see <b>Game Properties - <a href="#Controller">Controller</a></b>)</td>
<td>Control + 0</td> <td>Control + 0</td>
@ -1767,27 +1821,9 @@
<td>Alt + Up arrow</td> <td>Alt + Up arrow</td>
<td>Cmd + Up arrow</td> <td>Cmd + Up arrow</td>
</tr> </tr>
<tr>
<td>Decrease current setting (*)</td>
<td>PageDown</td>
<td>PageDown</td>
</tr>
<tr>
<td>Increase current setting (*)
<td>PageUp</td>
<td>PageUp</td>
</tr>
<tr>
<td colspan="3"><center><font size="-1">
(*) Note: These keys allow easy changing of the current displayed selection (e.g. volume (default),
phosphor, zoom...) without having to use the original keys.</font></center></td>
</tr>
</table> </table>
<p><b>UI keys in Text Editing areas (cannot be remapped)</b></p> <p><b>UI Keys in Text Editing areas (cannot be remapped)</b></p>
<table BORDER=2 cellpadding=4> <table BORDER=2 cellpadding=4>
<tr><th>Key</th><th>Editor Function</th></tr> <tr><th>Key</th><th>Editor Function</th></tr>

View File

@ -494,8 +494,13 @@ PhysicalKeyboardHandler::EventMappingArray PhysicalKeyboardHandler::DefaultCommo
{Event::PaletteDecrease, KBDK_P, KBDM_SHIFT | KBDM_CTRL}, {Event::PaletteDecrease, KBDK_P, KBDM_SHIFT | KBDM_CTRL},
{Event::PaletteIncrease, KBDK_P, KBDM_CTRL}, {Event::PaletteIncrease, KBDK_P, KBDM_CTRL},
#ifndef BSPF_MACOS
{Event::PreviousSetting, KBDK_END}, {Event::PreviousSetting, KBDK_END},
{Event::NextSetting, KBDK_HOME}, {Event::NextSetting, KBDK_HOME},
#else
{Event::PreviousSetting, KBDK_HOME},
{Event::NextSetting, KBDK_END},
#endif
{Event::SettingDecrease, KBDK_PAGEDOWN}, {Event::SettingDecrease, KBDK_PAGEDOWN},
{Event::SettingIncrease, KBDK_PAGEUP}, {Event::SettingIncrease, KBDK_PAGEUP},

View File

@ -468,17 +468,20 @@ void Console::enableColorLoss(bool state)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::toggleInter() void Console::toggleInter(bool toggle)
{ {
bool enabled = myOSystem.settings().getBool("tia.inter"); bool enabled = myOSystem.settings().getBool("tia.inter");
myOSystem.settings().setValue("tia.inter", !enabled); if(toggle)
enabled = !enabled;
myOSystem.settings().setValue("tia.inter", enabled);
// ... and apply potential setting changes to the TIA surface // ... and apply potential setting changes to the TIA surface
myOSystem.frameBuffer().tiaSurface().updateSurfaceSettings(); myOSystem.frameBuffer().tiaSurface().updateSurfaceSettings();
ostringstream ss; ostringstream ss;
ss << "Interpolation " << (!enabled ? "enabled" : "disabled"); ss << "Interpolation " << (enabled ? "enabled" : "disabled");
myOSystem.frameBuffer().showMessage(ss.str()); myOSystem.frameBuffer().showMessage(ss.str());
} }

View File

@ -206,7 +206,7 @@ class Console : public Serializable, public ConsoleIO
/** /**
Toggle interpolation on/off Toggle interpolation on/off
*/ */
void toggleInter(); void toggleInter(bool toggle = true);
/** /**
Toggle turbo mode on/off Toggle turbo mode on/off

View File

@ -368,11 +368,14 @@ AdjustFunction EventHandler::cycleAdjustSetting(int direction)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting) AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting)
{ {
// MUST have the same order as AdjustSetting // Notes:
// - All methods MUST show a message
// - This array MUST have the same order as AdjustSetting
const AdjustFunction ADJUST_FUNCTIONS[int(AdjustSetting::NUM_ADJ)] = const AdjustFunction ADJUST_FUNCTIONS[int(AdjustSetting::NUM_ADJ)] =
{ {
std::bind(&Sound::adjustVolume, &myOSystem.sound(), _1), std::bind(&Sound::adjustVolume, &myOSystem.sound(), _1),
std::bind(&FrameBuffer::selectVidMode, &myOSystem.frameBuffer(), _1), std::bind(&FrameBuffer::selectVidMode, &myOSystem.frameBuffer(), _1),
std::bind(&FrameBuffer::toggleFullscreen, &myOSystem.frameBuffer(), _1),
std::bind(&FrameBuffer::changeOverscan, &myOSystem.frameBuffer(), _1), std::bind(&FrameBuffer::changeOverscan, &myOSystem.frameBuffer(), _1),
std::bind(&Console::selectFormat, &myOSystem.console(), _1), std::bind(&Console::selectFormat, &myOSystem.console(), _1),
std::bind(&Console::changeVerticalCenter, &myOSystem.console(), _1), std::bind(&Console::changeVerticalCenter, &myOSystem.console(), _1),
@ -405,6 +408,7 @@ AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting)
int(NTSCFilter::Adjustables::BLEEDING), _1), int(NTSCFilter::Adjustables::BLEEDING), _1),
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),
// Following functions are not used when cycling settings but for "direct only" hotkeys // Following functions are not used when cycling settings but for "direct only" hotkeys
std::bind(&StateManager::changeState, &myOSystem.state(), _1), std::bind(&StateManager::changeState, &myOSystem.state(), _1),
std::bind(&PaletteHandler::changeCurrentAdjustable, &myOSystem.frameBuffer().tiaSurface().paletteHandler(), _1), std::bind(&PaletteHandler::changeCurrentAdjustable, &myOSystem.frameBuffer().tiaSurface().paletteHandler(), _1),
@ -643,7 +647,12 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
return; return;
case Event::ToggleFullScreen: case Event::ToggleFullScreen:
if (pressed && !repeated) myOSystem.frameBuffer().toggleFullscreen(); if(pressed && !repeated)
{
myOSystem.frameBuffer().toggleFullscreen();
myAdjustSetting = AdjustSetting::FULLSCREEN;
myAdjustActive = true;
}
return; return;
case Event::OverscanDecrease: case Event::OverscanDecrease:
@ -807,7 +816,12 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
return; return;
case Event::ToggleInter: case Event::ToggleInter:
if (pressed && !repeated) myOSystem.console().toggleInter(); if(pressed && !repeated)
{
myOSystem.console().toggleInter();
myAdjustSetting = AdjustSetting::INTERPOLATION;
myAdjustActive = true;
}
return; return;
case Event::ToggleTurbo: case Event::ToggleTurbo:
@ -2338,8 +2352,6 @@ const Event::EventSet EventHandler::MiscEvents = {
// Event::MouseButtonLeftValue, Event::MouseButtonRightValue, // Event::MouseButtonLeftValue, Event::MouseButtonRightValue,
Event::HandleMouseControl, Event::ToggleGrabMouse, Event::HandleMouseControl, Event::ToggleGrabMouse,
Event::ToggleSAPortOrder, Event::ToggleSAPortOrder,
Event::SettingDecrease, Event::SettingIncrease,
Event::PreviousSetting, Event::NextSetting,
}; };
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -2347,19 +2359,21 @@ const Event::EventSet EventHandler::AudioVideoEvents = {
Event::VolumeDecrease, Event::VolumeIncrease, Event::SoundToggle, Event::VolumeDecrease, Event::VolumeIncrease, Event::SoundToggle,
Event::VidmodeDecrease, Event::VidmodeIncrease, Event::VidmodeDecrease, Event::VidmodeIncrease,
Event::ToggleFullScreen, Event::ToggleFullScreen,
Event::VidmodeStd, Event::VidmodeRGB, Event::VidmodeSVideo, Event::VidModeComposite, Event::VidModeBad, Event::VidModeCustom, Event::OverscanDecrease, Event::OverscanIncrease,
Event::PreviousAttribute, Event::NextAttribute, Event::DecreaseAttribute, Event::IncreaseAttribute,
Event::ScanlinesDecrease, Event::ScanlinesIncrease,
Event::PhosphorDecrease, Event::PhosphorIncrease, Event::TogglePhosphor,
Event::FormatDecrease, Event::FormatIncrease, Event::FormatDecrease, Event::FormatIncrease,
Event::VCenterDecrease, Event::VCenterIncrease, Event::VCenterDecrease, Event::VCenterIncrease,
Event::VSizeAdjustDecrease, Event::VSizeAdjustIncrease, Event::VSizeAdjustDecrease, Event::VSizeAdjustIncrease,
Event::OverscanDecrease, Event::OverscanIncrease,
Event::PaletteDecrease, Event::PaletteIncrease, Event::PaletteDecrease, Event::PaletteIncrease,
Event::PreviousVideoMode, Event::NextVideoMode,
Event::PreviousPaletteAttribute, Event::NextPaletteAttribute, Event::PreviousPaletteAttribute, Event::NextPaletteAttribute,
Event::PaletteAttributeDecrease, Event::PaletteAttributeIncrease, Event::PaletteAttributeDecrease, Event::PaletteAttributeIncrease,
Event::ToggleInter Event::VidmodeStd, Event::VidmodeRGB, Event::VidmodeSVideo, Event::VidModeComposite, Event::VidModeBad, Event::VidModeCustom,
Event::PreviousVideoMode, Event::NextVideoMode,
Event::PreviousAttribute, Event::NextAttribute, Event::DecreaseAttribute, Event::IncreaseAttribute,
Event::PhosphorDecrease, Event::PhosphorIncrease, Event::TogglePhosphor,
Event::ScanlinesDecrease, Event::ScanlinesIncrease,
Event::ToggleInter,
Event::PreviousSetting, Event::NextSetting,
Event::SettingDecrease, Event::SettingIncrease,
}; };
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -397,6 +397,7 @@ class EventHandler
NONE = -1, NONE = -1,
VOLUME, VOLUME,
ZOOM, ZOOM,
FULLSCREEN,
OVERSCAN, OVERSCAN,
TVFORMAT, TVFORMAT,
VCENTER, VCENTER,
@ -418,7 +419,8 @@ class EventHandler
NTSC_BLEEDING, NTSC_BLEEDING,
PHOSPHOR, PHOSPHOR,
SCANLINES, SCANLINES,
MAX_ADJ = SCANLINES, INTERPOLATION,
MAX_ADJ = INTERPOLATION,
// Only used via direct hotkeys // Only used via direct hotkeys
STATE, STATE,
PALETTE_CHANGE_ATTRIBUTE, PALETTE_CHANGE_ATTRIBUTE,

View File

@ -987,9 +987,13 @@ void FrameBuffer::setFullscreen(bool enable)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBuffer::toggleFullscreen() void FrameBuffer::toggleFullscreen(bool toggle)
{ {
setFullscreen(!fullScreen()); const bool isFullscreen = toggle ? !fullScreen() : fullScreen();
setFullscreen(isFullscreen);
showMessage(string("Fullscreen ") + (isFullscreen ? "enabled" : "disabled"));
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -260,7 +260,7 @@ class FrameBuffer
/** /**
Toggles between fullscreen and window mode. Toggles between fullscreen and window mode.
*/ */
void toggleFullscreen(); void toggleFullscreen(bool toggle = true);
/** /**
Changes the fullscreen overscan. Changes the fullscreen overscan.