Merge branch 'master' into feature/full-on-sqlite

This commit is contained in:
Stephen Anthony 2020-12-21 22:45:44 -03:30
commit 5332758281
60 changed files with 345 additions and 335 deletions

View File

@ -16,15 +16,15 @@
* Added high scores saving. * Added high scores saving.
* Enhanced cut/copy/paste for text editing (except PromptWidget). * Improved text editing functionality (except PromptWidget):
- Enhanced selection and cut/copy/paste from keyboard.
- Added undo and redo support.
- Added mouse support (selection, cut/copy/paste).
- All actions have keyboard shortcuts.
* Added undo and redo to text editing (except PromptWidget). * Various improvements to the ROM launcher:
- Added wildcard support to the dialog filter
* Added mouse support for text editing (except PromptWidget). - Added option to search subdirectories
* Added wildcard support to launcher dialog filter.
* Added option to search subdirectories in launcher.
* Added static tooltips to some UI items. * Added static tooltips to some UI items.
@ -41,7 +41,8 @@
* Fixed Stelladaptor/2600'daptor devices sometimes not being assigned * Fixed Stelladaptor/2600'daptor devices sometimes not being assigned
correct default mappings. correct default mappings.
* Codebase now uses C++17 features. * Codebase now uses C++17 features, which means a minimum of gcc7
or clang5 for Linux/Mac, and Visual Studio 2019 for Windows.
-Have fun! -Have fun!

View File

