From 84a28bd7e8f97b93e006d25c79230bdfa2e2e812 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 13 Feb 2022 19:28:28 +0600 Subject: [PATCH] qt: Don't pause twice --- src/qt/qt_platform.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 27dab7f85..5a621a364 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -303,13 +303,20 @@ plat_pause(int p) static wchar_t oldtitle[512]; wchar_t title[512]; + if (p == dopause) { +#ifdef Q_OS_WINDOWS + if (source_hwnd) + PostMessage((HWND)(uintptr_t)source_hwnd, WM_SENDSTATUS, (WPARAM)!!p, (LPARAM)(HWND)main_window->winId()); +#endif + return; + } if ((p == 0) && (time_sync & TIME_SYNC_ENABLED)) nvr_time_sync(); dopause = p; if (p) { wcsncpy(oldtitle, ui_window_title(NULL), sizeof_w(oldtitle) - 1); - wcscpy(title, oldtitle); + wcscpy(title, oldtitle);twicr wcscat(title, L" - PAUSED -"); ui_window_title(title); } else {