]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Show [Paused] in window title when pause mode.
authorToni Wilen <twilen@winuae.net>
Sun, 16 Apr 2017 19:13:05 +0000 (22:13 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 16 Apr 2017 19:13:05 +0000 (22:13 +0300)
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32.cpp

index caafa550173431d873c4b4accfc9c0234f31feea..9e9382f940b24ff1e0bdcaa2f2d06fab8ef6a38a 100644 (file)
 #define IDS_SCREEN_ADAPTIVE_SYNC        409
 #define IDS_NUMSG_NOMEMORY              410
 #define IDS_EXPANSION_CATEGORY          411
+#define IDS_WINUAETITLE_PAUSED          412
 #define IDS_QS_MODELS                   1000
 #define IDS_QS_MODEL_A500               1001
 #define IDS_QS_MODEL_A500P              1002
index cd5e3e038d12bbec55bb24ec6324d9131139e6f0..8ddb62daa0ad9f697df1419672a78d6c8f98e005 100644 (file)
@@ -2091,6 +2091,7 @@ BEGIN
     IDS_SCREEN_ADAPTIVE_SYNC "Variable Sync"
     IDS_NUMSG_NOMEMORY      "Out of memory or too much Z3 autoconfig space configured.\nIf 64-bit, make sure RTG board is first in board list."
     IDS_EXPANSION_CATEGORY  "Built-in expansions\nSCSI controllers\nIDE controllers\nSASI controllers\nCustom controllers\nPCI bridgeboards\nx86 bridgeboards\nGraphics boards\nSound cards\nNetwork adapters\nDisk controllers"
+    IDS_WINUAETITLE_PAUSED  "[Paused]"
 END
 
 #endif    // English resources
index 5abe90a21a3737e10503cf7edd5dd687bededb69..ab9a39435f92dbd0b2e98351e7d3e38fee0ef7c5 100644 (file)
@@ -424,6 +424,50 @@ static void setcursor (int oldx, int oldy)
        SetCursorPos (cx, cy);
 }
 
+static int showcursor;
+
+extern TCHAR config_filename[256];
+
+static void setmaintitle (HWND hwnd)
+{
+       TCHAR txt[1000], txt2[500];
+
+#ifdef RETROPLATFORM
+       if (rp_isactive ())
+               return;
+#endif
+       txt[0] = 0;
+       inprec_getstatus (txt);
+       if (currprefs.config_window_title[0]) {
+               _tcscat (txt, currprefs.config_window_title);
+               _tcscat (txt, _T(" - "));
+       } else if (config_filename[0]) {
+               _tcscat (txt, _T("["));
+               _tcscat (txt, config_filename);
+               _tcscat (txt, _T("] - "));
+       }
+       _tcscat (txt, _T("WinUAE"));
+       txt2[0] = 0;
+       if (pause_emulation) {
+               WIN32GUI_LoadUIString (IDS_WINUAETITLE_PAUSED, txt2, sizeof (txt2) / sizeof (TCHAR));
+       } else if (mouseactive > 0) {
+               WIN32GUI_LoadUIString ((currprefs.input_mouse_untrap & MOUSEUNTRAP_MIDDLEBUTTON) ? IDS_WINUAETITLE_MMB : IDS_WINUAETITLE_NORMAL,
+                       txt2, sizeof (txt2) / sizeof (TCHAR));
+       }
+       if (_tcslen (WINUAEBETA) > 0) {
+               _tcscat (txt, BetaStr);
+               if (_tcslen (WINUAEEXTRA) > 0) {
+                       _tcscat (txt, _T(" "));
+                       _tcscat (txt, WINUAEEXTRA);
+               }
+       }
+       if (txt2[0]) {
+               _tcscat (txt, _T(" - "));
+               _tcscat (txt, txt2);
+       }
+       SetWindowText (hwnd, txt);
+}
+
 static int pausemouseactive;
 void resumesoundpaused (void)
 {
@@ -456,6 +500,7 @@ bool resumepaused (int priority)
        }
        pause_emulation = 0;
        setsystime ();
+       setmaintitle(hMainWnd);
        return true;
 }
 bool setpaused (int priority)
@@ -472,6 +517,7 @@ bool setpaused (int priority)
                pausemouseactive = mouseactive;
                setmouseactive (0);
        }
+       setmaintitle(hMainWnd);
        return true;
 }
 
@@ -489,48 +535,6 @@ void unsetminimized (void)
        clear_inhibit_frame (IHF_WINDOWHIDDEN);
 }
 
-static int showcursor;
-
-extern TCHAR config_filename[256];
-
-static void setmaintitle (HWND hwnd)
-{
-       TCHAR txt[1000], txt2[500];
-
-#ifdef RETROPLATFORM
-       if (rp_isactive ())
-               return;
-#endif
-       txt[0] = 0;
-       inprec_getstatus (txt);
-       if (currprefs.config_window_title[0]) {
-               _tcscat (txt, currprefs.config_window_title);
-               _tcscat (txt, _T(" - "));
-       } else if (config_filename[0]) {
-               _tcscat (txt, _T("["));
-               _tcscat (txt, config_filename);
-               _tcscat (txt, _T("] - "));
-       }
-       _tcscat (txt, _T("WinUAE"));
-       txt2[0] = 0;
-       if (mouseactive > 0) {
-               WIN32GUI_LoadUIString ((currprefs.input_mouse_untrap & MOUSEUNTRAP_MIDDLEBUTTON) ? IDS_WINUAETITLE_MMB : IDS_WINUAETITLE_NORMAL,
-                       txt2, sizeof (txt2) / sizeof (TCHAR));
-       }
-       if (_tcslen (WINUAEBETA) > 0) {
-               _tcscat (txt, BetaStr);
-               if (_tcslen (WINUAEEXTRA) > 0) {
-                       _tcscat (txt, _T(" "));
-                       _tcscat (txt, WINUAEEXTRA);
-               }
-       }
-       if (txt2[0]) {
-               _tcscat (txt, _T(" - "));
-               _tcscat (txt, txt2);
-       }
-       SetWindowText (hwnd, txt);
-}
-
 void refreshtitle (void)
 {
        if (isfullscreen () == 0)