@ -223,7 +223,7 @@ present in the debugger):</p>
<p>For space reasons, the Prompt, TIA, I/O and Audio displays are split into <p>For space reasons, the Prompt, TIA, I/O and Audio displays are split into
4 tabs, only one of which is visible at a time. You can use the mouse or 4 tabs, only one of which is visible at a time. You can use the mouse or
keyboard to select which tab you want to view. Control/Cmd + Tab cycles between keyboard to select which tab you want to view. Control/Cmd + Tab cycles between
tabs from left-to-right, Shift + Control/Cmd + Tab cycles right-to-left. tabs from left-to-right, Shift-Control/Cmd + Tab cycles right-to-left.
Pressing Tab (or Shift + Tab) cycles between widgets in the current tab (except Pressing Tab (or Shift + Tab) cycles between widgets in the current tab (except
for in the Prompt Tab, where 'tab' is used for something else).</p> for in the Prompt Tab, where 'tab' is used for something else).</p>
@ -339,7 +339,7 @@ previous rewind operation. The rewind buffer is 100 levels deep by default, the
size can be configured e.g. in the size can be configured e.g. in the
<b><a href="index.html#Debugger">Developer Settings</a> - Time Machine</b> dialog.<p> <b><a href="index.html#Debugger">Developer Settings</a> - Time Machine</b> dialog.<p>
<p>The other operations are Step, Trace, Scan+1, Frame+1 and Run.</p> <p>The other operations are Step, Trace, Scan +1, Frame +1 and Run.</p>
<p>You can also use the buttons from anywhere in the GUI via hotkeys.</p> <p>You can also use the buttons from anywhere in the GUI via hotkeys.</p>
<p> <p>
@ -349,48 +349,48 @@ size can be configured e.g. in the
<th>Function</th> <th>Function</th>
</tr> </tr>
<tr> <tr>
<td>Control-s</td> <td>Control + S</td>
<td>Step</td> <td>Step</td>
</tr> </tr>
<tr> <tr>
<td>Control-t</td> <td>Control + T</td>
<td>Trace</td> <td>Trace</td>
</tr> </tr>
<tr> <tr>
<td>Control-L</td> <td>Control + L</td>
<td>Scan+1</td> <td>Scan +1</td>
</tr> </tr>
<tr> <tr>
<td>Control-f</td> <td>Control + F</td>
<td>Frame+1</td> <td>Frame +1</td>
</tr> </tr>
<tr> <tr>
<td>Alt-Left arrow</td> <td>Alt + Left arrow</td>
<td>Rewind 1</td> <td>Rewind 1</td>
</tr> </tr>
<tr> <tr>
<td>Shift-Alt-Left arrow</td> <td>Shift-Alt + Left arrow</td>
<td>Rewind 10</td> <td>Rewind 10</td>
</tr> </tr>
<tr> <tr>
<td>Alt-Down arrow</td> <td>Alt + Down arrow</td>
<td>Rewind all</td> <td>Rewind all</td>
</tr> </tr>
<tr> <tr>
<td>Alt-Right arrow</td> <td>Alt + Right arrow</td>
<td>Unwind 1</td> <td>Unwind 1</td>
</tr> </tr>
<tr> <tr>
<td>Shift-Alt-Right arrow</td> <td>Shift-Alt + Right arrow</td>
<td>Unwind 10</td> <td>Unwind 10</td>
</tr> </tr>
<tr> <tr>
<td>Alt-Up arrow</td> <td>Alt + Up arrow</td>
<td>Unwind all</td> <td>Unwind all</td>
</tr> </tr>
<tr> <tr>
<td>Backquote (`)</td> <td>Backquote (`)</td>
<td>Run</td> <td>Run, exits debugger</td>
</tr> </tr>
</table> </table>
</p> </p>
@ -433,18 +433,18 @@ Bash-style commands are also supported:</p>
<tr><td>End</td><td>Move cursor to end of line</td></tr> <tr><td>End</td><td>Move cursor to end of line</td></tr>
<tr><td>Delete</td><td>Remove character to right of cursor</td></tr> <tr><td>Delete</td><td>Remove character to right of cursor</td></tr>
<tr><td>Backspace</td><td>Remove character to left of cursor</td></tr> <tr><td>Backspace</td><td>Remove character to left of cursor</td></tr>
<tr><td>Control-a</td><td>Same function as 'Home'</td></tr> <tr><td>Control + A</td><td>Same function as 'Home'</td></tr>
<tr><td>Control-e</td><td>Same function as 'End'</td></tr> <tr><td>Control + E</td><td>Same function as 'End'</td></tr>
<tr><td>Control-d</td><td>Same function as 'Delete'</td></tr> <tr><td>Control + D</td><td>Same function as 'Delete'</td></tr>
<tr><td>Control-k</td><td>Remove all characters from cursor to end of line</td></tr> <tr><td>Control + K</td><td>Remove all characters from cursor to end of line</td></tr>
<tr><td>Control-u</td><td>Remove all characters from cursor to beginning of line</td></tr> <tr><td>Control + U</td><td>Remove all characters from cursor to beginning of line</td></tr>
<tr><td>Control-w</td><td>Remove entire word to left of cursor</td></tr> <tr><td>Control + W</td><td>Remove entire word to left of cursor</td></tr>
<tr><td>Shift-PgUp</td><td>Scroll up through previous commands one screen/page</td></tr> <tr><td>Shift + PgUp</td><td>Scroll up through previous commands one screen/page</td></tr>
<tr><td>Shift-PgDown</td><td>Scroll down through previous commands one screen/page</td></tr> <tr><td>Shift + PgDown</td><td>Scroll down through previous commands one screen/page</td></tr>
<tr><td>Shift-Up</td><td>Scroll up through previous commands one line</td></tr> <tr><td>Shift + Up</td><td>Scroll up through previous commands one line</td></tr>
<tr><td>Shift-Down</td><td>Scroll down through previous commands one line</td></tr> <tr><td>Shift + Down</td><td>Scroll down through previous commands one line</td></tr>
<tr><td>Shift-Home</td><td>Scroll to beginning of commands</td></tr> <tr><td>Shift + Home</td><td>Scroll to beginning of commands</td></tr>
<tr><td>Shift-End</td><td>Scroll to end of commands</td></tr> <tr><td>Shift + End</td><td>Scroll to end of commands</td></tr>
</table> </table>
<p>You can also scroll with the mouse. Copy and paste is not yet supported.</p> <p>You can also scroll with the mouse. Copy and paste is not yet supported.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -644,8 +644,8 @@
<tr> <tr>
<td>Exit emulator</td> <td>Exit emulator</td>
<td>Control + q</td> <td>Control + Q</td>
<td>Cmd + q</td> <td>Cmd + Q</td>
</tr> </tr>
<tr> <tr>
@ -771,7 +771,7 @@
<tr> <tr>
<td>Pause/resume emulation</td> <td>Pause/resume emulation</td>
<td>Pause</td> <td>Pause</td>
<td>Shift-Cmd + p</td> <td>Shift-Cmd + P</td>
</tr> </tr>
</table> </table>
@ -1377,8 +1377,8 @@
<td>Toggle adapting display refresh rate to game frame rate <td>Toggle adapting display refresh rate to game frame rate
</br> </br>
Note: Not available for macOS.</td> Note: Not available for macOS.</td>
<td>Alt + r</td> <td>Alt + R</td>
<td>Cmd + r</td> <td>Cmd + R</td>
</tr> </tr>
<tr> <tr>
<td><i>Decrease</i> overscan in fullscreen mode</td> <td><i>Decrease</i> overscan in fullscreen mode</td>
@ -1402,8 +1402,8 @@
</tr> </tr>
<tr> <tr>
<td>Toggle aspect ratio correct scaling</td> <td>Toggle aspect ratio correct scaling</td>
<td>Control + c</td> <td>Control + C</td>
<td>Control + c</td> <td>Control + C</td>
</tr> </tr>
<tr> <tr>
<td><i>Decrease</i> vertical display size</td> <td><i>Decrease</i> vertical display size</td>
@ -1417,18 +1417,18 @@
</tr> </tr>
<tr> <tr>
<td>Switch to <i>previous</i> display format (NTSC/PAL/SECAM etc.)</td> <td>Switch to <i>previous</i> display format (NTSC/PAL/SECAM etc.)</td>
<td>Shift-Control + f</td> <td>Shift-Control + F</td>
<td>Shift-Control + f</td> <td>Shift-Control + F</td>
</tr> </tr>
<tr> <tr>
<td>Switch to <i>next</i> display format (NTSC/PAL/SECAM etc.)</td> <td>Switch to <i>next</i> display format (NTSC/PAL/SECAM etc.)</td>
<td>Control + f</td> <td>Control + F</td>
<td>Control + f</td> <td>Control + F</td>
</tr> </tr>
<tr> <tr>
<td>Toggle display interpolation</td> <td>Toggle display interpolation</td>
<td>Control + i</td> <td>Control + I</td>
<td>Control + i</td> <td>Control + I</td>
</tr> </tr>
<tr> <tr>
<td colspan="3"><center><font size="-1"> <td colspan="3"><center><font size="-1">
@ -1447,14 +1447,14 @@
<tr> <tr>
<td>Select <i>previous</i> 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 <i>next</i> 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>
@ -1527,8 +1527,8 @@
</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><i>Decrease</i> 'phosphor' blend</td> <td><i>Decrease</i> 'phosphor' blend</td>
@ -1627,13 +1627,13 @@
<tr> <tr>
<td><i>Decrease</i> autofire rate</td> <td><i>Decrease</i> autofire rate</td>
<td>Shift-Control + a</td> <td>Shift-Control + A</td>
<td>Shift-Control + a</td> <td>Shift-Control + A</td>
</tr> </tr>
<tr> <tr>
<td><i>Increase</i> autofire rate</td> <td><i>Increase</i> autofire rate</td>
<td>Control + a</td> <td>Control + A</td>
<td>Control + a</td> <td>Control + A</td>
</tr> </tr>
<tr> <tr>
@ -1716,8 +1716,8 @@
<tr> <tr>
<td>Toggle grab mouse</td> <td>Toggle grab mouse</td>
<td>Control + g</td> <td>Control + G</td>
<td>Control + g</td> <td>Control + G</td>
</tr> </tr>
<tr> <tr>
@ -1823,38 +1823,38 @@
<tr> <tr>
<td>Toggle TIA Player0 object</td> <td>Toggle TIA Player0 object</td>
<td>Alt + z</td> <td>Alt + Z</td>
<td>Cmd + z</td> <td>Cmd + Z</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Player1 object</td> <td>Toggle TIA Player1 object</td>
<td>Alt + x</td> <td>Alt + X</td>
<td>Cmd + x</td> <td>Cmd + X</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Missile0 object</td> <td>Toggle TIA Missile0 object</td>
<td>Alt + c</td> <td>Alt + C</td>
<td>Cmd + c</td> <td>Cmd + C</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Missile1 object</td> <td>Toggle TIA Missile1 object</td>
<td>Alt + v</td> <td>Alt + V</td>
<td>Cmd + v</td> <td>Cmd + V</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Ball object</td> <td>Toggle TIA Ball object</td>
<td>Alt + b</td> <td>Alt + B</td>
<td>Cmd + b</td> <td>Cmd + B</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Playfield object</td> <td>Toggle TIA Playfield object</td>
<td>Alt + n</td> <td>Alt + N</td>
<td>Cmd + n</td> <td>Cmd + N</td>
</tr> </tr>
<tr> <tr>
@ -1865,38 +1865,38 @@
<tr> <tr>
<td>Toggle TIA Player0 collisions</td> <td>Toggle TIA Player0 collisions</td>
<td>Shift-Alt + z</td> <td>Shift-Alt + Z</td>
<td>Shift-Cmd + z</td> <td>Shift-Cmd + Z</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Player1 collisions</td> <td>Toggle TIA Player1 collisions</td>
<td>Shift-Alt + x</td> <td>Shift-Alt + X</td>
<td>Shift-Cmd + x</td> <td>Shift-Cmd + X</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Missile0 collisions</td> <td>Toggle TIA Missile0 collisions</td>
<td>Shift-Alt + c</td> <td>Shift-Alt + C</td>
<td>Shift-Cmd + c</td> <td>Shift-Cmd + C</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Missile1 collisions</td> <td>Toggle TIA Missile1 collisions</td>
<td>Shift-Alt + v</td> <td>Shift-Alt + V</td>
<td>Shift-Cmd + v</td> <td>Shift-Cmd + V</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Ball collisions</td> <td>Toggle TIA Ball collisions</td>
<td>Shift-Alt + b</td> <td>Shift-Alt + B</td>
<td>Shift-Cmd + b</td> <td>Shift-Cmd + B</td>
</tr> </tr>
<tr> <tr>
<td>Toggle TIA Playfield collisions</td> <td>Toggle TIA Playfield collisions</td>
<td>Shift-Alt + n</td> <td>Shift-Alt + N</td>
<td>Shift-Cmd + n</td> <td>Shift-Cmd + N</td>
</tr> </tr>
<tr> <tr>
@ -1919,8 +1919,8 @@
<tr> <tr>
<td>Toggle TV 'Jitter' effect</td> <td>Toggle TV 'Jitter' effect</td>
<td>Alt + j</td> <td>Alt + J</td>
<td>Cmd + j</td> <td>Cmd + J</td>
</tr> </tr>
<tr> <tr>
<td colspan="3"><center><font size="-1"> <td colspan="3"><center><font size="-1">
@ -1988,14 +1988,14 @@
</tr> </tr>
<tr> <tr>
<td>Load <i>previous</i> game in ROM (multicart ROM)</td> <td>Load <i>previous</i> game in ROM (multicart ROM)</td>
<td>Shift-Control + r</td> <td>Shift-Control + R</td>
<td>Shift-Control + r</td> <td>Shift-Control + R</td>
</tr> </tr>
<tr> <tr>
<td>Reload current ROM (singlecart ROM)<br> <td>Reload current ROM (singlecart ROM)<br>
Load <i>next</i> game in ROM (multicart ROM)</td> Load <i>next</i> game in ROM (multicart ROM)</td>
<td>Control + r</td> <td>Control + R</td>
<td>Control + r</td> <td>Control + R</td>
</tr> </tr>
<tr> <tr>
<td>Emulate 'frying' effect</td> <td>Emulate 'frying' effect</td>
@ -2004,29 +2004,29 @@
</tr> </tr>
<tr> <tr>
<td><i>Decrease</i> emulation speed (disables 'Turbo' mode)</td> <td><i>Decrease</i> emulation speed (disables 'Turbo' mode)</td>
<td>Shift-Control + s</td> <td>Shift-Control + S</td>
<td>Shift-Control + s</td> <td>Shift-Control + S</td>
</tr> </tr>
<tr> <tr>
<td><i>Increase</i> emulation speed (disables 'Turbo' mode)</td> <td><i>Increase</i> emulation speed (disables 'Turbo' mode)</td>
<td>Control + s</td> <td>Control + S</td>
<td>Control + s</td> <td>Control + S</td>
</tr> </tr>
<tr> <tr>
<td>Toggle 'Turbo' mode (maximum emulation speed)</td> <td>Toggle 'Turbo' mode (maximum emulation speed)</td>
<td>Control + t</td> <td>Control + T</td>
<td>Control + t</td> <td>Control + T</td>
</tr> </tr>
<tr> <tr>
<td>Save continuous PNG snapshots</br>(per interval defined in <a href="#Snapshots"><b>Snapshot Settings</b></a>)</td> <td>Save continuous PNG snapshots</br>(per interval defined in <a href="#Snapshots"><b>Snapshot Settings</b></a>)</td>
<td>Control-Alt + s</td> <td>Control-Alt + S</td>
<td>Control-Cmd + s</td> <td>Control-Cmd + S</td>
</tr> </tr>
<tr> <tr>
<td>Save continuous PNG snapshots (every frame)</td> <td>Save continuous PNG snapshots (every frame)</td>
<td>Shift-Control-Alt + s</td> <td>Shift-Control-Alt + S</td>
<td>Shift-Control-Cmd + s</td> <td>Shift-Control-Cmd + S</td>
</tr> </tr>
<tr> <tr>
<td>Open the <a href="#HighScores"><b>High Scores</b></a> dialog.</td> <td>Open the <a href="#HighScores"><b>High Scores</b></a> dialog.</td>
@ -2035,13 +2035,13 @@
</tr> </tr>
<tr> <tr>
<td>Toggle 'Time Machine' mode</td> <td>Toggle 'Time Machine' mode</td>
<td>Alt + t</td> <td>Alt + T</td>
<td>Cmd + t</td> <td>Cmd + T</td>
</tr> </tr>
<tr> <tr>
<td>Enter/Exit the <a href="#TimeMachine"><b>Time Machine</b></a> dialog</td> <td>Enter/Exit the <a href="#TimeMachine"><b>Time Machine</b></a> dialog</td>
<td>Shift + t to enter, Shift + t/Escape to exit and continue with emulation</td> <td>Shift + T to enter, Shift + T/Escape to exit and continue with emulation</td>
<td>Shift + t to enter, Shift + t/Escape to exit and continue with emulation</td> <td>Shift + T to enter, Shift + T/Escape to exit and continue with emulation</td>
</tr> </tr>
<tr> <tr>
<td>Playback the <a href="#TimeMachine"><b>Time Machine</b></a> from current state (without sound, from the TM dialog only)</td> <td>Playback the <a href="#TimeMachine"><b>Time Machine</b></a> from current state (without sound, from the TM dialog only)</td>
@ -2168,11 +2168,6 @@
<td>Control + Tab</td> <td>Control + Tab</td>
<td>Control + Tab</td> <td>Control + Tab</td>
</tr> </tr>
<tr>
<td>Go to parent directory</td>
<td>Backspace</td>
<td>Backspace</td>
</tr>
<tr> <tr>
<td>Toggle windowed/fullscreen mode</td> <td>Toggle windowed/fullscreen mode</td>
<td>Alt + Return</td> <td>Alt + Return</td>
@ -2180,8 +2175,37 @@
</tr> </tr>
<tr> <tr>
<td>Exit emulator</td> <td>Exit emulator</td>
<td>Control + q</td> <td>Control + Q</td>
<td>Cmd + q</td> <td>Cmd + Q</td>
</tr>
</table>
<p><b>Additional Launcher Keys (cannot be remapped)</b></p>
<table BORDER=2 cellpadding=4>
<tr>
<th>Function</th>
<th>Key (Standard)</th>
<th>Key (macOS)</th>
</tr>
<tr>
<td>Go to parent directory (also in other file dialogs)</td>
<td>Backspace</td>
<td>Backspace</td>
</tr>
<tr>
<td>Open Power-On options dialog</td>
<td>Control + P</td>
<td>Control + P</td>
</tr>
<tr>
<td>Open High Scores dialog (if available for selected ROM)</td>
<td>Control + H</td>
<td>Control + H</td>
</tr>
<tr>
<td>Reload ROM listing</td>
<td>Control + R</td>
<td>Control + R</td>
</tr> </tr>
</table> </table>
@ -2216,12 +2240,12 @@
<tr> <tr>
<td>Move cursor to beginning of line</td> <td>Move cursor to beginning of line</td>
<td>Home</td> <td>Home</td>
<td>Home, Control + a, Command + Left arrow</td> <td>Home, Control + A, Command + Left arrow</td>
</tr> </tr>
<tr> <tr>
<td>Move cursor to end of line</td> <td>Move cursor to end of line</td>
<td>End</td> <td>End</td>
<td>End, Control + e, Command + Right arrow</td> <td>End, Control + E, Command + Right arrow</td>
</tr> </tr>
<tr> <tr>
<td>Delete character to left of cursor</td> <td>Delete character to left of cursor</td>
@ -2230,28 +2254,28 @@
</tr> </tr>
<tr> <tr>
<td>Delete character to right of cursor</td> <td>Delete character to right of cursor</td>
<td>Delete, Control + d</td> <td>Delete, Control + D</td>
<td>Delete, Control + d</td> <td>Delete, Control + D</td>
</tr> </tr>
<tr> <tr>
<td>Delete word to left of cursor</td> <td>Delete word to left of cursor</td>
<td>Control + Backspace, Control + w</td> <td>Control + Backspace, Control + W</td>
<td>Option + Backspace, Control + w</td> <td>Option + Backspace, Control + W</td>
</tr> </tr>
<tr> <tr>
<td>Delete word to right of cursor</td> <td>Delete word to right of cursor</td>
<td>Control + Delete, Alt + d</td> <td>Control + Delete, Alt + D</td>
<td>Option + Delete</td> <td>Option + Delete</td>
</tr> </tr>
<tr> <tr>
<td>Delete all text to beginning of line</td> <td>Delete all text to beginning of line</td>
<td>Control + Home, Control + u</td> <td>Control + Home, Control + U</td>
<td>Command + Backspace, Control + u</td> <td>Command + Backspace, Control + U</td>
</tr> </tr>
<tr> <tr>
<td>Delete all text to end of line</td> <td>Delete all text to end of line</td>
<td>Control + End, Control + k</td> <td>Control + End, Control + K</td>
<td>Control + k</td> <td>Control + K</td>
</tr> </tr>
<tr> <tr>
<td>Select character to left of cursor</td> <td>Select character to left of cursor</td>
@ -2276,42 +2300,42 @@
<tr> <tr>
<td>Select all text to beginning of line</td> <td>Select all text to beginning of line</td>
<td>Shift + Home</td> <td>Shift + Home</td>
<td>Shift + Home, Shift-Control + a, Shift-Command + Left arrow</td> <td>Shift + Home, Shift-Control + A, Shift-Command + Left arrow</td>
</tr> </tr>
<tr> <tr>
<td>Select all text to end of line</td> <td>Select all text to end of line</td>
<td>Shift + End</td> <td>Shift + End</td>
<td>Shift + End, Shift-Control + e, Shift-Command + Right arrow</td> <td>Shift + End, Shift-Control + E, Shift-Command + Right arrow</td>
</tr> </tr>
<tr> <tr>
<td>Select all text</td> <td>Select all text</td>
<td>Control + a</td> <td>Control + A</td>
<td>Command + a</td> <td>Command + A</td>
</tr> </tr>
<tr> <tr>
<td>Cut selected text</td> <td>Cut selected text</td>
<td>Control + x, Shift + Delete</td> <td>Control + X, Shift + Delete</td>
<td>Command + x</td> <td>Command + X</td>
</tr> </tr>
<tr> <tr>
<td>Copy selected text</td> <td>Copy selected text</td>
<td>Control + c, Control + Insert</td> <td>Control + C, Control + Insert</td>
<td>Command + c</td> <td>Command + C</td>
</tr> </tr>
<tr> <tr>
<td>Paste at cursor and replace selection</td> <td>Paste at cursor and replace selection</td>
<td>Control + v, Shift + Insert</td> <td>Control + V, Shift + Insert</td>
<td>Command + v</td> <td>Command + V</td>
</tr> </tr>
<tr> <tr>
<td>Undo last operation</td> <td>Undo last operation</td>
<td>Control + z</td> <td>Control + Z</td>
<td>Command + z</td> <td>Command + Z</td>
</tr> </tr>
<tr> <tr>
<td>Redo last operation</td> <td>Redo last operation</td>
<td>Control + y, Shift-Control + z</td> <td>Control + Y, Shift-Control + Z</td>
<td>Command + y, Shift-Command + z</td> <td>Command + Y, Shift-Command + Z</td>
</tr> </tr>
</table> </table>
</br> </br>
@ -2939,12 +2963,12 @@
<tr> <tr>
<td><pre>-modcombo &lt;1|0&gt;</pre></td> <td><pre>-modcombo &lt;1|0&gt;</pre></td>
<td>Use modifier(Shift/Alt/Control) + x key combos. This is normally enabled, <td>Use modifier (Shift/Alt/Control/Cmd) + x key combos. This is normally enabled,
since the 'Quit' command is tied to 'Control + q'. However, there are times since the 'Quit' command is tied to 'Control + Q'. However, there are times
when you want to disable them.</br> when you want to disable them.</br>
E.g. a 2-player game is using either the 'f' or 'r' keys for movement, E.g. a 2-player game is using either the 'F' or 'R' keys for movement,
and pressing Control (for Fire) will perform an unwanted action and pressing Control (for Fire) will perform an unwanted action
associated with 'Control + r' or 'Control + f' default keys.</td> associated with 'Control + R' or 'Control + F' default keys.</td>
</tr> </tr>
<tr> <tr>
@ -3881,7 +3905,7 @@
Clicking 'Combo' will show a dialog similar to the following:</p> Clicking 'Combo' will show a dialog similar to the following:</p>
<img src="graphics/eventmapping_combo.png"> <img src="graphics/eventmapping_combo.png">
<p>In this dialog, you can assign various events to the selected combo event. <p>In this dialog, you can assign various events to the selected combo event.
Note that this simply assigns multiple events to the combo; you still need Note that this only assigns multiple events to the combo; you still need
to map the combo event itself to some action, as described in the 'remap an to map the combo event itself to some action, as described in the 'remap an
event' section above.</p> event' section above.</p>
@ -4034,14 +4058,14 @@
</td> </td>
</tr> </tr>
</table> </table>
<p>This dialog can also be opened by pressing 'Control + p'.</p> <p>This dialog can also be opened by pressing 'Control + P'.</p>
</li> </li>
<li><b>High scores</b>: This option displays the <a href="#HighScores"> <li><b>High scores</b>: This option displays the <a href="#HighScores">
High Scores</a> dialog for the selected ROM. Only available if high score High Scores</a> dialog for the selected ROM. Only available if high score
properties have been setup for the ROM. Also available via 'Control + h' keys combo.</li> properties have been setup for the ROM. Also available via 'Control + H' keys combo.</li>
</li> </li>
<br><li><b>Reload listing</b>: Selecting this performs a reload of the <br><li><b>Reload listing</b>: Selecting this performs a reload of the
current listing. It is an alternative to pressing the 'Control + r' current listing. It is an alternative to pressing the 'Control + R'
key combo.</li> key combo.</li>
</ol></p> </ol></p>
</blockquote></br> </blockquote></br>

