Pausing the emulator, including using the Pause key, now also releases mouse capture, closes #2293.

This commit is contained in:
OBattler
2022-08-02 02:57:00 +02:00
parent f5be05a19c
commit f96eb5a2fc
2 changed files with 8 additions and 2 deletions

View File

@@ -336,11 +336,15 @@ plat_pause(int p)
#endif
return;
}
if ((p == 0) && (time_sync & TIME_SYNC_ENABLED))
nvr_time_sync();
dopause = p;
if (p) {
if (mouse_capture)
plat_mouse_capture(0);
wcsncpy(oldtitle, ui_window_title(NULL), sizeof_w(oldtitle) - 1);
wcscpy(title, oldtitle);
paused_msg[QObject::tr(" - PAUSED").toWCharArray(paused_msg)] = 0;

View File

@@ -1491,13 +1491,15 @@ plat_pause(int p)
}
if (p) {
if (mouse_capture)
plat_mouse_capture(0);
wcsncpy(oldtitle, ui_window_title(NULL), sizeof_w(oldtitle) - 1);
wcscpy(title, oldtitle);
wcscat(title, plat_get_string(IDS_2051));
ui_window_title(title);
} else {
} else
ui_window_title(oldtitle);
}
/* If un-pausing, synchronize the internal clock with the host's time. */
if ((p == 0) && (time_sync & TIME_SYNC_ENABLED))