Separated main code from UI and PLATform support code, plus other generally small fixes here and there.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Windows 86Box Settings dialog handler.
|
||||
*
|
||||
* Version: @(#)win_settings.c 1.0.18 2017/10/07
|
||||
* Version: @(#)win_settings.c 1.0.19 2017/10/09
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
@@ -50,6 +50,8 @@
|
||||
#include "../sound/snd_mpu401.h"
|
||||
#include "../video/video.h"
|
||||
#include "../video/vid_voodoo.h"
|
||||
#include "../plat.h"
|
||||
#include "../ui.h"
|
||||
#include "plat_midi.h"
|
||||
#include "win.h"
|
||||
|
||||
@@ -103,6 +105,25 @@ static int settings_scsi_to_list[20], settings_list_to_scsi[20];
|
||||
static int settings_network_to_list[20], settings_list_to_network[20];
|
||||
|
||||
|
||||
|
||||
/* Show a MessageBox dialog. This is nasty, I know. --FvK */
|
||||
static int
|
||||
settings_msgbox(int type, void *arg)
|
||||
{
|
||||
HWND h;
|
||||
int i;
|
||||
|
||||
h = hwndMain;
|
||||
hwndMain = hwndParentDialog;
|
||||
|
||||
i = ui_msgbox(type, arg);
|
||||
|
||||
hwndMain = h;
|
||||
|
||||
return(i);
|
||||
}
|
||||
|
||||
|
||||
/* This does the initial read of global variables into the temporary ones. */
|
||||
static void win_settings_init(void)
|
||||
{
|
||||
@@ -252,24 +273,15 @@ static int settings_msgbox_reset(void)
|
||||
|
||||
if (changed)
|
||||
{
|
||||
i = msgbox_reset(hwndParentDialog);
|
||||
i = settings_msgbox(MBX_QUESTION, (wchar_t *)IDS_2051);
|
||||
|
||||
if (i == IDNO)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (i == IDCANCEL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
if (i == 1) return(1); /* no */
|
||||
|
||||
if (i < 0) return(0); /* cancel */
|
||||
|
||||
return(2); /* yes */
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,7 +360,7 @@ static void win_settings_save(void)
|
||||
mem_resize();
|
||||
rom_load_bios(romset);
|
||||
|
||||
StatusBarUpdatePanes();
|
||||
ui_sb_update_panes();
|
||||
|
||||
sound_realloc_buffers();
|
||||
|
||||
@@ -522,13 +534,13 @@ static void win_settings_machine_recalc_machine(HWND hdlg)
|
||||
{
|
||||
SendMessage(h, UDM_SETPOS, 0, temp_mem_size);
|
||||
h = GetDlgItem(hdlg, IDC_TEXT_MB);
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM) win_get_string(IDS_2094));
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM) plat_get_string(IDS_2094));
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessage(h, UDM_SETPOS, 0, temp_mem_size / 1024);
|
||||
h = GetDlgItem(hdlg, IDC_TEXT_MB);
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM) win_get_string(IDS_2087));
|
||||
SendMessage(h, WM_SETTEXT, 0, (LPARAM) plat_get_string(IDS_2087));
|
||||
}
|
||||
|
||||
free(lptsTemp);
|
||||
@@ -572,11 +584,11 @@ static BOOL CALLBACK win_settings_machine_proc(HWND hdlg, UINT message, WPARAM w
|
||||
SendMessage(h, CB_SETCURSEL, machinetolist[temp_machine], 0);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_WS);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_get_string(IDS_2131));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) plat_get_string(IDS_2131));
|
||||
|
||||
for (c = 0; c < 8; c++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(2132), c);
|
||||
wsprintf(lptsTemp, plat_get_string(2132), c);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
@@ -745,12 +757,12 @@ static BOOL CALLBACK win_settings_video_proc(HWND hdlg, UINT message, WPARAM wPa
|
||||
recalc_vid_list(hdlg);
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_VIDEO_SPEED);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_2133));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_2134));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_2135));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_2136));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_2137));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_2138));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_2133));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_2134));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_2135));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_2136));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_2137));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_2138));
|
||||
SendMessage(h, CB_SETCURSEL, temp_video_speed, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_CHECK_VOODOO);
|
||||
@@ -895,7 +907,7 @@ static BOOL CALLBACK win_settings_input_proc(HWND hdlg, UINT message, WPARAM wPa
|
||||
{
|
||||
str_id = IDS_3072 + c;
|
||||
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(str_id));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(str_id));
|
||||
|
||||
settings_list_to_mouse[d] = c;
|
||||
d++;
|
||||
@@ -908,7 +920,7 @@ static BOOL CALLBACK win_settings_input_proc(HWND hdlg, UINT message, WPARAM wPa
|
||||
c = 0;
|
||||
while (joystick_get_name(c))
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(2144 + c));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(2144 + c));
|
||||
c++;
|
||||
}
|
||||
EnableWindow(h, TRUE);
|
||||
@@ -1061,7 +1073,7 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_get_string(IDS_2152));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) plat_get_string(IDS_2152));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1110,7 +1122,7 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_get_string(IDS_2152));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) plat_get_string(IDS_2152));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1295,7 +1307,7 @@ static BOOL CALLBACK win_settings_ports_proc(HWND hdlg, UINT message, WPARAM wPa
|
||||
|
||||
if (c == 0)
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_get_string(IDS_2152));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) plat_get_string(IDS_2152));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1475,11 +1487,12 @@ static BOOL CALLBACK win_settings_peripherals_proc(HWND hdlg, UINT message, WPAR
|
||||
{
|
||||
scsi_dev = scsi_card_getdevice(c);
|
||||
|
||||
|
||||
if (device_is_valid(scsi_dev, machines[temp_machine].flags))
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_get_string(IDS_2152));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) plat_get_string(IDS_2152));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1510,11 +1523,11 @@ static BOOL CALLBACK win_settings_peripherals_proc(HWND hdlg, UINT message, WPAR
|
||||
recalc_hdc_list(hdlg, temp_machine, 0);
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_COMBO_IDE_TER);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_5376));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_5376));
|
||||
|
||||
for (c = 0; c < 11; c++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_2155), valid_ide_irqs[c]);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_2155), valid_ide_irqs[c]);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
@@ -1528,11 +1541,11 @@ static BOOL CALLBACK win_settings_peripherals_proc(HWND hdlg, UINT message, WPAR
|
||||
}
|
||||
|
||||
h=GetDlgItem(hdlg, IDC_COMBO_IDE_QUA);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_5376));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_5376));
|
||||
|
||||
for (c = 0; c < 11; c++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_2155), valid_ide_irqs[c]);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_2155), valid_ide_irqs[c]);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
@@ -1727,7 +1740,7 @@ static BOOL CALLBACK win_settings_network_proc(HWND hdlg, UINT message, WPARAM w
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) win_get_string(2152));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) plat_get_string(2152));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1907,34 +1920,34 @@ static void add_locations(HWND hdlg)
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_4352 + i));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_4352 + i));
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_CHANNEL);
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_4097), i >> 1, i & 1);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4097), i >> 1, i & 1);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_ID);
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_4098), i);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4098), i);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_LUN);
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_4098), i);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4098), i);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_CHANNEL_IDE);
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_4097), i >> 1, i & 1);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4097), i >> 1, i & 1);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
@@ -2176,25 +2189,25 @@ static void win_settings_hard_disks_update_item(HWND hwndList, int i, int column
|
||||
switch(temp_hdd[i].bus)
|
||||
{
|
||||
case HDD_BUS_MFM:
|
||||
wsprintf(szText, win_get_string(IDS_4608), temp_hdd[i].mfm_channel >> 1, temp_hdd[i].mfm_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4608), temp_hdd[i].mfm_channel >> 1, temp_hdd[i].mfm_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_XTIDE:
|
||||
wsprintf(szText, win_get_string(IDS_4609), temp_hdd[i].xtide_channel >> 1, temp_hdd[i].xtide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4609), temp_hdd[i].xtide_channel >> 1, temp_hdd[i].xtide_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_ESDI:
|
||||
wsprintf(szText, win_get_string(IDS_4610), temp_hdd[i].esdi_channel >> 1, temp_hdd[i].esdi_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4610), temp_hdd[i].esdi_channel >> 1, temp_hdd[i].esdi_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_IDE_PIO_ONLY:
|
||||
wsprintf(szText, win_get_string(IDS_4611), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4611), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_IDE_PIO_AND_DMA:
|
||||
wsprintf(szText, win_get_string(IDS_4612), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4612), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_SCSI:
|
||||
wsprintf(szText, win_get_string(IDS_4613), temp_hdd[i].scsi_id, temp_hdd[i].scsi_lun);
|
||||
wsprintf(szText, plat_get_string(IDS_4613), temp_hdd[i].scsi_id, temp_hdd[i].scsi_lun);
|
||||
break;
|
||||
case HDD_BUS_SCSI_REMOVABLE:
|
||||
wsprintf(szText, win_get_string(IDS_4614), temp_hdd[i].scsi_id, temp_hdd[i].scsi_lun);
|
||||
wsprintf(szText, plat_get_string(IDS_4614), temp_hdd[i].scsi_id, temp_hdd[i].scsi_lun);
|
||||
break;
|
||||
}
|
||||
lvI.pszText = szText;
|
||||
@@ -2207,25 +2220,25 @@ static void win_settings_hard_disks_update_item(HWND hwndList, int i, int column
|
||||
}
|
||||
else if (column == 2)
|
||||
{
|
||||
wsprintf(szText, win_get_string(IDS_4098), temp_hdd[i].tracks);
|
||||
wsprintf(szText, plat_get_string(IDS_4098), temp_hdd[i].tracks);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 0;
|
||||
}
|
||||
else if (column == 3)
|
||||
{
|
||||
wsprintf(szText, win_get_string(IDS_4098), temp_hdd[i].hpc);
|
||||
wsprintf(szText, plat_get_string(IDS_4098), temp_hdd[i].hpc);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 0;
|
||||
}
|
||||
else if (column == 4)
|
||||
{
|
||||
wsprintf(szText, win_get_string(IDS_4098), temp_hdd[i].spt);
|
||||
wsprintf(szText, plat_get_string(IDS_4098), temp_hdd[i].spt);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 0;
|
||||
}
|
||||
else if (column == 5)
|
||||
{
|
||||
wsprintf(szText, win_get_string(IDS_4098), (temp_hdd[i].tracks * temp_hdd[i].hpc * temp_hdd[i].spt) >> 11);
|
||||
wsprintf(szText, plat_get_string(IDS_4098), (temp_hdd[i].tracks * temp_hdd[i].hpc * temp_hdd[i].spt) >> 11);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 0;
|
||||
}
|
||||
@@ -2260,25 +2273,25 @@ static BOOL win_settings_hard_disks_recalc_list(HWND hwndList)
|
||||
switch(temp_hdd[i].bus)
|
||||
{
|
||||
case HDD_BUS_MFM:
|
||||
wsprintf(szText, win_get_string(IDS_4608), temp_hdd[i].mfm_channel >> 1, temp_hdd[i].mfm_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4608), temp_hdd[i].mfm_channel >> 1, temp_hdd[i].mfm_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_XTIDE:
|
||||
wsprintf(szText, win_get_string(IDS_4609), temp_hdd[i].xtide_channel >> 1, temp_hdd[i].xtide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4609), temp_hdd[i].xtide_channel >> 1, temp_hdd[i].xtide_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_ESDI:
|
||||
wsprintf(szText, win_get_string(IDS_4610), temp_hdd[i].esdi_channel >> 1, temp_hdd[i].esdi_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4610), temp_hdd[i].esdi_channel >> 1, temp_hdd[i].esdi_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_IDE_PIO_ONLY:
|
||||
wsprintf(szText, win_get_string(IDS_4611), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4611), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_IDE_PIO_AND_DMA:
|
||||
wsprintf(szText, win_get_string(IDS_4612), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(IDS_4612), temp_hdd[i].ide_channel >> 1, temp_hdd[i].ide_channel & 1);
|
||||
break;
|
||||
case HDD_BUS_SCSI:
|
||||
wsprintf(szText, win_get_string(IDS_4613), temp_hdd[i].scsi_id, temp_hdd[i].scsi_lun);
|
||||
wsprintf(szText, plat_get_string(IDS_4613), temp_hdd[i].scsi_id, temp_hdd[i].scsi_lun);
|
||||
break;
|
||||
case HDD_BUS_SCSI_REMOVABLE:
|
||||
wsprintf(szText, win_get_string(IDS_4614), temp_hdd[i].scsi_id, temp_hdd[i].scsi_lun);
|
||||
wsprintf(szText, plat_get_string(IDS_4614), temp_hdd[i].scsi_id, temp_hdd[i].scsi_lun);
|
||||
break;
|
||||
}
|
||||
lvI.pszText = szText;
|
||||
@@ -2301,7 +2314,7 @@ static BOOL win_settings_hard_disks_recalc_list(HWND hwndList)
|
||||
}
|
||||
|
||||
lvI.iSubItem = 2;
|
||||
wsprintf(szText, win_get_string(IDS_4098), temp_hdd[i].tracks);
|
||||
wsprintf(szText, plat_get_string(IDS_4098), temp_hdd[i].tracks);
|
||||
lvI.pszText = szText;
|
||||
lvI.iItem = j;
|
||||
lvI.iImage = 0;
|
||||
@@ -2312,7 +2325,7 @@ static BOOL win_settings_hard_disks_recalc_list(HWND hwndList)
|
||||
}
|
||||
|
||||
lvI.iSubItem = 3;
|
||||
wsprintf(szText, win_get_string(IDS_4098), temp_hdd[i].hpc);
|
||||
wsprintf(szText, plat_get_string(IDS_4098), temp_hdd[i].hpc);
|
||||
lvI.pszText = szText;
|
||||
lvI.iItem = j;
|
||||
lvI.iImage = 0;
|
||||
@@ -2323,7 +2336,7 @@ static BOOL win_settings_hard_disks_recalc_list(HWND hwndList)
|
||||
}
|
||||
|
||||
lvI.iSubItem = 4;
|
||||
wsprintf(szText, win_get_string(IDS_4098), temp_hdd[i].spt);
|
||||
wsprintf(szText, plat_get_string(IDS_4098), temp_hdd[i].spt);
|
||||
lvI.pszText = szText;
|
||||
lvI.iItem = j;
|
||||
lvI.iImage = 0;
|
||||
@@ -2334,7 +2347,7 @@ static BOOL win_settings_hard_disks_recalc_list(HWND hwndList)
|
||||
}
|
||||
|
||||
lvI.iSubItem = 5;
|
||||
wsprintf(szText, win_get_string(IDS_4098), (temp_hdd[i].tracks * temp_hdd[i].hpc * temp_hdd[i].spt) >> 11);
|
||||
wsprintf(szText, plat_get_string(IDS_4098), (temp_hdd[i].tracks * temp_hdd[i].hpc * temp_hdd[i].spt) >> 11);
|
||||
lvI.pszText = szText;
|
||||
lvI.iItem = j;
|
||||
lvI.iImage = 0;
|
||||
@@ -2370,7 +2383,7 @@ static BOOL win_settings_hard_disks_init_columns(HWND hwndList)
|
||||
for (iCol = 0; iCol < C_COLUMNS_HARD_DISKS; iCol++)
|
||||
{
|
||||
lvc.iSubItem = iCol;
|
||||
lvc.pszText = win_get_string(2082 + iCol);
|
||||
lvc.pszText = plat_get_string(2082 + iCol);
|
||||
|
||||
switch(iCol)
|
||||
{
|
||||
@@ -2433,7 +2446,7 @@ static void set_edit_box_contents(HWND hdlg, int id, uint64_t val)
|
||||
WCHAR szText[256];
|
||||
|
||||
h = GetDlgItem(hdlg, id);
|
||||
wsprintf(szText, win_get_string(IDS_2156), val);
|
||||
wsprintf(szText, plat_get_string(IDS_2156), val);
|
||||
SendMessage(h, WM_SETTEXT, (WPARAM) wcslen(szText), (LPARAM) szText);
|
||||
}
|
||||
|
||||
@@ -2467,15 +2480,15 @@ static int hdconf_initialize_hdt_combo(HWND hdlg)
|
||||
{
|
||||
temp_size = hdd_table[i][0] * hdd_table[i][1] * hdd_table[i][2];
|
||||
size_mb = temp_size >> 11;
|
||||
wsprintf(szText, win_get_string(IDS_2157), size_mb, hdd_table[i][0], hdd_table[i][1], hdd_table[i][2]);
|
||||
wsprintf(szText, plat_get_string(IDS_2157), size_mb, hdd_table[i][0], hdd_table[i][1], hdd_table[i][2]);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) szText);
|
||||
if ((tracks == hdd_table[i][0]) && (hpc == hdd_table[i][1]) && (spt == hdd_table[i][2]))
|
||||
{
|
||||
selection = i;
|
||||
}
|
||||
}
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_4100));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_4101));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_4100));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_4101));
|
||||
SendMessage(h, CB_SETCURSEL, selection, 0);
|
||||
return selection;
|
||||
}
|
||||
@@ -2533,7 +2546,7 @@ static BOOL CALLBACK win_settings_hard_disks_add_proc(HWND hdlg, UINT message, W
|
||||
hdd_ptr = &(temp_hdd[next_free_id]);
|
||||
}
|
||||
|
||||
SetWindowText(hdlg, win_get_string((existing & 1) ? IDS_4103 : IDS_4102));
|
||||
SetWindowText(hdlg, plat_get_string((existing & 1) ? IDS_4103 : IDS_4102));
|
||||
|
||||
no_update = 1;
|
||||
spt = (existing & 1) ? 0 : 17;
|
||||
@@ -2634,7 +2647,7 @@ static BOOL CALLBACK win_settings_hard_disks_add_proc(HWND hdlg, UINT message, W
|
||||
if ((wcslen(hd_file_name) == 0) && (hdd_ptr->bus != HDD_BUS_SCSI_REMOVABLE))
|
||||
{
|
||||
hdd_ptr->bus = HDD_BUS_DISABLED;
|
||||
msgbox_error(hwndParentDialog, IDS_4112);
|
||||
settings_msgbox(MBX_ERROR, (wchar_t *)IDS_4112);
|
||||
return TRUE;
|
||||
}
|
||||
else if ((wcslen(hd_file_name) == 0) && (hdd_ptr->bus == HDD_BUS_SCSI_REMOVABLE))
|
||||
@@ -2706,7 +2719,7 @@ static BOOL CALLBACK win_settings_hard_disks_add_proc(HWND hdlg, UINT message, W
|
||||
if (size >= 0x100000000ll)
|
||||
{
|
||||
fclose(f);
|
||||
msgbox_error(hwndParentDialog, IDS_4104);
|
||||
settings_msgbox(MBX_ERROR, (wchar_t *)IDS_4104);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2729,7 +2742,7 @@ static BOOL CALLBACK win_settings_hard_disks_add_proc(HWND hdlg, UINT message, W
|
||||
if (size > 0xffffffffffffffffll)
|
||||
{
|
||||
fclose(f);
|
||||
msgbox_error(hwndParentDialog, IDS_4105);
|
||||
settings_msgbox(MBX_ERROR, (wchar_t *)IDS_4105);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2769,7 +2782,7 @@ static BOOL CALLBACK win_settings_hard_disks_add_proc(HWND hdlg, UINT message, W
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
msgbox_info(hwndParentDialog, IDS_4113);
|
||||
settings_msgbox(MBX_INFO, (wchar_t *)IDS_4113);
|
||||
}
|
||||
|
||||
hd_add_ok_common:
|
||||
@@ -2787,7 +2800,7 @@ hd_add_ok_common:
|
||||
return TRUE;
|
||||
|
||||
case IDC_CFILE:
|
||||
if (!file_dlg_w(hdlg, win_get_string(IDS_4106), L"", !(existing & 1)))
|
||||
if (!file_dlg_w(hdlg, plat_get_string(IDS_4106), L"", !(existing & 1)))
|
||||
{
|
||||
if (!(existing & 1))
|
||||
{
|
||||
@@ -2795,7 +2808,7 @@ hd_add_ok_common:
|
||||
if (f != NULL)
|
||||
{
|
||||
fclose(f);
|
||||
if (msgbox_question(hwndMain, IDS_4111) != IDYES)
|
||||
if (settings_msgbox(MBX_QUESTION, (wchar_t *)IDS_4111) != 0) /* yes */
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -2806,7 +2819,7 @@ hd_add_ok_common:
|
||||
if (f == NULL)
|
||||
{
|
||||
hdd_add_file_open_error:
|
||||
msgbox_error(hwndParentDialog, (existing & 1) ? IDS_4107 : IDS_4108);
|
||||
settings_msgbox(MBX_ERROR, (existing & 1) ? (wchar_t *)IDS_4107 : (wchar_t *)IDS_4108);
|
||||
return TRUE;
|
||||
}
|
||||
if (existing & 1)
|
||||
@@ -2817,7 +2830,7 @@ hdd_add_file_open_error:
|
||||
fread(§or_size, 1, 4, f);
|
||||
if (sector_size != 512)
|
||||
{
|
||||
msgbox_error(hwndParentDialog, IDS_4109);
|
||||
settings_msgbox(MBX_ERROR, (wchar_t *)IDS_4109);
|
||||
fclose(f);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -3523,7 +3536,7 @@ static BOOL win_settings_floppy_drives_recalc_list(HWND hwndList)
|
||||
}
|
||||
else
|
||||
{
|
||||
lvI.pszText = win_get_string(IDS_5376);
|
||||
lvI.pszText = plat_get_string(IDS_5376);
|
||||
}
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = temp_fdd_types[i];
|
||||
@@ -3532,7 +3545,7 @@ static BOOL win_settings_floppy_drives_recalc_list(HWND hwndList)
|
||||
return FALSE;
|
||||
|
||||
lvI.iSubItem = 1;
|
||||
lvI.pszText = win_get_string(temp_fdd_turbo[i] ? IDS_2060 : IDS_2061);
|
||||
lvI.pszText = plat_get_string(temp_fdd_turbo[i] ? IDS_2060 : IDS_2061);
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = 0;
|
||||
|
||||
@@ -3542,7 +3555,7 @@ static BOOL win_settings_floppy_drives_recalc_list(HWND hwndList)
|
||||
}
|
||||
|
||||
lvI.iSubItem = 2;
|
||||
lvI.pszText = win_get_string(temp_fdd_check_bpb[i] ? IDS_2060 : IDS_2061);
|
||||
lvI.pszText = plat_get_string(temp_fdd_check_bpb[i] ? IDS_2060 : IDS_2061);
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = 0;
|
||||
|
||||
@@ -3573,21 +3586,21 @@ static BOOL win_settings_cdrom_drives_recalc_list(HWND hwndList)
|
||||
{
|
||||
case CDROM_BUS_DISABLED:
|
||||
default:
|
||||
lvI.pszText = win_get_string(fsid);
|
||||
lvI.pszText = plat_get_string(fsid);
|
||||
lvI.iImage = 0;
|
||||
break;
|
||||
case CDROM_BUS_ATAPI_PIO_ONLY:
|
||||
wsprintf(szText, win_get_string(fsid), temp_cdrom_drives[i].ide_channel >> 1, temp_cdrom_drives[i].ide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom_drives[i].ide_channel >> 1, temp_cdrom_drives[i].ide_channel & 1);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case CDROM_BUS_ATAPI_PIO_AND_DMA:
|
||||
wsprintf(szText, win_get_string(fsid), temp_cdrom_drives[i].ide_channel >> 1, temp_cdrom_drives[i].ide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom_drives[i].ide_channel >> 1, temp_cdrom_drives[i].ide_channel & 1);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case CDROM_BUS_SCSI:
|
||||
wsprintf(szText, win_get_string(fsid), temp_cdrom_drives[i].scsi_device_id, temp_cdrom_drives[i].scsi_device_lun);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom_drives[i].scsi_device_id, temp_cdrom_drives[i].scsi_device_lun);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
@@ -3609,7 +3622,7 @@ static BOOL win_settings_floppy_drives_init_columns(HWND hwndList)
|
||||
lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
|
||||
|
||||
lvc.iSubItem = 0;
|
||||
lvc.pszText = win_get_string(IDS_2143);
|
||||
lvc.pszText = plat_get_string(IDS_2143);
|
||||
|
||||
lvc.cx = 292;
|
||||
lvc.fmt = LVCFMT_LEFT;
|
||||
@@ -3620,7 +3633,7 @@ static BOOL win_settings_floppy_drives_init_columns(HWND hwndList)
|
||||
}
|
||||
|
||||
lvc.iSubItem = 1;
|
||||
lvc.pszText = win_get_string(IDS_2059);
|
||||
lvc.pszText = plat_get_string(IDS_2059);
|
||||
|
||||
lvc.cx = 50;
|
||||
lvc.fmt = LVCFMT_LEFT;
|
||||
@@ -3631,7 +3644,7 @@ static BOOL win_settings_floppy_drives_init_columns(HWND hwndList)
|
||||
}
|
||||
|
||||
lvc.iSubItem = 2;
|
||||
lvc.pszText = win_get_string(IDS_2170);
|
||||
lvc.pszText = plat_get_string(IDS_2170);
|
||||
|
||||
lvc.cx = 75;
|
||||
lvc.fmt = LVCFMT_LEFT;
|
||||
@@ -3650,7 +3663,7 @@ static BOOL win_settings_cdrom_drives_init_columns(HWND hwndList)
|
||||
lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
|
||||
|
||||
lvc.iSubItem = 0;
|
||||
lvc.pszText = win_get_string(IDS_2082);
|
||||
lvc.pszText = plat_get_string(IDS_2082);
|
||||
|
||||
lvc.cx = 392;
|
||||
lvc.fmt = LVCFMT_LEFT;
|
||||
@@ -3721,7 +3734,7 @@ static void win_settings_floppy_drives_update_item(HWND hwndList, int i)
|
||||
}
|
||||
else
|
||||
{
|
||||
lvI.pszText = win_get_string(IDS_5376);
|
||||
lvI.pszText = plat_get_string(IDS_5376);
|
||||
}
|
||||
lvI.iImage = temp_fdd_types[i];
|
||||
|
||||
@@ -3731,7 +3744,7 @@ static void win_settings_floppy_drives_update_item(HWND hwndList, int i)
|
||||
}
|
||||
|
||||
lvI.iSubItem = 1;
|
||||
lvI.pszText = win_get_string(temp_fdd_turbo[i] ? IDS_2060 : IDS_2061);
|
||||
lvI.pszText = plat_get_string(temp_fdd_turbo[i] ? IDS_2060 : IDS_2061);
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = 0;
|
||||
|
||||
@@ -3741,7 +3754,7 @@ static void win_settings_floppy_drives_update_item(HWND hwndList, int i)
|
||||
}
|
||||
|
||||
lvI.iSubItem = 2;
|
||||
lvI.pszText = win_get_string(temp_fdd_check_bpb[i] ? IDS_2060 : IDS_2061);
|
||||
lvI.pszText = plat_get_string(temp_fdd_check_bpb[i] ? IDS_2060 : IDS_2061);
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = 0;
|
||||
|
||||
@@ -3769,21 +3782,21 @@ static void win_settings_cdrom_drives_update_item(HWND hwndList, int i)
|
||||
{
|
||||
case CDROM_BUS_DISABLED:
|
||||
default:
|
||||
lvI.pszText = win_get_string(fsid);
|
||||
lvI.pszText = plat_get_string(fsid);
|
||||
lvI.iImage = 0;
|
||||
break;
|
||||
case CDROM_BUS_ATAPI_PIO_ONLY:
|
||||
wsprintf(szText, win_get_string(fsid), temp_cdrom_drives[i].ide_channel >> 1, temp_cdrom_drives[i].ide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom_drives[i].ide_channel >> 1, temp_cdrom_drives[i].ide_channel & 1);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case CDROM_BUS_ATAPI_PIO_AND_DMA:
|
||||
wsprintf(szText, win_get_string(fsid), temp_cdrom_drives[i].ide_channel >> 1, temp_cdrom_drives[i].ide_channel & 1);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom_drives[i].ide_channel >> 1, temp_cdrom_drives[i].ide_channel & 1);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
case CDROM_BUS_SCSI:
|
||||
wsprintf(szText, win_get_string(fsid), temp_cdrom_drives[i].scsi_device_id, temp_cdrom_drives[i].scsi_device_lun);
|
||||
wsprintf(szText, plat_get_string(fsid), temp_cdrom_drives[i].scsi_device_id, temp_cdrom_drives[i].scsi_device_lun);
|
||||
lvI.pszText = szText;
|
||||
lvI.iImage = 1;
|
||||
break;
|
||||
@@ -3808,28 +3821,28 @@ static void cdrom_add_locations(HWND hdlg)
|
||||
{
|
||||
if ((i == CDROM_BUS_DISABLED) || (i >= CDROM_BUS_ATAPI_PIO_ONLY))
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(combo_id_to_string_id(i)));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(combo_id_to_string_id(i)));
|
||||
}
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_ID);
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_4098), i);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4098), i);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_LUN);
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_4098), i);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4098), i);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
h = GetDlgItem(hdlg, IDC_COMBO_CD_CHANNEL_IDE);
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
wsprintf(lptsTemp, win_get_string(IDS_4097), i >> 1, i & 1);
|
||||
wsprintf(lptsTemp, plat_get_string(IDS_4097), i >> 1, i & 1);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM) lptsTemp);
|
||||
}
|
||||
|
||||
@@ -3923,7 +3936,7 @@ static BOOL CALLBACK win_settings_removable_devices_proc(HWND hdlg, UINT message
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)win_get_string(IDS_5376));
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_5376));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4274,7 +4287,7 @@ static BOOL win_settings_main_insert_categories(HWND hwndList)
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
lvI.pszText = win_get_string(IDS_2065+i);
|
||||
lvI.pszText = plat_get_string(IDS_2065+i);
|
||||
lvI.iItem = i;
|
||||
lvI.iImage = i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user