View File

@ -49,8 +49,8 @@ class PhysicalJoystickHandler
private: private:
struct StickInfo struct StickInfo
{ {
StickInfo(const nlohmann::json& map = nullptr, PhysicalJoystickPtr stick = nullptr) StickInfo(nlohmann::json map, PhysicalJoystickPtr stick = nullptr)
: mapping{map}, joy{std::move(stick)} { } : mapping(map), joy{std::move(stick)} {}
nlohmann::json mapping; nlohmann::json mapping;
PhysicalJoystickPtr joy; PhysicalJoystickPtr joy;

View File

@ -47,6 +47,7 @@ using uInt64 = uint64_t;
#include <iomanip> #include <iomanip>
#include <memory> #include <memory>
#include <string> #include <string>
#include <string_view>
#include <sstream> #include <sstream>
#include <cstring> #include <cstring>
#include <cctype> #include <cctype>
@ -60,6 +61,7 @@ using std::cout;
using std::cerr; using std::cerr;
using std::endl; using std::endl;
using std::string; using std::string;
using std::string_view;
using std::istream; using std::istream;
using std::ostream; using std::ostream;
using std::fstream; using std::fstream;
@ -200,51 +202,47 @@ namespace BSPF
catch(...) { return defaultValue; } catch(...) { return defaultValue; }
} }
// Compare two strings, ignoring case // Compare two strings (case insensitive)
inline int compareIgnoreCase(const string& s1, const string& s2) // Return negative, zero, positive result for <,==,> respectively
static constexpr int compareIgnoreCase(string_view s1, string_view s2)
{ {
#if (defined BSPF_WINDOWS || defined __WIN32__) && !defined __GNUG__ // Only compare up to the length of the shorter string
return _stricmp(s1.c_str(), s2.c_str()); const auto maxsize = std::min(s1.size(), s2.size());
#else for(size_t i = 0; i < maxsize; ++i)
return strcasecmp(s1.c_str(), s2.c_str()); if(toupper(s1[i]) != toupper(s2[i]))
#endif return toupper(s1[i]) - toupper(s2[i]);
}
inline int compareIgnoreCase(const char* s1, const char* s2)
{
#if (defined BSPF_WINDOWS || defined __WIN32__) && !defined __GNUG__
return _stricmp(s1, s2);
#else
return strcasecmp(s1, s2);
#endif
}
// Test whether the first string starts with the second one (case insensitive) // Otherwise the length of the string takes priority
inline bool startsWithIgnoreCase(const string& s1, const string& s2) return static_cast<int>(s1.size() - s2.size());
{
#if (defined BSPF_WINDOWS || defined __WIN32__) && !defined __GNUG__
return _strnicmp(s1.c_str(), s2.c_str(), s2.length()) == 0;
#else
return strncasecmp(s1.c_str(), s2.c_str(), s2.length()) == 0;
#endif
}
inline bool startsWithIgnoreCase(const char* s1, const char* s2)
{
#if (defined BSPF_WINDOWS || defined __WIN32__) && !defined __GNUG__
return _strnicmp(s1, s2, strlen(s2)) == 0;
#else
return strncasecmp(s1, s2, strlen(s2)) == 0;
#endif
} }
// Test whether two strings are equal (case insensitive) // Test whether two strings are equal (case insensitive)
inline bool equalsIgnoreCase(const string& s1, const string& s2) inline constexpr bool equalsIgnoreCase(string_view s1, string_view s2)
{ {
return compareIgnoreCase(s1, s2) == 0; return s1.size() == s2.size() ? (compareIgnoreCase(s1, s2) == 0) : false;
}
// Test whether the first string starts with the second one (case insensitive)
inline constexpr bool startsWithIgnoreCase(string_view s1, string_view s2)
{
if(s1.size() >= s2.size())
return compareIgnoreCase(s1.substr(0, s2.size()), s2) == 0;
return false;
}
// Test whether the first string ends with the second one (case insensitive)
inline constexpr bool endsWithIgnoreCase(string_view s1, string_view s2)
{
if(s1.size() >= s2.size())
return compareIgnoreCase(s1.substr(s1.size() - s2.size()), s2) == 0;
return false;
} }
// Find location (if any) of the second string within the first, // Find location (if any) of the second string within the first,
// starting from 'startpos' in the first string // starting from 'startpos' in the first string
inline size_t findIgnoreCase(const string& s1, const string& s2, size_t startpos = 0) static size_t findIgnoreCase(const string& s1, const string& s2, size_t startpos = 0)
{ {
auto pos = std::search(s1.cbegin()+startpos, s1.cend(), auto pos = std::search(s1.cbegin()+startpos, s1.cend(),
s2.cbegin(), s2.cend(), [](char ch1, char ch2) { s2.cbegin(), s2.cend(), [](char ch1, char ch2) {
@ -253,17 +251,6 @@ namespace BSPF
return pos == s1.cend() ? string::npos : pos - (s1.cbegin()+startpos); return pos == s1.cend() ? string::npos : pos - (s1.cbegin()+startpos);
} }
// Test whether the first string ends with the second one (case insensitive)
inline bool endsWithIgnoreCase(const string& s1, const string& s2)
{
if(s1.length() >= s2.length())
{
const char* end = s1.c_str() + s1.length() - s2.length();
return compareIgnoreCase(end, s2.c_str()) == 0;
}
return false;
}
// Test whether the first string contains the second one (case insensitive) // Test whether the first string contains the second one (case insensitive)
inline bool containsIgnoreCase(const string& s1, const string& s2) inline bool containsIgnoreCase(const string& s1, const string& s2)
{ {
@ -275,12 +262,12 @@ namespace BSPF
// - the following characters must appear in the order of the first string // - the following characters must appear in the order of the first string
inline bool matches(const string& s1, const string& s2) inline bool matches(const string& s1, const string& s2)
{ {
if(BSPF::startsWithIgnoreCase(s1, s2.substr(0, 1))) if(startsWithIgnoreCase(s1, s2.substr(0, 1)))
{ {
size_t pos = 1; size_t pos = 1;
for(uInt32 j = 1; j < s2.size(); ++j) for(uInt32 j = 1; j < s2.size(); ++j)
{ {
size_t found = BSPF::findIgnoreCase(s1, s2.substr(j, 1), pos); size_t found = findIgnoreCase(s1, s2.substr(j, 1), pos);
if(found == string::npos) if(found == string::npos)
return false; return false;
pos += found + 1; pos += found + 1;
@ -303,6 +290,14 @@ namespace BSPF
} }
} }
// Trim leading and trailing whitespace from a string
inline string trim(const string& str)
{
string::size_type first = str.find_first_not_of(' ');
return (first == string::npos) ? EmptyString :
str.substr(first, str.find_last_not_of(' ')-first+1);
}
// C++11 way to get local time // C++11 way to get local time
// Equivalent to the C-style localtime() function, but is thread-safe // Equivalent to the C-style localtime() function, but is thread-safe
inline std::tm localTime() inline std::tm localTime()

View File

@ -18,15 +18,6 @@
#include "KeyValueRepositoryConfigfile.hxx" #include "KeyValueRepositoryConfigfile.hxx"
#include "Logger.hxx" #include "Logger.hxx"
namespace {
string trim(const string& str)
{
string::size_type first = str.find_first_not_of(' ');
return (first == string::npos) ? EmptyString :
str.substr(first, str.find_last_not_of(' ')-first+1);
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyValueRepositoryConfigfile::KeyValueRepositoryConfigfile(const FilesystemNode& file) KeyValueRepositoryConfigfile::KeyValueRepositoryConfigfile(const FilesystemNode& file)
: myFile{file} : myFile{file}
@ -67,8 +58,8 @@ std::map<string, Variant> KeyValueRepositoryConfigfile::load()
continue; continue;
// Split the line into key/value pairs and trim any whitespace // Split the line into key/value pairs and trim any whitespace
key = trim(line.substr(0, equalPos)); key = BSPF::trim(line.substr(0, equalPos));
value = trim(line.substr(equalPos + 1, line.length() - key.length() - 1)); value = BSPF::trim(line.substr(equalPos + 1, line.length() - key.length() - 1));
// Skip absent key // Skip absent key
if(key.length() == 0) if(key.length() == 0)

View File

@ -739,8 +739,10 @@ inline bool FrameBuffer::drawMessage()
if(myMsg.dirty) if(myMsg.dirty)
{ {
#ifdef DEBUG_BUILD
cerr << "m"; cerr << "m";
//cerr << "--- draw message ---" << endl; //cerr << "--- draw message ---" << endl;
#endif
// Draw the bounded box and text // Draw the bounded box and text
const Common::Rect& dst = myMsg.surface->dstRect(); const Common::Rect& dst = myMsg.surface->dstRect();

View File

@ -116,20 +116,6 @@ class Settings
void setPermanent(const string& key, const Variant& value); void setPermanent(const string& key, const Variant& value);
void setTemporary(const string& key, const Variant& value); void setTemporary(const string& key, const Variant& value);
// Trim leading and following whitespace from a string
static string trim(const string& str)
{
string::size_type first = str.find_first_not_of(' ');
return (first == string::npos) ? EmptyString :
str.substr(first, str.find_last_not_of(' ')-first+1);
}
// FIXME - Rework so that these aren't needed; hence no commenting added
const Options& getPermanentSettings() const
{ return myPermanentSettings; }
const Options& getTemporarySettings() const
{ return myTemporarySettings; }
private: private:
/** /**
This method must be called *after* settings have been fully loaded This method must be called *after* settings have been fully loaded

View File

@ -143,7 +143,7 @@ Common::Rect CheckListWidget::getEditRect() const
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CheckListWidget::getState(int line) bool CheckListWidget::getState(int line) const
{ {
if(line >= 0 && line < int(_stateList.size())) if(line >= 0 && line < int(_stateList.size()))
return _stateList[line]; return _stateList[line];

View File

@ -39,8 +39,8 @@ class CheckListWidget : public ListWidget
void setList(const StringList& list, const BoolArray& state); void setList(const StringList& list, const BoolArray& state);
void setLine(int line, const string& str, const bool& state); void setLine(int line, const string& str, const bool& state);
bool getState(int line); bool getState(int line) const;
bool getSelectedState() { return getState(_selectedItem); } bool getSelectedState() const { return getState(_selectedItem); }
private: private:
bool handleEvent(Event::Type e) override; bool handleEvent(Event::Type e) override;

View File

@ -28,8 +28,8 @@ ColorWidget::ColorWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int cmd, bool framed) int x, int y, int w, int h, int cmd, bool framed)
: Widget(boss, font, x, y, w, h), : Widget(boss, font, x, y, w, h),
CommandSender(boss), CommandSender(boss),
_framed(framed), _framed{framed},
_cmd(cmd) _cmd{cmd}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS; _flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS;
} }

View File

@ -48,7 +48,7 @@ class CommandSender
// and add methods addTarget/removeTarget. // and add methods addTarget/removeTarget.
public: public:
explicit CommandSender(CommandReceiver* target) explicit CommandSender(CommandReceiver* target)
: _target(target) { } : _target{target} { }
virtual ~CommandSender() = default; virtual ~CommandSender() = default;

View File

@ -31,9 +31,9 @@ ContextMenu::ContextMenu(GuiObject* boss, const GUI::Font& font,
const VariantList& items, int cmd, int width) const VariantList& items, int cmd, int width)
: Dialog(boss->instance(), boss->parent(), font), : Dialog(boss->instance(), boss->parent(), font),
CommandSender(boss), CommandSender(boss),
_rowHeight(font.getLineHeight()), _rowHeight{font.getLineHeight()},
_cmd(cmd), _cmd{cmd},
_maxWidth(width) _maxWidth{width}
{ {
setArrows(); setArrows();
addItems(items); addItems(items);

View File

@ -130,7 +130,7 @@ class ContextMenu : public Dialog, public CommandSender
int _id{-1}; int _id{-1};
uInt32 _xorig{0}, _yorig{0}; uInt32 _xorig{0}, _yorig{0};
uInt32 _maxWidth{0}; int _maxWidth{0};
int _textOfs{0}; int _textOfs{0};
int _arrowSize{0}; int _arrowSize{0};

View File

@ -148,7 +148,7 @@ class DeveloperDialog : public Dialog
CheckboxWidget* myGhostReadsTrapWidget{nullptr}; CheckboxWidget* myGhostReadsTrapWidget{nullptr};
#endif #endif
bool mySettings; bool mySettings{false};
// Emulator sets // Emulator sets
std::array<bool, 2> myFrameStats; std::array<bool, 2> myFrameStats;
std::array<bool, 2> myDetectedInfo; std::array<bool, 2> myDetectedInfo;

View File

@ -49,8 +49,8 @@
Dialog::Dialog(OSystem& instance, DialogContainer& parent, const GUI::Font& font, Dialog::Dialog(OSystem& instance, DialogContainer& parent, const GUI::Font& font,
const string& title, int x, int y, int w, int h) const string& title, int x, int y, int w, int h)
: GuiObject(instance, parent, *this, x, y, w, h), : GuiObject(instance, parent, *this, x, y, w, h),
_font(font), _font{font},
_title(title) _title{title}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_BORDER | Widget::FLAG_CLEARBG; _flags = Widget::FLAG_ENABLED | Widget::FLAG_BORDER | Widget::FLAG_CLEARBG;
setTitle(title); setTitle(title);
@ -244,7 +244,9 @@ void Dialog::redraw(bool force)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Dialog::render() void Dialog::render()
{ {
#ifdef DEBUG_BUILD
//cerr << " render " << typeid(*this).name() << endl; //cerr << " render " << typeid(*this).name() << endl;
#endif
// Update dialog surface; also render any extra surfaces // Update dialog surface; also render any extra surfaces
// Extra surfaces must be rendered afterwards, so they are drawn on top // Extra surfaces must be rendered afterwards, so they are drawn on top
@ -263,8 +265,6 @@ void Dialog::render()
if(!onTop) if(!onTop)
{ {
//cerr << " shade " << typeid(*this).name() << endl;
_shadeSurface->setDstRect(_surface->dstRect()); _shadeSurface->setDstRect(_surface->dstRect());
_shadeSurface->render(); _shadeSurface->render();
} }
@ -433,8 +433,10 @@ void Dialog::drawDialog()
if(isDirty()) if(isDirty())
{ {
cerr << endl << "d"; #ifdef DEBUG_BUILD
//cerr << "*** draw dialog " << typeid(*this).name() << " ***" << endl; //cerr << "*** draw dialog " << typeid(*this).name() << " ***" << endl;
cerr << endl << "d";
#endif
if(clearsBackground()) if(clearsBackground())
{ {
@ -453,7 +455,9 @@ void Dialog::drawDialog()
} }
else { else {
s.invalidate(); s.invalidate();
#ifdef DEBUG_BUILD
//cerr << "invalidate " << typeid(*this).name() << endl; //cerr << "invalidate " << typeid(*this).name() << endl;
#endif
} }
if(hasBorder()) // currently only used by Dialog itself if(hasBorder()) // currently only used by Dialog itself
s.frameRect(_x, _y, _w, _h, kColor); s.frameRect(_x, _y, _w, _h, kColor);
@ -463,8 +467,10 @@ void Dialog::drawDialog()
clearDirty(); clearDirty();
} }
#ifdef DEBUG_BUILD
else else
cerr << endl; cerr << endl;
#endif
// Draw all children // Draw all children
drawChain(); drawChain();

View File

@ -213,7 +213,7 @@ class Dialog : public GuiObject
Widget* widget{nullptr}; Widget* widget{nullptr};
WidgetArray list; WidgetArray list;
explicit Focus(Widget* w = nullptr) : widget(w) { } explicit Focus(Widget* w = nullptr) : widget{w} { }
}; };
using FocusList = vector<Focus>; using FocusList = vector<Focus>;
@ -222,7 +222,7 @@ class Dialog : public GuiObject
FocusList focus; FocusList focus;
uInt32 currentTab{0}; uInt32 currentTab{0};
explicit TabFocus(TabWidget* w = nullptr) : widget(w) { } explicit TabFocus(TabWidget* w = nullptr) : widget{w} { }
void appendFocusList(WidgetArray& list); void appendFocusList(WidgetArray& list);
void saveCurrentFocus(Widget* w); void saveCurrentFocus(Widget* w);

View File

@ -28,7 +28,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DialogContainer::DialogContainer(OSystem& osystem) DialogContainer::DialogContainer(OSystem& osystem)
: myOSystem(osystem) : myOSystem{osystem}
{ {
_DOUBLE_CLICK_DELAY = osystem.settings().getInt("mdouble"); _DOUBLE_CLICK_DELAY = osystem.settings().getInt("mdouble");
_REPEAT_INITIAL_DELAY = osystem.settings().getInt("ctrldelay"); _REPEAT_INITIAL_DELAY = osystem.settings().getInt("ctrldelay");
@ -94,8 +94,9 @@ void DialogContainer::draw(bool full)
{ {
if(myDialogStack.empty()) if(myDialogStack.empty())
return; return;
#ifdef DEBUG_BUILD
//cerr << "draw " << full << " " << typeid(*this).name() << endl; //cerr << "draw " << full << " " << typeid(*this).name() << endl;
#endif
// Draw and render all dirty dialogs // Draw and render all dirty dialogs
myDialogStack.applyAll([&](Dialog*& d) { myDialogStack.applyAll([&](Dialog*& d) {
@ -118,8 +119,9 @@ void DialogContainer::render()
{ {
if(myDialogStack.empty()) if(myDialogStack.empty())
return; return;
#ifdef DEBUG_BUILD
//cerr << "full re-render " << typeid(*this).name() << endl; //cerr << "full re-render " << typeid(*this).name() << endl;
#endif
// Make sure we start in a clean state (with zero'ed buffers) // Make sure we start in a clean state (with zero'ed buffers)
if(!myOSystem.eventHandler().inTIAMode()) if(!myOSystem.eventHandler().inTIAMode())
@ -171,7 +173,9 @@ void DialogContainer::removeDialog()
{ {
if(!myDialogStack.empty()) if(!myDialogStack.empty())
{ {
#ifdef DEBUG_BUILD
//cerr << "remove dialog " << typeid(*myDialogStack.top()).name() << endl; //cerr << "remove dialog " << typeid(*myDialogStack.top()).name() << endl;
#endif
myDialogStack.pop(); myDialogStack.pop();
// Inform the frame buffer that it has to render all surfaces // Inform the frame buffer that it has to render all surfaces

View File

@ -40,7 +40,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font,
EventMode mode) EventMode mode)
: Widget(boss, font, x, y, w, h), : Widget(boss, font, x, y, w, h),
CommandSender(boss), CommandSender(boss),
myEventMode(mode) myEventMode{mode}
{ {
const int fontHeight = font.getFontHeight(), const int fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight(), lineHeight = font.getLineHeight(),

View File

@ -28,7 +28,7 @@
FileListWidget::FileListWidget(GuiObject* boss, const GUI::Font& font, FileListWidget::FileListWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h) int x, int y, int w, int h)
: StringListWidget(boss, font, x, y, w, h), : StringListWidget(boss, font, x, y, w, h),
_filter([](const FilesystemNode& node) { return true; }) _filter{[](const FilesystemNode& node) { return true; }}
{ {
// This widget is special, in that it catches signals and redirects them // This widget is special, in that it catches signals and redirects them
setTarget(this); setTarget(this);

View File

@ -89,7 +89,7 @@ class FileListWidget : public StringListWidget
const FilesystemNode& currentDir() const { return _node; } const FilesystemNode& currentDir() const { return _node; }
static void setQuickSelectDelay(uInt64 time) { _QUICK_SELECT_DELAY = time; } static void setQuickSelectDelay(uInt64 time) { _QUICK_SELECT_DELAY = time; }
uInt64 getQuickSelectDelay() { return _QUICK_SELECT_DELAY; } uInt64 getQuickSelectDelay() const { return _QUICK_SELECT_DELAY; }
ProgressDialog& progress(); ProgressDialog& progress();
void incProgress(); void incProgress();

View File

@ -26,7 +26,7 @@ namespace GUI {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Font::Font(const FontDesc& desc) Font::Font(const FontDesc& desc)
: myFontDesc(desc) : myFontDesc{desc}
{ {
} }

View File

@ -92,7 +92,7 @@ GameInfoDialog::GameInfoDialog(
myTab->setActiveTab(0); myTab->setActiveTab(0);
// Add Defaults, OK and Cancel buttons // Add Defaults, OK and Cancel buttons
addDefaultsOKCancelBGroup(wid, font); addDefaultsExtraOKCancelBGroup(wid, font, "Save", kSavePressed);
addBGroupToFocusList(wid); addBGroupToFocusList(wid);
} }

View File

@ -70,10 +70,10 @@ class GuiObject : public CommandReceiver
public: public:
GuiObject(OSystem& osystem, DialogContainer& parent, Dialog& dialog, GuiObject(OSystem& osystem, DialogContainer& parent, Dialog& dialog,
int x, int y, int w, int h) int x, int y, int w, int h)
: myOSystem(osystem), : myOSystem{osystem},
myParent(parent), myParent{parent},
myDialog(dialog), myDialog{dialog},
_x(x), _y(y), _w(w), _h(h) { } _x{x}, _y{y}, _w{w}, _h{h} { }
~GuiObject() override = default; ~GuiObject() override = default;

View File

@ -35,7 +35,6 @@ class Serializer;
using json = nlohmann::json; using json = nlohmann::json;
/** /**
The dialog for displaying high scores in Stella. The dialog for displaying high scores in Stella.

View File

@ -41,8 +41,8 @@
InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent, InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font, int max_w, int max_h) const GUI::Font& font, int max_w, int max_h)
: Dialog(osystem, parent, font, "Input settings"), : Dialog(osystem, parent, font, "Input settings"),
myMaxWidth(max_w), myMaxWidth{max_w},
myMaxHeight(max_h) myMaxHeight{max_h}
{ {
const int lineHeight = _font.getLineHeight(), const int lineHeight = _font.getLineHeight(),
fontWidth = _font.getMaxCharWidth(), fontWidth = _font.getMaxCharWidth(),

View File

@ -28,7 +28,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Launcher::Launcher(OSystem& osystem) Launcher::Launcher(OSystem& osystem)
: DialogContainer(osystem), : DialogContainer(osystem),
mySize(myOSystem.settings().getSize("launcherres")) mySize{myOSystem.settings().getSize("launcherres")}
{ {
const Common::Size& d = myOSystem.frameBuffer().desktopSize(); const Common::Size& d = myOSystem.frameBuffer().desktopSize();
double overscan = 1 - myOSystem.settings().getInt("tia.fs_overscan") / 100.0; double overscan = 1 - myOSystem.settings().getInt("tia.fs_overscan") / 100.0;

View File

@ -28,7 +28,7 @@
ListWidget::ListWidget(GuiObject* boss, const GUI::Font& font, ListWidget::ListWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, bool useScrollbar) int x, int y, int w, int h, bool useScrollbar)
: EditableWidget(boss, font, x, y, 16, 16), : EditableWidget(boss, font, x, y, 16, 16),
_useScrollbar(useScrollbar) _useScrollbar{useScrollbar}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS; _flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG | Widget::FLAG_RETAIN_FOCUS;
_bgcolor = kWidColor; _bgcolor = kWidColor;

View File

@ -33,8 +33,8 @@ MessageBox::MessageBox(GuiObject* boss, const GUI::Font& font,
bool focusOKButton) bool focusOKButton)
: Dialog(boss->instance(), boss->parent(), font, title, 0, 0, max_w, max_h), : Dialog(boss->instance(), boss->parent(), font, title, 0, 0, max_w, max_h),
CommandSender(boss), CommandSender(boss),
myOkCmd(okCmd), myOkCmd{okCmd},
myCancelCmd(cancelCmd) myCancelCmd{cancelCmd}
{ {
addText(font, text); addText(font, text);

View File

@ -82,6 +82,7 @@ void MessageDialog::setMessage(const string& title, const string& text, bool yes
setMessage(title, StringParser(text).stringList(), yesNo); setMessage(title, StringParser(text).stringList(), yesNo);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string MessageDialog::myTitle = ""; string MessageDialog::myTitle = "";
StringList MessageDialog::myText; StringList MessageDialog::myText;
bool MessageDialog::myYesNo = false; bool MessageDialog::myYesNo = false;

View File

@ -26,36 +26,36 @@ class OSystem;
class MessageDialog : public Dialog class MessageDialog : public Dialog
{ {
public: public:
MessageDialog(OSystem& osystem, DialogContainer& parent, MessageDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font, int max_w, int max_h); const GUI::Font& font, int max_w, int max_h);
~MessageDialog() override; ~MessageDialog() override;
// Define the message displayed // Define the message displayed
void setMessage(const string& title, const string& text, bool yesNo = false); void setMessage(const string& title, const string& text, bool yesNo = false);
void setMessage(const string& title, const StringList& text, bool yesNo = false); void setMessage(const string& title, const StringList& text, bool yesNo = false);
bool confirmed() { return myConfirmed; } bool confirmed() { return myConfirmed; }
protected: protected:
void loadConfig() override; void loadConfig() override;
void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
private: private:
static string myTitle; static string myTitle;
static StringList myText; static StringList myText;
static bool myYesNo; static bool myYesNo;
static bool myConfirmed; static bool myConfirmed;
// Show a message // Show a message
GUI::MessageBox* myMsg{nullptr}; GUI::MessageBox* myMsg{nullptr};
private: private:
// Following constructors and assignment operators not supported // Following constructors and assignment operators not supported
MessageDialog() = delete; MessageDialog() = delete;
MessageDialog(const MessageDialog&) = delete; MessageDialog(const MessageDialog&) = delete;
MessageDialog(MessageDialog&&) = delete; MessageDialog(MessageDialog&&) = delete;
MessageDialog& operator=(const MessageDialog&) = delete; MessageDialog& operator=(const MessageDialog&) = delete;
MessageDialog& operator=(MessageDialog&&) = delete; MessageDialog& operator=(MessageDialog&&) = delete;
}; };
#endif #endif

View File

@ -49,8 +49,8 @@
OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent, OptionsDialog::OptionsDialog(OSystem& osystem, DialogContainer& parent,
GuiObject* boss, int max_w, int max_h, Menu::AppMode mode) GuiObject* boss, int max_w, int max_h, Menu::AppMode mode)
: Dialog(osystem, parent, osystem.frameBuffer().font(), "Options"), : Dialog(osystem, parent, osystem.frameBuffer().font(), "Options"),
myBoss(boss), myBoss{boss},
myMode(mode) myMode{mode}
{ {
// do not show basic settings options in debugger // do not show basic settings options in debugger
bool minSettings = osystem.settings().getBool("minimal_ui") && mode != Menu::AppMode::debugger; bool minSettings = osystem.settings().getBool("minimal_ui") && mode != Menu::AppMode::debugger;

View File

@ -71,7 +71,7 @@ class OptionsDialog : public Dialog
ButtonWidget* myGameInfoButton{nullptr}; ButtonWidget* myGameInfoButton{nullptr};
ButtonWidget* myCheatCodeButton{nullptr}; ButtonWidget* myCheatCodeButton{nullptr};
GuiObject* myBoss; GuiObject* myBoss{nullptr};
// Indicates if this dialog is used for global (vs. in-game) settings // Indicates if this dialog is used for global (vs. in-game) settings
Menu::AppMode myMode{Menu::AppMode::emulator}; Menu::AppMode myMode{Menu::AppMode::emulator};

View File

@ -29,8 +29,8 @@ PopUpWidget::PopUpWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, const VariantList& list, int x, int y, int w, int h, const VariantList& list,
const string& label, int labelWidth, int cmd) const string& label, int labelWidth, int cmd)
: EditableWidget(boss, font, x, y - 1, w, h + 2), : EditableWidget(boss, font, x, y - 1, w, h + 2),
_label(label), _label{label},
_labelWidth(labelWidth) _labelWidth{labelWidth}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_RETAIN_FOCUS _flags = Widget::FLAG_ENABLED | Widget::FLAG_RETAIN_FOCUS
| Widget::FLAG_TRACK_MOUSE; | Widget::FLAG_TRACK_MOUSE;
@ -247,7 +247,6 @@ void PopUpWidget::setArrow()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void PopUpWidget::drawWidget(bool hilite) void PopUpWidget::drawWidget(bool hilite)
{ {
//cerr << "PopUpWidget::drawWidget\n";
FBSurface& s = dialog().surface(); FBSurface& s = dialog().surface();
int x = _x + _labelWidth; int x = _x + _labelWidth;

View File

@ -30,7 +30,7 @@
ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font, ProgressDialog::ProgressDialog(GuiObject* boss, const GUI::Font& font,
const string& message) const string& message)
: Dialog(boss->instance(), boss->parent()), : Dialog(boss->instance(), boss->parent()),
myFont(font) myFont{font}
{ {
const int fontWidth = font.getMaxCharWidth(), const int fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(), fontHeight = font.getFontHeight(),

View File

@ -29,7 +29,7 @@
QuadTariDialog::QuadTariDialog(GuiObject* boss, const GUI::Font& font, int max_w, int max_h, QuadTariDialog::QuadTariDialog(GuiObject* boss, const GUI::Font& font, int max_w, int max_h,
Properties& properties) Properties& properties)
: Dialog(boss->instance(), boss->parent(), font, "QuadTari controllers", 0, 0, max_w, max_h), : Dialog(boss->instance(), boss->parent(), font, "QuadTari controllers", 0, 0, max_w, max_h),
myGameProperties(properties) myGameProperties{properties}
{ {
const int lineHeight = font.getLineHeight(), const int lineHeight = font.getLineHeight(),
fontHeight = font.getFontHeight(), fontHeight = font.getFontHeight(),

View File

@ -221,8 +221,8 @@ RadioButtonWidget::RadioButtonWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, const string& label, int x, int y, const string& label,
RadioButtonGroup* group, int cmd) RadioButtonGroup* group, int cmd)
: CheckboxWidget(boss, font, x, y, label, cmd), : CheckboxWidget(boss, font, x, y, label, cmd),
myGroup(group), myGroup{group},
_buttonSize(buttonSize(font)) // 14 | 22 _buttonSize{buttonSize(font)} // 14 | 22
{ {
_flags = Widget::FLAG_ENABLED; _flags = Widget::FLAG_ENABLED;
_bgcolor = _bgcolorhi = kWidColor; _bgcolor = _bgcolorhi = kWidColor;

View File

@ -40,7 +40,7 @@ class RadioButtonWidget : public CheckboxWidget
protected: protected:
void setFill(FillType type); void setFill(FillType type);
void drawWidget(bool hilite) override; void drawWidget(bool hilite) override;
static int buttonSize(const GUI::Font& font) static uInt32 buttonSize(const GUI::Font& font)
{ {
return font.getFontHeight() < 24 ? 14 : 22; // box is square return font.getFontHeight() < 24 ? 14 : 22; // box is square
} }

View File

@ -37,9 +37,9 @@
RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent, RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font, int max_w, int max_h) const GUI::Font& font, int max_w, int max_h)
: Dialog(osystem, parent, font, "Audit ROMs"), : Dialog(osystem, parent, font, "Audit ROMs"),
myFont(font), myFont{font},
myMaxWidth(max_w), myMaxWidth{max_w},
myMaxHeight(max_h) myMaxHeight{max_h}
{ {
const int lineHeight = font.getLineHeight(), const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(), fontWidth = font.getMaxCharWidth(),

View File

@ -37,7 +37,7 @@ RomInfoWidget::RomInfoWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int x, int y, int w, int h,
const Common::Size& imgSize) const Common::Size& imgSize)
: Widget(boss, font, x, y, w, h), : Widget(boss, font, x, y, w, h),
myAvail(imgSize) myAvail{imgSize}
{ {
_flags = Widget::FLAG_ENABLED; _flags = Widget::FLAG_ENABLED;
_bgcolor = kDlgColor; _bgcolor = kDlgColor;

View File

@ -29,7 +29,7 @@
SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent, SnapshotDialog::SnapshotDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font, int max_w, int max_h) const GUI::Font& font, int max_w, int max_h)
: Dialog(osystem, parent, font, "Snapshot settings"), : Dialog(osystem, parent, font, "Snapshot settings"),
myFont(font) myFont{font}
{ {
const int lineHeight = font.getLineHeight(), const int lineHeight = font.getLineHeight(),
fontHeight = _font.getFontHeight(), fontHeight = _font.getFontHeight(),

View File

@ -32,7 +32,7 @@
StellaSettingsDialog::StellaSettingsDialog(OSystem& osystem, DialogContainer& parent, StellaSettingsDialog::StellaSettingsDialog(OSystem& osystem, DialogContainer& parent,
int max_w, int max_h, Menu::AppMode mode) int max_w, int max_h, Menu::AppMode mode)
: Dialog(osystem, parent, osystem.frameBuffer().font(), "Basic settings"), : Dialog(osystem, parent, osystem.frameBuffer().font(), "Basic settings"),
myMode(mode) myMode{mode}
{ {
const int buttonHeight = _font.getLineHeight() + _font.getLineHeight() / 5, const int buttonHeight = _font.getLineHeight() + _font.getLineHeight() / 5,
lineHeight = _font.getLineHeight(), lineHeight = _font.getLineHeight(),

View File

@ -27,7 +27,7 @@ StringListWidget::StringListWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, bool hilite, int x, int y, int w, int h, bool hilite,
bool useScrollbar) bool useScrollbar)
: ListWidget(boss, font, x, y, w, h, useScrollbar), : ListWidget(boss, font, x, y, w, h, useScrollbar),
_hilite(hilite) _hilite{hilite}
{ {
_bgcolorlo = kDlgColor; _bgcolorlo = kDlgColor;

View File

@ -83,7 +83,7 @@ class TabWidget : public Widget, public CommandSender
explicit Tab(const string& t, int tw = NO_WIDTH, explicit Tab(const string& t, int tw = NO_WIDTH,
Widget* first = nullptr, Widget* parent = nullptr, bool e = true) Widget* first = nullptr, Widget* parent = nullptr, bool e = true)
: title(t), firstWidget(first), parentWidget(parent), enabled(e), tabWidth(tw) { } : title{t}, firstWidget{first}, parentWidget{parent}, enabled{e}, tabWidth{tw} { }
}; };
using TabList = vector<Tab>; using TabList = vector<Tab>;

View File

@ -33,7 +33,7 @@ TimeLineWidget::TimeLineWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, int x, int y, int w, int h,
const string& label, uInt32 labelWidth, int cmd) const string& label, uInt32 labelWidth, int cmd)
: ButtonWidget(boss, font, x, y, w, h, label, cmd), : ButtonWidget(boss, font, x, y, w, h, label, cmd),
_labelWidth(labelWidth) _labelWidth{labelWidth}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_TRACK_MOUSE _flags = Widget::FLAG_ENABLED | Widget::FLAG_TRACK_MOUSE
| Widget::FLAG_CLEARBG | Widget::FLAG_NOBG; | Widget::FLAG_CLEARBG | Widget::FLAG_NOBG;
@ -143,8 +143,6 @@ void TimeLineWidget::drawWidget(bool hilite)
{ {
FBSurface& s = _boss->dialog().surface(); FBSurface& s = _boss->dialog().surface();
//cerr << "TimeLineWidget::drawWidget " << typeid(s).name() << endl;
// Draw the label, if any // Draw the label, if any
if(_labelWidth > 0) if(_labelWidth > 0)
s.drawString(_font, _label, _x, _y + 2, _labelWidth, s.drawString(_font, _label, _x, _y + 2, _labelWidth,
@ -205,13 +203,13 @@ void TimeLineWidget::drawWidget(bool hilite)
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt32 TimeLineWidget::valueToPos(uInt32 value) uInt32 TimeLineWidget::valueToPos(uInt32 value) const
{ {
return _stepValue[BSPF::clamp(value, _valueMin, _valueMax)]; return _stepValue[BSPF::clamp(value, _valueMin, _valueMax)];
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt32 TimeLineWidget::posToValue(uInt32 pos) uInt32 TimeLineWidget::posToValue(uInt32 pos) const
{ {
// Find the interval in which 'pos' falls, and then the endpoint which // Find the interval in which 'pos' falls, and then the endpoint which
// it is closest to // it is closest to

View File

@ -49,8 +49,8 @@ class TimeLineWidget : public ButtonWidget
void drawWidget(bool hilite) override; void drawWidget(bool hilite) override;
uInt32 valueToPos(uInt32 value); uInt32 valueToPos(uInt32 value) const;
uInt32 posToValue(uInt32 pos); uInt32 posToValue(uInt32 pos) const;
protected: protected:
uInt32 _value{0}; uInt32 _value{0};

View File

@ -23,7 +23,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TimeMachine::TimeMachine(OSystem& osystem) TimeMachine::TimeMachine(OSystem& osystem)
: DialogContainer(osystem), : DialogContainer(osystem),
myWidth(FBMinimum::Width) myWidth{FBMinimum::Width}
{ {
myBaseDialog = new TimeMachineDialog(myOSystem, *this, myWidth); myBaseDialog = new TimeMachineDialog(myOSystem, *this, myWidth);
} }

View File

@ -487,7 +487,7 @@ void TimeMachineDialog::initBar()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string TimeMachineDialog::getTimeString(uInt64 cycles) string TimeMachineDialog::getTimeString(uInt64 cycles) const
{ {
const Int32 scanlines = std::max<Int32>(instance().console().tia().scanlinesLastFrame(), 240); const Int32 scanlines = std::max<Int32>(instance().console().tia().scanlinesLastFrame(), 240);
const bool isNTSC = scanlines <= 287; const bool isNTSC = scanlines <= 287;

View File

@ -33,7 +33,7 @@ class TimeMachineDialog : public Dialog
/** set/get number of winds when entering the dialog */ /** set/get number of winds when entering the dialog */
void setEnterWinds(Int32 numWinds) { _enterWinds = numWinds; } void setEnterWinds(Int32 numWinds) { _enterWinds = numWinds; }
Int32 getEnterWinds() { return _enterWinds; } Int32 getEnterWinds() const { return _enterWinds; }
private: private:
void loadConfig() override; void loadConfig() override;
@ -48,7 +48,7 @@ class TimeMachineDialog : public Dialog
void setPosition() override; void setPosition() override;
/** convert cycles into time */ /** convert cycles into time */
string getTimeString(uInt64 cycles); string getTimeString(uInt64 cycles) const;
/** re/unwind and update display */ /** re/unwind and update display */
void handleWinds(Int32 numWinds = 0); void handleWinds(Int32 numWinds = 0);
/** toggle Time Machine mode */ /** toggle Time Machine mode */

View File

@ -27,7 +27,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ToolTip::ToolTip(Dialog& dialog, const GUI::Font& font) ToolTip::ToolTip(Dialog& dialog, const GUI::Font& font)
: myDialog(dialog) : myDialog{dialog}
{ {
myScale = myDialog.instance().frameBuffer().hidpiScaleFactor(); myScale = myDialog.instance().frameBuffer().hidpiScaleFactor();
@ -179,5 +179,5 @@ void ToolTip::show(const string& tip)
void ToolTip::render() void ToolTip::render()
{ {
if(myTipShown) if(myTipShown)
mySurface->render(); mySurface->render();
} }

View File

@ -42,8 +42,8 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font, GuiObject* boss, int max_w, int max_h) const GUI::Font& font, GuiObject* boss, int max_w, int max_h)
: Dialog(osystem, parent, font, "User interface settings"), : Dialog(osystem, parent, font, "User interface settings"),
CommandSender(boss), CommandSender(boss),
myFont(font), myFont{font},
myIsGlobal(boss != nullptr) myIsGlobal{boss != nullptr}
{ {
const GUI::Font& ifont = instance().frameBuffer().infoFont(); const GUI::Font& ifont = instance().frameBuffer().infoFont();
const int lineHeight = font.getLineHeight(), const int lineHeight = font.getLineHeight(),

View File

@ -19,7 +19,7 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UndoHandler::UndoHandler(size_t size) UndoHandler::UndoHandler(size_t size)
: mySize(size) : mySize{size}
{ {
reset(); reset();
} }

View File

@ -66,7 +66,7 @@ class VideoAudioDialog : public Dialog
void updateSettingsWithPreset(AudioSettings&); void updateSettingsWithPreset(AudioSettings&);
private: private:
TabWidget* myTab; TabWidget* myTab{nullptr};
// General options // General options
PopUpWidget* myRenderer{nullptr}; PopUpWidget* myRenderer{nullptr};

View File

@ -32,8 +32,8 @@
Widget::Widget(GuiObject* boss, const GUI::Font& font, Widget::Widget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h) int x, int y, int w, int h)
: GuiObject(boss->instance(), boss->parent(), boss->dialog(), x, y, w, h), : GuiObject(boss->instance(), boss->parent(), boss->dialog(), x, y, w, h),
_boss(boss), _boss{boss},
_font(font) _font{font}
{ {
// Insert into the widget list of the boss // Insert into the widget list of the boss
_next = _boss->_firstWidget; _next = _boss->_firstWidget;
@ -99,8 +99,10 @@ void Widget::draw()
if(isDirty()) if(isDirty())
{ {
#ifdef DEBUG_BUILD
//cerr << " *** draw widget " << typeid(*this).name() << " ***" << endl; //cerr << " *** draw widget " << typeid(*this).name() << " ***" << endl;
cerr << "w"; cerr << "w";
#endif
FBSurface& s = _boss->dialog().surface(); FBSurface& s = _boss->dialog().surface();
int oldX = _x, oldY = _y; int oldX = _x, oldY = _y;
@ -383,7 +385,9 @@ void Widget::setDirtyInChain(Widget* start)
{ {
while(start) while(start)
{ {
#ifdef DEBUG_BUILD
//cerr << "setDirtyInChain " << typeid(*start).name() << endl; //cerr << "setDirtyInChain " << typeid(*start).name() << endl;
#endif
start->setDirty(); start->setDirty();
start = start->_next; start = start->_next;
} }
@ -395,8 +399,8 @@ StaticTextWidget::StaticTextWidget(GuiObject* boss, const GUI::Font& font,
const string& text, TextAlign align, const string& text, TextAlign align,
ColorId shadowColor) ColorId shadowColor)
: Widget(boss, font, x, y, w, h), : Widget(boss, font, x, y, w, h),
_label(text), _label{text},
_align(align) _align{align}
{ {
_flags = Widget::FLAG_ENABLED | FLAG_CLEARBG; _flags = Widget::FLAG_ENABLED | FLAG_CLEARBG;
@ -464,8 +468,8 @@ ButtonWidget::ButtonWidget(GuiObject* boss, const GUI::Font& font,
const string& label, int cmd, bool repeat) const string& label, int cmd, bool repeat)
: StaticTextWidget(boss, font, x, y, w, h, label, TextAlign::Center), : StaticTextWidget(boss, font, x, y, w, h, label, TextAlign::Center),
CommandSender(boss), CommandSender(boss),
_cmd(cmd), _cmd{cmd},
_repeat(repeat) _repeat{repeat}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG; _flags = Widget::FLAG_ENABLED | Widget::FLAG_CLEARBG;
_bgcolor = kBtnColor; _bgcolor = kBtnColor;
@ -739,11 +743,11 @@ SliderWidget::SliderWidget(GuiObject* boss, const GUI::Font& font,
int valueLabelWidth, const string& valueUnit, int valueLabelGap, int valueLabelWidth, const string& valueUnit, int valueLabelGap,
bool forceLabelSign) bool forceLabelSign)
: ButtonWidget(boss, font, x, y, w, h, label, cmd), : ButtonWidget(boss, font, x, y, w, h, label, cmd),
_labelWidth(labelWidth), _labelWidth{labelWidth},
_valueUnit(valueUnit), _valueUnit{valueUnit},
_valueLabelGap(valueLabelGap), _valueLabelGap{valueLabelGap},
_valueLabelWidth(valueLabelWidth), _valueLabelWidth{valueLabelWidth},
_forceLabelSign(forceLabelSign) _forceLabelSign{forceLabelSign}
{ {
_flags = Widget::FLAG_ENABLED | Widget::FLAG_TRACK_MOUSE | Widget::FLAG_CLEARBG; _flags = Widget::FLAG_ENABLED | Widget::FLAG_TRACK_MOUSE | Widget::FLAG_CLEARBG;
_bgcolor = kDlgColor; _bgcolor = kDlgColor;

View File

@ -64,7 +64,7 @@ class FBSurfaceLIBRETRO : public FBSurface
void applyAttributes() override { } void applyAttributes() override { }
private: private:
uInt32 myWidth, myHeight; uInt32 myWidth{0}, myHeight{0};
unique_ptr<uInt32[]> myPixelData; unique_ptr<uInt32[]> myPixelData;
Common::Rect mySrcGUIR, myDstGUIR; Common::Rect mySrcGUIR, myDstGUIR;

View File

@ -101,7 +101,7 @@ else ifeq ($(platform), libnx)
include $(DEVKITPRO)/libnx/switch_rules include $(DEVKITPRO)/libnx/switch_rules
TARGET := $(TARGET_NAME)_libretro_$(platform).a TARGET := $(TARGET_NAME)_libretro_$(platform).a
DEFINES := -DSWITCH=1 -D__SWITCH__ -DARM DEFINES := -DSWITCH=1 -D__SWITCH__ -DARM
CXXFLAGS := $(DEFINES) -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -specs=$(LIBNX)/switch.specs CXXFLAGS += $(DEFINES) -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -specs=$(LIBNX)/switch.specs
CXXFLAGS += -march=armv8-a -mtune=cortex-a57 -mtp=soft -mcpu=cortex-a57+crc+fp+simd -ffast-math $(ASFLAGS) CXXFLAGS += -march=armv8-a -mtune=cortex-a57 -mtp=soft -mcpu=cortex-a57+crc+fp+simd -ffast-math $(ASFLAGS)
STATIC_LINKING = 1 STATIC_LINKING = 1

View File

@ -43,7 +43,7 @@ class StellaLIBRETRO
StellaLIBRETRO(); StellaLIBRETRO();
public: public:
OSystemLIBRETRO& osystem() { return *myOSystem; } OSystemLIBRETRO& osystem() const { return *myOSystem; }
bool create(bool logging); bool create(bool logging);
void destroy(); void destroy();

View File

@ -25,8 +25,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FilesystemNodePOSIX::FilesystemNodePOSIX() FilesystemNodePOSIX::FilesystemNodePOSIX()
: _path(ROOT_DIR), : _path{ROOT_DIR},
_displayName(_path) _displayName{_path}
{ {
} }

View File

@ -175,7 +175,7 @@ FilesystemNodeWINDOWS::FilesystemNodeWINDOWS()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FilesystemNodeWINDOWS::FilesystemNodeWINDOWS(const string& p) FilesystemNodeWINDOWS::FilesystemNodeWINDOWS(const string& p)
: _path(p.length() > 0 ? p : "~") // Default to home directory : _path{p.length() > 0 ? p : "~"} // Default to home directory
{ {
// Expand '~' to the users 'home' directory // Expand '~' to the users 'home' directory
if(_path[0] == '~') if(_path[0] == '~')