Merge branch '86Box:master' into master
This commit is contained in:
@@ -371,7 +371,7 @@ END
|
||||
#define STR_CYLS "Cilindros:"
|
||||
#define STR_SIZE_MB "Tamanho (MB):"
|
||||
#define STR_TYPE "Tipo:"
|
||||
#define STR_IMG_FORMAT "Formato da imagem:"
|
||||
#define STR_IMG_FORMAT "Formato:"
|
||||
#define STR_BLOCK_SIZE "Tamanho do bloco:"
|
||||
|
||||
#define STR_FLOPPY_DRIVES "Unidades de disquete:"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
WCHAR str[512];
|
||||
WCHAR str[1024];
|
||||
} rc_str_t;
|
||||
|
||||
|
||||
@@ -165,50 +165,50 @@ LoadCommonStrings(void)
|
||||
free_string(&lpRCstr4096);
|
||||
free_string(&lpRCstr2048);
|
||||
|
||||
lpRCstr2048 = (rc_str_t *)malloc(STR_NUM_2048*sizeof(rc_str_t));
|
||||
lpRCstr4096 = (rc_str_t *)malloc(STR_NUM_4096*sizeof(rc_str_t));
|
||||
lpRCstr4352 = (rc_str_t *)malloc(STR_NUM_4352*sizeof(rc_str_t));
|
||||
lpRCstr4608 = (rc_str_t *)malloc(STR_NUM_4608*sizeof(rc_str_t));
|
||||
lpRCstr5120 = (rc_str_t *)malloc(STR_NUM_5120*sizeof(rc_str_t));
|
||||
lpRCstr5376 = (rc_str_t *)malloc(STR_NUM_5376*sizeof(rc_str_t));
|
||||
lpRCstr5632 = (rc_str_t *)malloc(STR_NUM_5632*sizeof(rc_str_t));
|
||||
lpRCstr5888 = (rc_str_t *)malloc(STR_NUM_5888*sizeof(rc_str_t));
|
||||
lpRCstr6144 = (rc_str_t *)malloc(STR_NUM_6144*sizeof(rc_str_t));
|
||||
lpRCstr7168 = (rc_str_t *)malloc(STR_NUM_7168*sizeof(rc_str_t));
|
||||
lpRCstr2048 = calloc(STR_NUM_2048, sizeof(rc_str_t));
|
||||
lpRCstr4096 = calloc(STR_NUM_4096, sizeof(rc_str_t));
|
||||
lpRCstr4352 = calloc(STR_NUM_4352, sizeof(rc_str_t));
|
||||
lpRCstr4608 = calloc(STR_NUM_4608, sizeof(rc_str_t));
|
||||
lpRCstr5120 = calloc(STR_NUM_5120, sizeof(rc_str_t));
|
||||
lpRCstr5376 = calloc(STR_NUM_5376, sizeof(rc_str_t));
|
||||
lpRCstr5632 = calloc(STR_NUM_5632, sizeof(rc_str_t));
|
||||
lpRCstr5888 = calloc(STR_NUM_5888, sizeof(rc_str_t));
|
||||
lpRCstr6144 = calloc(STR_NUM_6144, sizeof(rc_str_t));
|
||||
lpRCstr7168 = calloc(STR_NUM_7168, sizeof(rc_str_t));
|
||||
|
||||
for (i=0; i<STR_NUM_2048; i++)
|
||||
LoadString(hinstance, 2048+i, lpRCstr2048[i].str, 512);
|
||||
LoadString(hinstance, 2048+i, lpRCstr2048[i].str, 1024);
|
||||
|
||||
for (i=0; i<STR_NUM_4096; i++)
|
||||
LoadString(hinstance, 4096+i, lpRCstr4096[i].str, 512);
|
||||
LoadString(hinstance, 4096+i, lpRCstr4096[i].str, 1024);
|
||||
|
||||
for (i=0; i<STR_NUM_4352; i++)
|
||||
LoadString(hinstance, 4352+i, lpRCstr4352[i].str, 512);
|
||||
LoadString(hinstance, 4352+i, lpRCstr4352[i].str, 1024);
|
||||
|
||||
for (i=0; i<STR_NUM_4608; i++)
|
||||
LoadString(hinstance, 4608+i, lpRCstr4608[i].str, 512);
|
||||
LoadString(hinstance, 4608+i, lpRCstr4608[i].str, 1024);
|
||||
|
||||
for (i=0; i<STR_NUM_5120; i++)
|
||||
LoadString(hinstance, 5120+i, lpRCstr5120[i].str, 512);
|
||||
LoadString(hinstance, 5120+i, lpRCstr5120[i].str, 1024);
|
||||
|
||||
for (i=0; i<STR_NUM_5376; i++) {
|
||||
if ((i == 0) || (i > 3))
|
||||
LoadString(hinstance, 5376+i, lpRCstr5376[i].str, 512);
|
||||
LoadString(hinstance, 5376+i, lpRCstr5376[i].str, 1024);
|
||||
}
|
||||
|
||||
for (i=0; i<STR_NUM_5632; i++) {
|
||||
if ((i == 0) || (i > 3))
|
||||
LoadString(hinstance, 5632+i, lpRCstr5632[i].str, 512);
|
||||
LoadString(hinstance, 5632+i, lpRCstr5632[i].str, 1024);
|
||||
}
|
||||
|
||||
for (i=0; i<STR_NUM_5888; i++)
|
||||
LoadString(hinstance, 5888+i, lpRCstr5888[i].str, 512);
|
||||
LoadString(hinstance, 5888+i, lpRCstr5888[i].str, 1024);
|
||||
|
||||
for (i=0; i<STR_NUM_6144; i++)
|
||||
LoadString(hinstance, 6144+i, lpRCstr6144[i].str, 512);
|
||||
LoadString(hinstance, 6144+i, lpRCstr6144[i].str, 1024);
|
||||
|
||||
for (i=0; i<STR_NUM_7168; i++)
|
||||
LoadString(hinstance, 7168+i, lpRCstr7168[i].str, 512);
|
||||
LoadString(hinstance, 7168+i, lpRCstr7168[i].str, 1024);
|
||||
}
|
||||
|
||||
|
||||
@@ -269,9 +269,11 @@ set_language(uint32_t id)
|
||||
LoadCommonStrings();
|
||||
|
||||
/* Reload main menu */
|
||||
SetMenu(hwndMain, LoadMenu(hinstance, L"MainMenu"));
|
||||
menuMain = LoadMenu(hinstance, L"MainMenu");
|
||||
SetMenu(hwndMain, menuMain);
|
||||
|
||||
/* Re-init media menu */
|
||||
/* Re-init all the menus */
|
||||
ResetAllMenus();
|
||||
media_menu_init();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,22 +203,22 @@ delete_submenu(HMENU parent, HMENU target)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int menu_vidapi = -1;
|
||||
static HMENU cur_menu = NULL;
|
||||
|
||||
static void
|
||||
show_render_options_menu()
|
||||
{
|
||||
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
|
||||
static int menu_vidapi = -1;
|
||||
static HMENU cur_menu = NULL;
|
||||
|
||||
if (vid_api == menu_vidapi)
|
||||
return;
|
||||
|
||||
|
||||
if (cur_menu != NULL)
|
||||
{
|
||||
if (delete_submenu(menuMain, cur_menu))
|
||||
cur_menu = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (cur_menu == NULL)
|
||||
{
|
||||
switch (IDM_VID_SDL_SW + vid_api)
|
||||
@@ -251,7 +251,7 @@ video_set_filter_menu(HMENU menu)
|
||||
EnableMenuItem(menu, IDM_VID_FILTER_LINEAR, vid_api == 0 ? MF_GRAYED : MF_ENABLED);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
ResetAllMenus(void)
|
||||
{
|
||||
CheckMenuItem(menuMain, IDM_ACTION_RCTRL_IS_LALT, MF_UNCHECKED);
|
||||
@@ -294,6 +294,9 @@ ResetAllMenus(void)
|
||||
CheckMenuItem(menuMain, IDM_VID_SDL_OPENGL, MF_UNCHECKED);
|
||||
#if defined(DEV_BRANCH) && defined(USE_OPENGL)
|
||||
CheckMenuItem(menuMain, IDM_VID_OPENGL_CORE, MF_UNCHECKED);
|
||||
|
||||
menu_vidapi = -1;
|
||||
cur_menu = NULL;
|
||||
show_render_options_menu();
|
||||
#endif
|
||||
#ifdef USE_VNC
|
||||
@@ -1401,9 +1404,10 @@ ui_init(int nCmdShow)
|
||||
ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height);
|
||||
}
|
||||
|
||||
/* Reset all menus to their defaults. */
|
||||
ResetAllMenus();
|
||||
media_menu_init();
|
||||
/* Load the desired language, and reset all menus to their defaults */
|
||||
uint32_t helper_lang = lang_id;
|
||||
lang_id = 0;
|
||||
set_language(helper_lang);
|
||||
|
||||
/* Make the window visible on the screen. */
|
||||
ShowWindow(hwnd, nCmdShow);
|
||||
|
||||
Reference in New Issue
Block a user