Legacy SDL UI: Add a screenshot command to the monitor (#6654)

* Legacy SDL UI: Add a screenshot monitor command

* Add new strings to 86box.pot
This commit is contained in:
Alexander Babikov
2026-01-02 01:06:30 +05:00
committed by GitHub
parent 5166d0d8c9
commit cce7f2cbc4
2 changed files with 15 additions and 0 deletions

View File

@@ -204,6 +204,15 @@ msgstr ""
msgid "Take s&creenshot"
msgstr ""
msgid "Take &raw screenshot"
msgstr ""
msgid "C&opy screenshot"
msgstr ""
msgid "Copy r&aw screenshot"
msgstr ""
msgid "S&ound"
msgstr ""

View File

@@ -1104,6 +1104,7 @@ unix_executeLine(char *line)
"moeject <id> - eject image from MO drive <id>.\n\n"
"hardreset - hard reset the emulated system.\n"
"pause - pause the the emulated system.\n"
"screenshot - save a screenshot.\n"
"fullscreen - toggle fullscreen.\n"
"version - print version and license information.\n"
"exit - exit " EMU_NAME ".\n");
@@ -1144,6 +1145,11 @@ unix_executeLine(char *line)
} else if (strncasecmp(xargv[0], "fullscreen", 10) == 0) {
video_fullscreen = video_fullscreen ? 0 : 1;
fullscreen_pending = 1;
} else if (strncasecmp(xargv[0], "screenshot", 10) == 0) {
startblit();
++monitors[0].mon_screenshots_raw;
endblit();
device_force_redraw();
} else if (strncasecmp(xargv[0], "pause", 5) == 0) {
plat_pause(dopause ^ 1);
printf("%s", dopause ? "Paused.\n" : "Unpaused.\n");