Remove ifdef, add default language constant, and separate text filler code from pc_init
This commit is contained in:
17
src/86box.c
17
src/86box.c
@@ -434,8 +434,8 @@ usage:
|
|||||||
printf("-E or --nographic - forces the old behavior\n");
|
printf("-E or --nographic - forces the old behavior\n");
|
||||||
#endif
|
#endif
|
||||||
printf("-F or --fullscreen - start in fullscreen mode\n");
|
printf("-F or --fullscreen - start in fullscreen mode\n");
|
||||||
#ifdef _WIN32
|
|
||||||
printf("-G or --lang langid - start the application with the specified language\n");
|
printf("-G or --lang langid - start the application with the specified language\n");
|
||||||
|
#ifdef _WIN32
|
||||||
printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n");
|
printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n");
|
||||||
#endif
|
#endif
|
||||||
printf("-L or --logfile path - set 'path' to be the logfile\n");
|
printf("-L or --logfile path - set 'path' to be the logfile\n");
|
||||||
@@ -519,7 +519,8 @@ usage:
|
|||||||
!strcasecmp(argv[c], "-G")) {
|
!strcasecmp(argv[c], "-G")) {
|
||||||
|
|
||||||
|
|
||||||
//This function is currently unimplemented for *nix.
|
#endif
|
||||||
|
//This function is currently unimplemented for *nix but has placeholders.
|
||||||
|
|
||||||
lang_init = plat_language_code(argv[++c]);
|
lang_init = plat_language_code(argv[++c]);
|
||||||
if (!lang_init)
|
if (!lang_init)
|
||||||
@@ -528,7 +529,6 @@ usage:
|
|||||||
//The return value of 0 only means that the code is invalid,
|
//The return value of 0 only means that the code is invalid,
|
||||||
// not related to that translation is exists or not for the
|
// not related to that translation is exists or not for the
|
||||||
// selected language.
|
// selected language.
|
||||||
#endif
|
|
||||||
} else if (!strcasecmp(argv[c], "--test")) {
|
} else if (!strcasecmp(argv[c], "--test")) {
|
||||||
/* some (undocumented) test function here.. */
|
/* some (undocumented) test function here.. */
|
||||||
|
|
||||||
@@ -922,8 +922,6 @@ pc_reset_hard_close(void)
|
|||||||
void
|
void
|
||||||
pc_reset_hard_init(void)
|
pc_reset_hard_init(void)
|
||||||
{
|
{
|
||||||
wchar_t wcpufamily[2048], wcpu[2048], wmachine[2048], *wcp;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First, we reset the modules that are not part of
|
* First, we reset the modules that are not part of
|
||||||
* the actual machine, but which support some of the
|
* the actual machine, but which support some of the
|
||||||
@@ -1025,7 +1023,14 @@ pc_reset_hard_init(void)
|
|||||||
pc_full_speed();
|
pc_full_speed();
|
||||||
|
|
||||||
cycles = cycles_main = 0;
|
cycles = cycles_main = 0;
|
||||||
|
|
||||||
|
update_mouse_msg();
|
||||||
|
}
|
||||||
|
|
||||||
|
void update_mouse_msg()
|
||||||
|
{
|
||||||
|
wchar_t wcpufamily[2048], wcpu[2048], wmachine[2048], *wcp;
|
||||||
|
|
||||||
mbstowcs(wmachine, machine_getname(), strlen(machine_getname())+1);
|
mbstowcs(wmachine, machine_getname(), strlen(machine_getname())+1);
|
||||||
|
|
||||||
if (!cpu_override)
|
if (!cpu_override)
|
||||||
@@ -1037,6 +1042,7 @@ pc_reset_hard_init(void)
|
|||||||
if (wcp) /* remove parentheses */
|
if (wcp) /* remove parentheses */
|
||||||
*(wcp - 1) = L'\0';
|
*(wcp - 1) = L'\0';
|
||||||
mbstowcs(wcpu, cpu_s->name, strlen(cpu_s->name)+1);
|
mbstowcs(wcpu, cpu_s->name, strlen(cpu_s->name)+1);
|
||||||
|
|
||||||
swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%ls v%ls - %%i%%%% - %ls - %ls/%ls - %ls",
|
swprintf(mouse_msg[0], sizeof_w(mouse_msg[0]), L"%ls v%ls - %%i%%%% - %ls - %ls/%ls - %ls",
|
||||||
EMU_NAME_W, EMU_VERSION_W, wmachine, wcpufamily, wcpu,
|
EMU_NAME_W, EMU_VERSION_W, wmachine, wcpufamily, wcpu,
|
||||||
plat_get_string(IDS_2077));
|
plat_get_string(IDS_2077));
|
||||||
@@ -1045,7 +1051,6 @@ pc_reset_hard_init(void)
|
|||||||
(mouse_get_buttons() > 2) ? plat_get_string(IDS_2078) : plat_get_string(IDS_2079));
|
(mouse_get_buttons() > 2) ? plat_get_string(IDS_2078) : plat_get_string(IDS_2079));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
pc_reset_hard(void)
|
pc_reset_hard(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,6 +33,9 @@
|
|||||||
#define SCREENSHOT_PATH "screenshots"
|
#define SCREENSHOT_PATH "screenshots"
|
||||||
|
|
||||||
|
|
||||||
|
/* Default language 0xFFFF = from system, 0x409 = en-US */
|
||||||
|
#define DEFAULT_LANGUAGE 0x0409
|
||||||
|
|
||||||
#if defined(ENABLE_BUSLOGIC_LOG) || \
|
#if defined(ENABLE_BUSLOGIC_LOG) || \
|
||||||
defined(ENABLE_CDROM_LOG) || \
|
defined(ENABLE_CDROM_LOG) || \
|
||||||
defined(ENABLE_D86F_LOG) || \
|
defined(ENABLE_D86F_LOG) || \
|
||||||
@@ -173,6 +176,7 @@ extern void fatal(const char *fmt, ...);
|
|||||||
extern void set_screen_size(int x, int y);
|
extern void set_screen_size(int x, int y);
|
||||||
extern void reset_screen_size(void);
|
extern void reset_screen_size(void);
|
||||||
extern void set_screen_size_natural(void);
|
extern void set_screen_size_natural(void);
|
||||||
|
extern void update_mouse_msg();
|
||||||
#if 0
|
#if 0
|
||||||
extern void pc_reload(wchar_t *fn);
|
extern void pc_reload(wchar_t *fn);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user