Add a warning for cpu_override

This commit is contained in:
David Hrdlička
2021-05-09 02:48:24 +02:00
parent a9a5681973
commit 0361709ada
4 changed files with 28 additions and 13 deletions

View File

@@ -845,8 +845,12 @@ pc_reset_hard_init(void)
cycles = cycles_main = 0;
mbstowcs(wmachine, machine_getname(), strlen(machine_getname())+1);
mbstowcs(wcpufamily, cpu_f->name,
strlen(cpu_f->name)+1);
if (!cpu_override)
mbstowcs(wcpufamily, cpu_f->name, strlen(cpu_f->name)+1);
else
swprintf(wcpufamily, sizeof_w(wcpufamily), L"[U] %hs", cpu_f->name);
wcp = wcschr(wcpufamily, L'(');
if (wcp) /* remove parentheses */
*(wcp - 1) = L'\0';

View File

@@ -118,6 +118,9 @@
#define IDS_2142 2142 // "Monitor in sleep mode"
#define IDS_2143 2143 // "OpenGL Shaders (*.GLSL)..."
#define IDS_2144 2144 // "OpenGL options"
#define IDS_2145 2145 // "You are loading an unsupported..."
#define IDS_2146 2146 // "CPU type filtering based on..."
#define IDS_2147 2147 // "Continue"
#define IDS_4096 4096 // "Hard disk (%s)"
#define IDS_4097 4097 // "%01i:%01i"
@@ -225,7 +228,7 @@
#define IDS_LANG_ENUS IDS_7168
#define STR_NUM_2048 97
#define STR_NUM_2048 100
#define STR_NUM_3072 11
#define STR_NUM_4096 39
#define STR_NUM_4352 6

View File

@@ -1104,6 +1104,9 @@ BEGIN
IDS_2142 "Monitor in sleep mode"
IDS_2143 "OpenGL Shaders (*.GLSL)\0*.GLSL\0All files (*.*)\0*.*\0"
IDS_2144 "OpenGL options"
IDS_2145 "You are loading an unsupported configuration"
IDS_2146 "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid."
IDS_2147 "Continue"
END
STRINGTABLE DISCARDABLE

View File

@@ -1339,6 +1339,11 @@ ui_init(int nCmdShow)
}
#endif
/* Warn the user about unsupported configs. */
if (cpu_override && ui_msgbox_ex(MBX_WARNING | MBX_QUESTION_OK, (void *) IDS_2145, (void *) IDS_2146, (void *) IDS_2147, (void *) IDS_2119, NULL)) {
return(0);
}
/* Create our main window's class and register it. */
wincl.hInstance = hinstance;
wincl.lpszClassName = CLASS_NAME;