diff --git a/src/unix/unix.c b/src/unix/unix.c index c3294aeb7..4051d5de2 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -647,7 +647,22 @@ char *local_strsep(char **str, const char *sep) return s; } +void +plat_pause(int p) +{ + static wchar_t oldtitle[512]; + wchar_t title[512]; + dopause = p; + if (p) { + wcsncpy(oldtitle, ui_window_title(NULL), sizeof_w(oldtitle) - 1); + wcscpy(title, oldtitle); + wcscat(title, L" - PAUSED -"); + ui_window_title(title); + } else { + ui_window_title(oldtitle); + } +} void monitor_thread(void* param) { @@ -683,6 +698,10 @@ void monitor_thread(void* param) { exit_event = 1; } + else if (strncasecmp(xargv[0], "pause", 5) == 0) + { + plat_pause(dopause ^ 1); + } else if (strncasecmp(xargv[0], "hardreset", 9) == 0) { pc_reset_hard();