]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Allow filter names to be translated
authorToni Wilen <twilen@winuae.net>
Sun, 9 Jul 2023 17:34:09 +0000 (20:34 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 9 Jul 2023 17:34:09 +0000 (20:34 +0300)
od-win32/resources/resource.h
od-win32/resources/winuae.rc
od-win32/win32gui.cpp

index 49e93010e1b5c4593e68a73a1e2a613d2ea230c8..16426b5abbf939286c3918d499c333f0505b1edc 100644 (file)
 #define IDS_BOARDID                     435
 #define IDS_ASSOCIATEEXTENSION          436
 #define IDS_GAMEPORTS_CUSTOM            437
+#define IDS_FILTER_LABELS               438
 #define IDS_QS_MODELS                   1000
 #define IDS_QS_MODEL_A500               1001
 #define IDS_QS_MODEL_A500P              1002
index f8cbcd110b0418b908b97af9b99c8d17d4ff7a67..3a221891f75cad6214d2b90fcbaa9f19d939fc65 100644 (file)
@@ -2232,6 +2232,7 @@ BEGIN
     IDS_BOARDID             "ID"
     IDS_ASSOCIATEEXTENSION  "Extension"
     IDS_GAMEPORTS_CUSTOM    "Custom"
+    IDS_FILTER_LABELS       "Null\nScale2X\nhq2x\nhq3x\nhq4x\nSuperEagle\nSuper2xSaI\n2xSaI\nPAL\n"
 END
 
 #endif    // English (United Kingdom) resources
index d57ba1fc5d515814edf8beee495017aa4ab0d286..adf5d76f4821c0bc09910eff5ba8536221959dbf 100644 (file)
@@ -20128,7 +20128,7 @@ static void setfiltermult (HWND hDlg)
 
 static void values_to_hw3ddlg (HWND hDlg, bool initdialog)
 {
-       TCHAR txt[100], tmp[100];
+       TCHAR txt[200], tmp[200], tmp2[200];
        int i, j, fltnum;
        struct uae_filter *uf;
        int fxidx, fxcnt;
@@ -20252,21 +20252,37 @@ static void values_to_hw3ddlg (HWND hDlg, bool initdialog)
        xSendDlgItemMessage (hDlg, IDC_FILTER_NATIVERTG, CB_SETCURSEL, v, 0);
 
        xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_RESETCONTENT, 0, 0L);
-       WIN32GUI_LoadUIString (IDS_NONE, tmp, MAX_DPATH);
+       WIN32GUI_LoadUIString (IDS_NONE, tmp, sizeof(tmp) / sizeof(TCHAR));
        xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)tmp);
+       WIN32GUI_LoadUIString(IDS_FILTER_LABELS, tmp2, sizeof(tmp2) / sizeof(TCHAR));
+
        uf = NULL;
        fltnum = 0;
        i = 0; j = 1;
+       TCHAR *fl = tmp2;
        while (uaefilters[i].name) {
                if (filter_nativertg >= 2 && uaefilters[i].type > 1) {
                        i++;
+                       while(*fl != '\n' && *fl != 0) {
+                               fl++;
+                       }
                        continue;
                }
-               xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)uaefilters[i].name);
+               TCHAR *fle = fl;
+               while (*fle != '\n' && *fle != 0) {
+                       fle++;
+               }
+               TCHAR endch = *fle;
+               *fle = 0;
+               xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)fl);
                if (uaefilters[i].type == workprefs.gf[filter_nativertg].gfx_filter) {
                        uf = &uaefilters[i];
                        fltnum = j;
                }
+               fl = fle;
+               if (endch != 0) {
+                       fl++;
+               }
                j++;
                i++;
        }