From b14e04b92609ffe9affc7e173d060d0f4e3ebcfd Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 17 Nov 2021 17:05:05 +0100 Subject: [PATCH] Mae the dialog font and font size redefinable and fixed ROMs path on Mac. --- src/86box.c | 4 ++++ src/win/languages/cs-CZ.rc | 3 +++ src/win/languages/de-DE.rc | 3 +++ src/win/languages/dialogs.rc | 37 +++++++++++++++++++----------------- src/win/languages/en-US.rc | 3 +++ src/win/languages/fi-FI.rc | 5 ++++- src/win/languages/hr-HR.rc | 3 +++ src/win/languages/hu-HU.rc | 3 +++ src/win/languages/it-IT.rc | 3 +++ src/win/languages/pt-BR.rc | 3 +++ src/win/languages/pt-PT.rc | 3 +++ src/win/languages/zh-CN.rc | 3 +++ 12 files changed, 55 insertions(+), 18 deletions(-) diff --git a/src/86box.c b/src/86box.c index 8f9338920..9db0ecdb8 100644 --- a/src/86box.c +++ b/src/86box.c @@ -583,9 +583,13 @@ usage: } if (vmrp && (path2[0] == '\0')) { +#ifdef __APPLE__ + strcpy(rom_path, "~/Library/Application Support/86Box/roms"); +#else strcpy(path2, usr_path); plat_path_slash(path2); strcat(path2, "roms"); +#endif plat_path_slash(path2); } diff --git a/src/win/languages/cs-CZ.rc b/src/win/languages/cs-CZ.rc index 24f41ba6a..e07a91f2e 100644 --- a/src/win/languages/cs-CZ.rc +++ b/src/win/languages/cs-CZ.rc @@ -391,6 +391,9 @@ END #define STR_BUGGER "Zařízení ISABugger" #define STR_POSTCARD "Karta pro kódy POST" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win/languages/de-DE.rc b/src/win/languages/de-DE.rc index ef737c2e3..c8b9f13d0 100644 --- a/src/win/languages/de-DE.rc +++ b/src/win/languages/de-DE.rc @@ -391,6 +391,9 @@ END #define STR_BUGGER "ISABugger-Gerät" #define STR_POSTCARD "POST-Code-Karte" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win/languages/dialogs.rc b/src/win/languages/dialogs.rc index 88ae8f54f..7b3de5fc5 100644 --- a/src/win/languages/dialogs.rc +++ b/src/win/languages/dialogs.rc @@ -1,7 +1,7 @@ DLG_PROG_SETT DIALOG DISCARDABLE 0, 0, 240, 86 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION STR_PROG_SETT -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN DEFPUSHBUTTON STR_OK, IDOK, 123, 65, 50, 14 PUSHBUTTON STR_CANCEL, IDCANCEL, 179, 65, 50, 14 @@ -14,7 +14,7 @@ END DLG_SND_GAIN DIALOG DISCARDABLE 0, 0, 113, 136 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION STR_SND_GAIN -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN DEFPUSHBUTTON STR_OK,IDOK,57,7,50,14 PUSHBUTTON STR_CANCEL,IDCANCEL,57,24,50,14 @@ -26,7 +26,7 @@ END DLG_NEW_FLOPPY DIALOG DISCARDABLE 0, 0, 226, 86 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION STR_NEW_FLOPPY -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN DEFPUSHBUTTON STR_OK,IDOK,104,65,50,14 PUSHBUTTON STR_CANCEL,IDCANCEL,162,65,50,14 @@ -47,7 +47,7 @@ END DLG_CONFIG DIALOG DISCARDABLE 0, 0, 376, 256 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION STR_CONFIG -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN DEFPUSHBUTTON STR_OK,IDOK,246,235,50,14 PUSHBUTTON STR_CANCEL,IDCANCEL,307,235,50,14 @@ -59,7 +59,7 @@ END DLG_SPECIFY_DIM DIALOG DISCARDABLE 0, 0, 175, 66 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION STR_SPECIFY_DIM -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN LTEXT STR_WIDTH,IDT_1709,7,9,24,12 EDITTEXT IDC_EDIT_WIDTH,33,7,45,12,ES_AUTOHSCROLL | ES_NUMBER @@ -79,7 +79,7 @@ END DLG_CFG_MACHINE DIALOG DISCARDABLE 107, 0, 305, 200 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN COMBOBOX IDC_COMBO_MACHINE_TYPE,71,7,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -121,7 +121,7 @@ END DLG_CFG_VIDEO DIALOG DISCARDABLE 107, 0, 267, 45 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN LTEXT STR_VIDEO,IDT_1707,7,9,48,10 COMBOBOX IDC_COMBO_VIDEO,64,7,155,120,CBS_DROPDOWNLIST | @@ -134,7 +134,7 @@ END DLG_CFG_INPUT DIALOG DISCARDABLE 107, 0, 267, 65 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN LTEXT STR_MOUSE,IDT_1709,7,9,57,10 COMBOBOX IDC_COMBO_MOUSE,71,7,140,120,CBS_DROPDOWNLIST | @@ -151,7 +151,7 @@ END DLG_CFG_SOUND DIALOG DISCARDABLE 107, 0, 267, 201 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN COMBOBOX IDC_COMBO_SOUND,71,7,140,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -190,7 +190,7 @@ END DLG_CFG_NETWORK DIALOG DISCARDABLE 107, 0, 267, 65 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN LTEXT STR_NET_TYPE,IDT_1714,7,9,59,10 COMBOBOX IDC_COMBO_NET_TYPE,71,7,189,120,CBS_DROPDOWNLIST | WS_VSCROLL | @@ -208,7 +208,7 @@ END DLG_CFG_PORTS DIALOG DISCARDABLE 107, 0, 267, 135 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN LTEXT STR_LPT1,IDT_1717,7,9,61,10 COMBOBOX IDC_COMBO_LPT1,71,7,189,120,CBS_DROPDOWNLIST | @@ -241,7 +241,7 @@ END DLG_CFG_STORAGE DIALOG DISCARDABLE 107, 0, 267, 203 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN LTEXT STR_HDC,IDT_1718,7,9,64,10 COMBOBOX IDC_COMBO_HDC,64,7,155,120,CBS_DROPDOWNLIST | @@ -285,7 +285,7 @@ END DLG_CFG_HARD_DISKS DIALOG DISCARDABLE 107, 0, 267, 154 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN CONTROL "List1",IDC_LIST_HARD_DISKS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | @@ -310,7 +310,7 @@ END DLG_CFG_HARD_DISKS_ADD DIALOG DISCARDABLE 0, 0, 219, 149 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add Hard Disk" -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN DEFPUSHBUTTON STR_OK,IDOK,55,127,50,14 PUSHBUTTON STR_CANCEL,IDCANCEL,112,127,50,14 @@ -352,7 +352,7 @@ END DLG_CFG_FLOPPY_AND_CDROM_DRIVES DIALOG DISCARDABLE 107, 0, 267, 222 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN CONTROL "List1",IDC_LIST_FLOPPY_DRIVES,"SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SINGLESEL | WS_BORDER | @@ -386,7 +386,7 @@ END DLG_CFG_OTHER_REMOVABLE_DEVICES DIALOG DISCARDABLE 107, 0, 267, 222 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN CONTROL "List1",IDC_LIST_MO_DRIVES,"SysListView32",LVS_REPORT | @@ -425,7 +425,7 @@ END DLG_CFG_PERIPHERALS DIALOG DISCARDABLE 107, 0, 267, 154 STYLE DS_CONTROL | WS_CHILD -FONT 9, "Segoe UI" +FONT FONT_SIZE, FONT_NAME BEGIN LTEXT STR_ISARTC,IDT_1767,7,9,48,10 COMBOBOX IDC_COMBO_ISARTC,64,7,155,120, @@ -574,3 +574,6 @@ END #undef STR_ISAMEM_4 #undef STR_BUGGER #undef STR_POSTCARD + +#undef FONT_SIZE +#undef FONT_NAME diff --git a/src/win/languages/en-US.rc b/src/win/languages/en-US.rc index 443d0debc..5e9dc9103 100644 --- a/src/win/languages/en-US.rc +++ b/src/win/languages/en-US.rc @@ -391,6 +391,9 @@ END #define STR_BUGGER "ISABugger device" #define STR_POSTCARD "POST card" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win/languages/fi-FI.rc b/src/win/languages/fi-FI.rc index 7d152a588..92e1187d5 100644 --- a/src/win/languages/fi-FI.rc +++ b/src/win/languages/fi-FI.rc @@ -391,6 +391,9 @@ END #define STR_BUGGER "ISABugger-laite" #define STR_POSTCARD "POST-kortti" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// @@ -408,7 +411,7 @@ BEGIN IDS_2053 "Nopeus" IDS_2054 "ZIP %03i %i (%s): %ls" IDS_2055 "ZIP-levykuvat (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0" - IDS_2056 "86Box ei löytänyt käyttökelpoisia ROM-tiedostoja.\n\Voit ladata ROM-paketin ja purkaa sen ""roms"" hakemistoon." + IDS_2056 "86Box ei löytänyt käyttökelpoisia ROM-tiedostoja.\n\nVoit ladata ROM-paketin ja purkaa sen ""roms"" hakemistoon." IDS_2057 "(tyhjä)" IDS_2058 "ZIP-levykuvat (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0Kaikki tiedostot (*.*)\0*.*\0" IDS_2059 "Turbo" diff --git a/src/win/languages/hr-HR.rc b/src/win/languages/hr-HR.rc index e71a3b10b..096b36f23 100644 --- a/src/win/languages/hr-HR.rc +++ b/src/win/languages/hr-HR.rc @@ -391,6 +391,9 @@ END #define STR_BUGGER "ISABugger uređaj" #define STR_POSTCARD "POST kartica" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win/languages/hu-HU.rc b/src/win/languages/hu-HU.rc index fdda601a6..6b10514fc 100644 --- a/src/win/languages/hu-HU.rc +++ b/src/win/languages/hu-HU.rc @@ -394,6 +394,9 @@ END #define STR_BUGGER "ISABugger eszköz" #define STR_POSTCARD "POST kártya" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win/languages/it-IT.rc b/src/win/languages/it-IT.rc index b988a40c5..81da4ef80 100644 --- a/src/win/languages/it-IT.rc +++ b/src/win/languages/it-IT.rc @@ -391,6 +391,9 @@ END #define STR_BUGGER "Dispositivo ISABugger" #define STR_POSTCARD "Scheda POST" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win/languages/pt-BR.rc b/src/win/languages/pt-BR.rc index 4e6b97981..feb6ec02a 100644 --- a/src/win/languages/pt-BR.rc +++ b/src/win/languages/pt-BR.rc @@ -392,6 +392,9 @@ END #define STR_BUGGER "Dispositivo ISABugger" #define STR_POSTCARD "Placa de diagnóstico" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win/languages/pt-PT.rc b/src/win/languages/pt-PT.rc index 8efc1aa29..4204c5677 100644 --- a/src/win/languages/pt-PT.rc +++ b/src/win/languages/pt-PT.rc @@ -391,6 +391,9 @@ END #define STR_BUGGER "Dispositivo ISABugger" #define STR_POSTCARD "Placa POST" +#define FONT_SIZE 9 +#define FONT_NAME "Segoe UI" + #include "dialogs.rc" ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win/languages/zh-CN.rc b/src/win/languages/zh-CN.rc index 2682268cb..e625f53bc 100644 --- a/src/win/languages/zh-CN.rc +++ b/src/win/languages/zh-CN.rc @@ -391,6 +391,9 @@ END #define STR_BUGGER "ISABugger device" #define STR_POSTCARD "自检卡(POST)" +#define FONT_SIZE 9 +#define FONT_NAME "Microsoft YaHei" + #include "dialogs.rc" /////////////////////////////////////////////////////////////////////////////