From cce7f2cbc4c69e0984864877f17d823824a4fdaa Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Fri, 2 Jan 2026 01:06:30 +0500 Subject: [PATCH] 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 --- src/qt/languages/86box.pot | 9 +++++++++ src/unix/unix.c | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/src/qt/languages/86box.pot b/src/qt/languages/86box.pot index 1eeb6bfc7..e04c73f2a 100644 --- a/src/qt/languages/86box.pot +++ b/src/qt/languages/86box.pot @@ -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 "" diff --git a/src/unix/unix.c b/src/unix/unix.c index 97f8b972a..b417d38bd 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -1104,6 +1104,7 @@ unix_executeLine(char *line) "moeject - eject image from MO drive .\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");