Merge pull request #824 from richardg867/master

TaskDialog conversion
This commit is contained in:
OBattler
2020-06-19 12:04:30 +02:00
committed by GitHub
18 changed files with 355 additions and 210 deletions

View File

@@ -451,7 +451,7 @@ load_general(void)
video_fullscreen_scale = config_get_int(cat, "video_fullscreen_scale", 0);
video_fullscreen_first = config_get_int(cat, "video_fullscreen_first", 0);
video_fullscreen_first = config_get_int(cat, "video_fullscreen_first", 1);
force_43 = !!config_get_int(cat, "force_43", 0);
scale = config_get_int(cat, "scale", 1);
@@ -713,9 +713,9 @@ load_network(void)
if (p != NULL) {
if ((network_dev_to_id(p) == -1) || (network_ndev == 1)) {
if ((network_ndev == 1) && strcmp(network_host, "none")) {
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_2094);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2094, (wchar_t *) IDS_2129);
} else if (network_dev_to_id(p) == -1) {
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_2095);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2095, (wchar_t *) IDS_2129);
}
strcpy(network_host, "none");

View File

@@ -49,7 +49,7 @@ hdd_string_to_bus(char *str, int cdrom)
if (! strcmp(str, "mfm")) {
if (cdrom) {
no_cdrom:
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_4099);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2130, (wchar_t *) IDS_4099);
return(0);
}
@@ -93,9 +93,6 @@ no_cdrom:
if (! strcmp(str, "scsi"))
return(HDD_BUS_SCSI);
if (! strcmp(str, "usb"))
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_4110);
return(0);
}

View File

@@ -42,6 +42,10 @@
#endif
#define COPYRIGHT_YEAR "2020"
/* Web URL info. */
#define EMU_SITE L"86box.github.io"
#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest"
/* Filename and pathname info. */
#define CONFIG_FILE L"86box.cfg"
#define NVR_PATH L"nvr"

View File

@@ -22,10 +22,10 @@
/* String IDs. */
#define IDS_STRINGS 2048 // "86Box"
#define IDS_2049 2049 // "86Box Error"
#define IDS_2050 2050 // "86Box Fatal Error"
#define IDS_2051 2051 // "This will hard reset the.."
#define IDS_2052 2052 // "Use CTRL+ALT+PAGE DOWN.."
#define IDS_2049 2049 // "Error"
#define IDS_2050 2050 // "Fatal error"
#define IDS_2051 2051 // "Are you sure you want to save..."
#define IDS_2052 2052 // "Press CTRL+ALT+PAGE DOWN..."
#define IDS_2053 2053 // "Speed"
#define IDS_2054 2054 // "ZIP %i (%03i): %ls"
#define IDS_2055 2055 // "ZIP images (*.IM?)\0*.IM..."
@@ -36,8 +36,8 @@
#define IDS_2060 2060 // "On"
#define IDS_2061 2061 // "Off"
#define IDS_2062 2062 // "All floppy images (*.DSK..."
#define IDS_2063 2063 // "Configured ROM set not avai.."
#define IDS_2064 2064 // "Configured video BIOS not.."
#define IDS_2063 2063 // "Machine ""%S"" is not..."
#define IDS_2064 2064 // "Video card ""%S"" is not..."
#define IDS_2065 2065 // "Machine"
#define IDS_2066 2066 // "Display"
#define IDS_2067 2067 // "Input devices"
@@ -62,7 +62,7 @@
#define IDS_2086 2086 // "MB"
#define IDS_2087 2087 // "Check BPB"
#define IDS_2088 2088 // "KB"
#define IDS_2089 2089 // "Neither DirectDraw nor Dire.."
#define IDS_2089 2089 // "Could not initialize the video..."
#define IDS_2090 2090 // "Default"
#define IDS_2091 2091 // "%i Wait state(s)"
#define IDS_2092 2092 // "Type"
@@ -77,8 +77,8 @@
#define IDS_2101 2101 // "Microsoft SideWinder Pad"
#define IDS_2102 2102 // "Thrustmaster Flight Cont.."
#define IDS_2103 2103 // "None"
#define IDS_2104 2104 // "Unable to load Accelerators"
#define IDS_2105 2105 // "Unable to register Raw Input"
#define IDS_2104 2104 // "Unable to load keyboard..."
#define IDS_2105 2105 // "Unable to register raw input."
#define IDS_2106 2106 // "%u"
#define IDS_2107 2107 // "%u MB (CHS: %i, %i, %i)"
#define IDS_2108 2108 // "Floppy %i (%s): %ls"
@@ -92,6 +92,26 @@
#define IDS_2116 2116 // "MO images (*.IM?)\0*.IM..."
#define IDS_2117 2117 // "Welcome to 86Box!"
#define IDS_2118 2118 // "Internal controller"
#define IDS_2119 2119 // "Exit"
#define IDS_2120 2120 // "No ROMs found"
#define IDS_2121 2121 // "Save changes\nThis will hard..."
#define IDS_2122 2122 // "Discard changes\nAll changes..."
#define IDS_2123 2123 // "Cancel\nGo back to the..."
#define IDS_2124 2124 // "About " EMU_NAME
#define IDS_2125 2125 // EMU_NAME " v" EMU_VERSION
#define IDS_2126 2126 // "An emulator of old computers..."
#define IDS_2127 2127 // "OK"
#define IDS_2128 2128 // "Hardware not available"
#define IDS_2129 2129 // "Make sure " LIB_NAME_PCAP "..."
#define IDS_2130 2130 // "Invalid configuration"
#define IDS_2131 2131 // LIB_NAME_FREETYPE " is required..."
#define IDS_2132 2132 // LIB_NAME_GS " is required for...
#define IDS_2133 2133 // LIB_NAME_FLUIDSYNTH " is required..."
#define IDS_2134 2134 // "Entering fullscreen mode"
#define IDS_2135 2135 // "Don't show this message again"
#define IDS_2136 2136 // "Don't Exit"
#define IDS_2137 2137 // "Reset"
#define IDS_2138 2138 // "Don't Reset"
#define IDS_4096 4096 // "Hard disk (%s)"
#define IDS_4097 4097 // "%01i:%01i"
@@ -101,16 +121,24 @@
#define IDS_4101 4101 // "Custom (large)..."
#define IDS_4102 4102 // "Add New Hard Disk"
#define IDS_4103 4103 // "Add Existing Hard Disk"
#define IDS_4104 4104 // "Attempting to create a HDI ima.."
#define IDS_4105 4105 // "Attempting to create a spurio.."
#define IDS_4104 4104 // "HDI disk images cannot be..."
#define IDS_4105 4105 // "Disk images cannot be larger..."
#define IDS_4106 4106 // "Hard disk images (*.HDI;*.HD.."
#define IDS_4107 4107 // "Unable to open the file for read"
#define IDS_4108 4108 // "Unable to open the file for write"
#define IDS_4109 4109 // "HDI or HDX image with a sect.."
#define IDS_4110 4110 // "USB is not yet supported"
#define IDS_4111 4111 // "This image exists and will be.."
#define IDS_4112 4112 // "Please enter a valid file name"
#define IDS_4111 4111 // "Disk image file already exists"
#define IDS_4112 4112 // "Please specify a valid file name."
#define IDS_4113 4113 // "Remember to partition and fo.."
#define IDS_4114 4114 // "Make sure the file exists and..."
#define IDS_4115 4115 // "Make sure the file is being..."
#define IDS_4116 4116 // "Disk image too large"
#define IDS_4117 4117 // "Remember to partition and format..."
#define IDS_4118 4118 // "The selected file will be..."
#define IDS_4119 4119 // "Unsupported disk image"
#define IDS_4120 4120 // "Overwrite"
#define IDS_4121 4121 // "Don't Overwrite"
#define IDS_4352 4352 // "MFM/RLL"
#define IDS_4353 4353 // "XT IDE"

View File

@@ -36,8 +36,12 @@ extern "C" {
#define MBX_QUESTION_YN 4
#define MBX_FATAL 0x20
#define MBX_ANSI 0x80
#define MBX_LINKS 0x100
#define MBX_DONTASK 0x200
extern int ui_msgbox(int type, void *arg);
extern int ui_msgbox(int flags, void *message);
extern int ui_msgbox_header(int flags, void *header, void *message);
extern int ui_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, void *btn3);
extern void ui_check_menu_item(int id, int checked);

View File

@@ -438,7 +438,7 @@ network_reset(void)
if (i < 0) {
/* Tell user we can't do this (at the moment.) */
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_2093);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2093, (wchar_t *) IDS_2129);
// FIXME: we should ask in the dialog if they want to
// reconfigure or quit, and throw them into the

View File

@@ -283,7 +283,7 @@ fatal(const char *fmt, ...)
to avoid things like threads getting stuck. */
do_stop();
ui_msgbox(MBX_ERROR|MBX_FATAL|MBX_ANSI, temp);
ui_msgbox(MBX_ERROR | MBX_FATAL | MBX_ANSI, temp);
fflush(stdlog);
@@ -553,6 +553,7 @@ int
pc_init_modules(void)
{
int c, m;
wchar_t temp[512];
pc_log("Scanning for ROM images:\n");
c = m = 0;
@@ -568,11 +569,12 @@ pc_init_modules(void)
/* Load the ROMs for the selected machine. */
if (! machine_available(machine)) {
swprintf(temp, sizeof(temp), plat_get_string(IDS_2063), machine_getname());
c = 0;
machine = -1;
while (machine_get_internal_name_ex(c) != NULL) {
if (machine_available(c)) {
ui_msgbox(MBX_INFO, (wchar_t *)IDS_2063);
ui_msgbox_header(MBX_INFO, (wchar_t *) IDS_2128, temp);
machine = c;
config_save();
break;
@@ -588,11 +590,12 @@ pc_init_modules(void)
/* Make sure we have a usable video card. */
if (! video_card_available(gfxcard)) {
swprintf(temp, sizeof(temp), plat_get_string(IDS_2064), video_card_getname(gfxcard));
c = 0;
while (video_get_internal_name(c) != NULL) {
gfxcard = -1;
if (video_card_available(c)) {
ui_msgbox(MBX_INFO, (wchar_t *)IDS_2064);
ui_msgbox_header(MBX_INFO, (wchar_t *) IDS_2128, temp);
gfxcard = c;
config_save();
break;

View File

@@ -2036,7 +2036,7 @@ escp_init(void *lpt)
if (ft_handle == NULL) {
ft_handle = dynld_module(fn, ft_imports);
if (ft_handle == NULL) {
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_2110);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2110, (wchar_t *) IDS_2131);
return(NULL);
}
}
@@ -2044,7 +2044,7 @@ escp_init(void *lpt)
/* Initialize FreeType. */
if (ft_lib == NULL) {
if (ft_Init_FreeType(&ft_lib)) {
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_2110);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2110, (wchar_t *) IDS_2131);
dynld_close(ft_lib);
ft_lib = NULL;
return(NULL);

View File

@@ -352,7 +352,7 @@ ps_init(void *lpt)
/* Try loading the DLL. */
ghostscript_handle = dynld_module(PATH_GHOSTSCRIPT_DLL, ghostscript_imports);
if (ghostscript_handle == NULL) {
ui_msgbox(MBX_ERROR, (wchar_t *) IDS_2114);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2114, (wchar_t *) IDS_2132);
} else {
if (gsapi_revision(&rev, sizeof(rev)) == 0) {
pclog("Loaded %s, rev %ld (%ld)\n", rev.product, rev.revision, rev.revisiondate);

View File

@@ -230,7 +230,7 @@ void* fluidsynth_init(const device_t *info)
#endif
if (fluidsynth_handle == NULL)
{
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_2080);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2080, (wchar_t *) IDS_2133);
return NULL;
}

View File

@@ -163,7 +163,7 @@ BEGIN
#endif
POPUP "&Help"
BEGIN
MENUITEM "&About 86Box...", IDM_ABOUT
MENUITEM "&About " EMU_NAME "...", IDM_ABOUT
END
END
@@ -274,19 +274,6 @@ END
//
// Dialog
//
DLG_ABOUT DIALOG DISCARDABLE 0, 0, 209, 114
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About 86Box"
FONT 9, "Segoe UI"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,94,71,12
ICON 100,IDC_ABOUT_ICON,7,7,20,20
LTEXT "86Box v" EMU_VERSION " - An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, MoochMcGee, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2. See LICENSE for more information.",
IDC_ABOUT_ICON,54,7,146,73
CONTROL "",IDC_ABOUT_ICON,"Static",SS_BLACKFRAME | SS_SUNKEN,0,
86,208,1
END
DLG_STATUS DIALOG DISCARDABLE 0, 0, 186, 386
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Status"
@@ -331,7 +318,7 @@ END
DLG_CONFIG DIALOG DISCARDABLE 0, 0, 366, 251
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "86Box Settings"
CAPTION EMU_NAME " Settings"
FONT 9, "Segoe UI"
BEGIN
DEFPUSHBUTTON "OK",IDOK,246,230,50,14
@@ -516,7 +503,7 @@ BEGIN
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Configure",IDC_CONFIGURE_HDC,222,25,38,12
LTEXT "FDC Controller:",IDT_1768,7,44,48,10
LTEXT "FD Controller:",IDT_1768,7,44,48,10
COMBOBOX IDC_COMBO_FDC,64,43,155,120,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Configure",IDC_CONFIGURE_FDC,222,43,38,12
@@ -890,27 +877,27 @@ END
STRINGTABLE DISCARDABLE
BEGIN
2048 "86Box"
IDS_2049 "86Box Error"
IDS_2050 "86Box Fatal Error"
IDS_2051 "This will hard reset the emulated machine.\nAre you sure you want to save the settings?"
IDS_2052 "Use CTRL+ALT+PAGE DOWN to return to windowed mode"
2048 EMU_NAME
IDS_2049 "Error"
IDS_2050 "Fatal error"
IDS_2051 "Are you sure you want to save the settings?"
IDS_2052 "Press CTRL+ALT+PAGE DOWN to return to windowed mode."
IDS_2053 "Speed"
IDS_2054 "ZIP %03i %i (%s): %ls"
IDS_2055 "ZIP images (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0"
IDS_2056 "86Box could not find any usable ROM images.\n\nPlease download a ROM set from https://github.com/86Box/roms/releases/latest and extract it into the ""roms"" directory."
IDS_2056 EMU_NAME " could not find any usable ROM images.\n\nPlease download a ROM set from <a href=""" EMU_ROMS_URL """>" EMU_ROMS_URL "</a> and extract it into the ""roms"" directory."
IDS_2057 "(empty)"
IDS_2058 "ZIP images (*.IM?;*.ZDI)\0*.IM?;*.ZDI\0All files (*.*)\0*.*\0"
IDS_2059 "Turbo"
IDS_2060 "On"
IDS_2061 "Off"
IDS_2062 "All images (*.86F;*.DSK;*.FLP;*.IM?;*.*FD?)\0*.86F;*.DSK;*.FLP;*.IM?;*.*FD?\0Basic sector images (*.DSK;*.FLP;*.IM?;*.*FD?)\0*.DSK;*.FLP;*.IM?;*.IMG;*.*FD?\0Surface images (*.86F)\0*.86F\0"
IDS_2063 "Configured ROM set not available.\nDefaulting to an available ROM set."
IDS_2063 "Machine ""%S"" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine."
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_2064 "Configured video BIOS not available.\nDefaulting to an available video BIOS."
IDS_2064 "Video card ""%S"" is not available due to missing ROMs in the roms/video directory. Switching to an available video card."
IDS_2065 "Machine"
IDS_2066 "Display"
IDS_2067 "Input devices"
@@ -930,7 +917,7 @@ END
STRINGTABLE DISCARDABLE
BEGIN
IDS_2080 "Unable to initialize FluidSynth, libfluidsynth.dll is required"
IDS_2080 "Unable to initialize FluidSynth"
IDS_2081 "Bus"
IDS_2082 "File"
IDS_2083 "C"
@@ -939,11 +926,11 @@ BEGIN
IDS_2086 "MB"
IDS_2087 "Check BPB"
IDS_2088 "KB"
IDS_2089 "86Box could not initialize the video renderer."
IDS_2089 "Could not initialize the video renderer."
IDS_2090 "Default"
IDS_2091 "%i Wait state(s)"
IDS_2092 "Type"
IDS_2093 "PCap failed to set up because it may not be initialized"
IDS_2093 "Failed to set up PCap"
IDS_2094 "No PCap devices found"
IDS_2095 "Invalid PCap device"
IDS_2096 "Standard 2-button joystick(s)"
@@ -954,21 +941,61 @@ BEGIN
IDS_2101 "Microsoft SideWinder Pad"
IDS_2102 "Thrustmaster Flight Control System"
IDS_2103 "None"
IDS_2104 "Unable to load Keyboard Accelerators!"
IDS_2105 "Unable to register Raw Input!"
IDS_2104 "Unable to load keyboard accelerators."
IDS_2105 "Unable to register raw input."
IDS_2106 "%u"
IDS_2107 "%u MB (CHS: %i, %i, %i)"
IDS_2108 "Floppy %i (%s): %ls"
IDS_2109 "All images (*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF)\0*.0??;*.1??;*.??0;*.86F;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.JSON;*.TD0;*.*FD?;*.MFM;*.XDF\0Advanced sector images (*.IMD;*.JSON;*.TD0)\0*.IMD;*.JSON;*.TD0\0Basic sector images (*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?)\0*.0??;*.1??;*.??0;*.BIN;*.CQ?;*.D??;*.FLP;*.HDM;*.IM?;*.XDF;*.*FD?\0Flux images (*.FDI)\0*.FDI\0Surface images (*.86F;*.MFM)\0*.86F;*.MFM\0All files (*.*)\0*.*\0"
IDS_2110 "Unable to initialize FreeType, freetype.dll is required"
IDS_2110 "Unable to initialize FreeType"
IDS_2111 "Unable to initialize SDL, SDL2.dll is required"
IDS_2112 "Are you sure you want to hard reset the emulated machine?"
IDS_2113 "Are you sure you want to quit 86Box?"
IDS_2114 "Unable to initialize Ghostscript, gsdll32.dll is required for automatic convertion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript files (.ps)."
IDS_2113 "Are you sure you want to exit " EMU_NAME "?"
IDS_2114 "Unable to initialize Ghostscript"
IDS_2115 "MO %i (%03i): %ls"
IDS_2116 "MO images (*.IM?)\0*.IM?\0All files (*.*)\0*.*\0"
IDS_2117 "Welcome to 86Box!"
IDS_2118 "Internal controller"
IDS_2117 "Welcome to " EMU_NAME "!"
IDS_2118 "Internal controller"
IDS_2119 "Exit"
IDS_2120 "No ROMs found"
IDS_2121 "Save changes\nThis will hard reset the emulated machine."
IDS_2122 "Discard changes\nAll changes made to the settings will be lost."
IDS_2123 "Cancel\nGo back to the Settings window."
IDS_2124 "About " EMU_NAME
IDS_2125 EMU_NAME " v" EMU_VERSION
IDS_2126 "An emulator of old computers\n\nAuthors: Sarah Walker, Miran Grca, Fred N. van Kempen (waltje), SA1988, MoochMcGee, reenigne, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2. See LICENSE for more information."
IDS_2127 "OK"
IDS_2128 "Hardware not available"
#ifdef _WIN32
#define LIB_NAME_PCAP "WinPcap"
#else
#define LIB_NAME_PCAP "libpcap"
#endif
IDS_2129 "Make sure " LIB_NAME_PCAP " is installed and that you are on a " LIB_NAME_PCAP "-compatible network connection."
IDS_2130 "Invalid configuration"
#ifdef _WIN32
#define LIB_NAME_FREETYPE "freetype.dll"
#else
#define LIB_NAME_FREETYPE "libfreetype"
#endif
IDS_2131 LIB_NAME_FREETYPE " is required for ESC/P printer emulation."
#ifdef _WIN32
#define LIB_NAME_GS "gsdll32.dll"
#else
#define LIB_NAME_GS "libgs"
#endif
IDS_2132 LIB_NAME_GS " is required for automatic conversion of PostScript files to PDF.\n\nAny documents sent to the generic PostScript printer will be saved as PostScript (.ps) files."
#ifdef _WIN32
#define LIB_NAME_FLUIDSYNTH "libfluidsynth.dll"
#else
#define LIB_NAME_FLUIDSYNTH "libfluidsynth"
#endif
IDS_2133 LIB_NAME_FLUIDSYNTH " is required for FluidSynth MIDI output."
IDS_2134 "Entering fullscreen mode"
IDS_2135 "Don't show this message again"
IDS_2136 "Don't Exit"
IDS_2137 "Reset"
IDS_2138 "Don't Reset"
END
STRINGTABLE DISCARDABLE
@@ -981,16 +1008,24 @@ BEGIN
IDS_4101 "Custom (large)..."
IDS_4102 "Add New Hard Disk"
IDS_4103 "Add Existing Hard Disk"
IDS_4104 "Attempting to create a HDI image larger than 4 GB"
IDS_4105 "Attempting to create a hard disk image beyond the 28-bit LBA limit"
IDS_4104 "HDI disk images cannot be larger than 4 GB."
IDS_4105 "Disk images cannot be larger than 127 GB."
IDS_4106 "Hard disk images (*.HD?;*.IM?;*.VHD)\0*.HD?;*.IM?;*.VHD\0All files (*.*)\0*.*\0"
IDS_4107 "Unable to open the file for read"
IDS_4108 "Unable to open the file for write"
IDS_4109 "HDI or HDX images with a sector size that is not 512 are not supported"
IDS_4107 "Unable to read file"
IDS_4108 "Unable to write file"
IDS_4109 "HDI or HDX images with a sector size other than 512 are not supported."
IDS_4110 "USB is not yet supported"
IDS_4111 "This image exists and will be overwritten.\nAre you sure you want to use it?"
IDS_4112 "Please enter a valid file name"
IDS_4113 "The image has been successfully created."
IDS_4111 "Disk image file already exists"
IDS_4112 "Please specify a valid file name."
IDS_4113 "Disk image created"
IDS_4114 "Make sure the file exists and is readable."
IDS_4115 "Make sure the file is being saved to a writable directory."
IDS_4116 "Disk image too large"
IDS_4117 "Remember to partition and format the newly-created drive."
IDS_4118 "The selected file will be overwritten. Are you sure you want to use it?"
IDS_4119 "Unsupported disk image"
IDS_4120 "Overwrite"
IDS_4121 "Don't Overwrite"
IDS_4352 "MFM/RLL"
IDS_4353 "XTA"

View File

@@ -789,8 +789,8 @@ plat_setfullscreen(int on)
if (on && video_fullscreen) return;
if (on && video_fullscreen_first) {
video_fullscreen_first = 0;
ui_msgbox(MBX_INFO, (wchar_t *)IDS_2052);
if (ui_msgbox_header(MBX_INFO | MBX_DONTASK, (wchar_t *) IDS_2134, (wchar_t *) IDS_2052) == 10)
video_fullscreen_first = 0;
}
/* OK, claim the video. */

View File

@@ -21,6 +21,7 @@
#include <windows.h>
#include <windowsx.h>
#undef BITMAP
#include <commctrl.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -31,45 +32,29 @@
#include <86box/win.h>
#if defined(__amd64__) || defined(__aarch64__)
static LRESULT CALLBACK
#else
static BOOL CALLBACK
#endif
AboutDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND h;
HANDLE ih;
switch (message) {
case WM_INITDIALOG:
plat_pause(1);
h = GetDlgItem(hdlg, IDC_ABOUT_ICON);
ih = LoadImage(hinstance,(PCTSTR)10,IMAGE_ICON,64,64,0);
SendMessage(h, STM_SETIMAGE, (WPARAM)IMAGE_ICON,
(LPARAM)ih);
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
case IDCANCEL:
EndDialog(hdlg, 0);
plat_pause(0);
return TRUE;
default:
break;
}
break;
}
return(FALSE);
}
void
AboutDialogCreate(HWND hwnd)
{
DialogBox(hinstance, (LPCTSTR)DLG_ABOUT, hwnd, AboutDialogProcedure);
int i;
TASKDIALOGCONFIG tdconfig = {0};
TASKDIALOG_BUTTON tdbuttons[] = {
{IDOK, EMU_SITE},
{IDCANCEL, MAKEINTRESOURCE(IDS_2127)}
};
tdconfig.cbSize = sizeof(tdconfig);
tdconfig.hwndParent = hwnd;
tdconfig.hInstance = hinstance;
tdconfig.dwCommonButtons = 0;
tdconfig.pszWindowTitle = MAKEINTRESOURCE(IDS_2124);
tdconfig.pszMainIcon = (PCWSTR) 10;
tdconfig.pszMainInstruction = MAKEINTRESOURCE(IDS_2125);
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2126);
tdconfig.cButtons = ARRAYSIZE(tdbuttons);
tdconfig.pButtons = tdbuttons;
tdconfig.nDefaultButton = IDCANCEL;
TaskDialogIndirect(&tdconfig, &i, NULL, NULL);
if (i == IDOK)
ShellExecute(hwnd, L"open", L"https://" EMU_SITE, NULL, NULL, SW_SHOW);
}

View File

@@ -34,93 +34,122 @@
#include <86box/win.h>
#define STRING_OR_RESOURCE(s) ((!(s)) ? (NULL) : ((((uintptr_t)s) < ((uintptr_t)65636)) ? (MAKEINTRESOURCE(s)) : (s)))
WCHAR wopenfilestring[512];
char openfilestring[512];
uint8_t filterindex = 0;
int
ui_msgbox(int flags, void *arg)
ui_msgbox(int flags, void *message)
{
WCHAR temp[512];
DWORD fl = 0;
WCHAR *str = NULL;
WCHAR *cap = NULL;
return ui_msgbox_ex(flags, NULL, message, NULL, NULL, NULL);
}
int
ui_msgbox_header(int flags, void *header, void *message)
{
return ui_msgbox_ex(flags, header, message, NULL, NULL, NULL);
}
int
ui_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, void *btn3) {
WCHAR temp[512];
TASKDIALOGCONFIG tdconfig = {0};
TASKDIALOG_BUTTON tdbuttons[3],
tdb_yes = {IDYES, STRING_OR_RESOURCE(btn1)},
tdb_no = {IDNO, STRING_OR_RESOURCE(btn2)},
tdb_cancel = {IDCANCEL, STRING_OR_RESOURCE(btn3)},
tdb_exit = {IDCLOSE, MAKEINTRESOURCE(IDS_2119)};
int ret = 0, checked = 0;
/* Configure the default OK button. */
tdconfig.cButtons = 0;
if (btn1)
tdbuttons[tdconfig.cButtons++] = tdb_yes;
else
tdconfig.dwCommonButtons = TDCBF_OK_BUTTON;
/* Configure the message type. */
switch(flags & 0x1f) {
case MBX_INFO: /* just an informational message */
fl = (MB_OK | MB_ICONINFORMATION);
cap = plat_get_string(IDS_STRINGS); /* "86Box" */
tdconfig.pszMainIcon = TD_INFORMATION_ICON;
break;
case MBX_ERROR: /* error message */
if (flags & MBX_FATAL) {
fl = (MB_OK | MB_ICONERROR);
cap = plat_get_string(IDS_2050); /* "Fatal Error"*/
tdconfig.pszMainIcon = TD_ERROR_ICON;
tdconfig.pszMainInstruction = MAKEINTRESOURCE(IDS_2050); /* "Fatal error" */
/* replace default "OK" button with "Exit" button */
if (btn1)
tdconfig.cButtons = 0;
else
tdconfig.dwCommonButtons = 0;
tdbuttons[tdconfig.cButtons++] = tdb_exit;
} else {
fl = (MB_OK | MB_ICONWARNING);
cap = plat_get_string(IDS_2049); /* "Error" */
tdconfig.pszMainIcon = TD_WARNING_ICON;
tdconfig.pszMainInstruction = MAKEINTRESOURCE(IDS_2049); /* "Error" */
}
break;
case MBX_QUESTION: /* question */
fl = (MB_YESNOCANCEL | MB_ICONQUESTION);
cap = plat_get_string(IDS_STRINGS); /* "86Box" */
break;
case MBX_QUESTION_YN:
if (!btn1) /* replace default "OK" button with "Yes" button */
tdconfig.dwCommonButtons = TDCBF_YES_BUTTON;
case MBX_QUESTION_YN: /* question */
fl = (MB_YESNO | MB_ICONQUESTION);
cap = plat_get_string(IDS_STRINGS); /* "86Box" */
if (btn2) /* "No" button */
tdbuttons[tdconfig.cButtons++] = tdb_no;
else
tdconfig.dwCommonButtons |= TDCBF_NO_BUTTON;
if (flags & MBX_QUESTION) {
if (btn3) /* "Cancel" button */
tdbuttons[tdconfig.cButtons++] = tdb_cancel;
else
tdconfig.dwCommonButtons |= TDCBF_CANCEL_BUTTON;
}
break;
}
/* If ANSI string, convert it. */
str = (WCHAR *)arg;
/* If the message is an ANSI string, convert it. */
tdconfig.pszContent = (WCHAR *) STRING_OR_RESOURCE(message);
if (flags & MBX_ANSI) {
mbstowcs(temp, (char *)arg, strlen((char *)arg)+1);
str = temp;
} else {
/*
* It's a Unicode string.
*
* Well, no, maybe not. It could also be one of the
* strings stored in the Resources. Those are wide,
* but referenced by a numeric ID.
*
* The good news is, that strings are usually stored
* in the executable near the end of the code/rodata
* segment. This means, that *real* string pointers
* usually have a pretty high (numeric) value, much
* higher than the numeric ID's. So, we guesswork
* that if the value of 'arg' is low, its an ID..
*/
if (((uintptr_t)arg) < ((uintptr_t)65636))
str = plat_get_string((intptr_t)arg);
mbstowcs(temp, (char *)message, strlen((char *)message)+1);
tdconfig.pszContent = temp;
}
/* At any rate, we do have a valid (wide) string now. */
fl = MessageBox(hwndMain, /* our main window */
str, /* error message etc */
cap, /* window caption */
fl);
/* Configure the rest of the TaskDialog. */
tdconfig.cbSize = sizeof(tdconfig);
tdconfig.hwndParent = hwndMain;
if (flags & MBX_LINKS)
tdconfig.dwFlags = TDF_USE_COMMAND_LINKS;
tdconfig.pszWindowTitle = MAKEINTRESOURCE(IDS_STRINGS);
if (header)
tdconfig.pszMainInstruction = STRING_OR_RESOURCE(header);
tdconfig.pButtons = tdbuttons;
if (flags & MBX_DONTASK)
tdconfig.pszVerificationText = MAKEINTRESOURCE(IDS_2135);
/* Run the TaskDialog. */
TaskDialogIndirect(&tdconfig, &ret, NULL, &checked);
/* Convert return values to generic ones. */
if (fl == IDNO) fl = 1;
else if (fl == IDCANCEL) fl = -1;
else fl = 0;
if (ret == IDNO) ret = 1;
else if (ret == IDCANCEL) ret = -1;
else ret = 0;
return(fl);
if (checked) ret += 10;
return(ret);
}
#if 0
int
msgbox_reset_yn(HWND hwnd)
{
return(MessageBox(hwnd, plat_get_string(IDS_2051),
#endif
int
file_dlg_w(HWND hwnd, WCHAR *f, WCHAR *fn, int save)
{

View File

@@ -429,7 +429,7 @@ media_menu_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
plat_pause(1);
ret = d86f_export(id, wopenfilestring);
if (!ret)
ui_msgbox(MBX_ERROR, (wchar_t *)IDS_4108);
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_4108, (wchar_t *) IDS_4115);
plat_pause(0);
}
break;

View File

@@ -515,7 +515,7 @@ static wchar_t fd_file_name[1024];
/* Show a MessageBox dialog. This is nasty, I know. --FvK */
static int
new_floppy_msgbox(HWND hwnd, int type, void *arg)
new_floppy_msgbox_header(HWND hwnd, int flags, void *header, void *message)
{
HWND h;
int i;
@@ -523,7 +523,24 @@ new_floppy_msgbox(HWND hwnd, int type, void *arg)
h = hwndMain;
hwndMain = hwnd;
i = ui_msgbox(type, arg);
i = ui_msgbox_header(flags, header, message);
hwndMain = h;
return(i);
}
static int
new_floppy_msgbox_ex(HWND hwnd, int flags, void *header, void *message, void *btn1, void *btn2, void *btn3)
{
HWND h;
int i;
h = hwndMain;
hwndMain = hwnd;
i = ui_msgbox_ex(flags, header, message, btn1, btn2, btn3);
hwndMain = h;
@@ -607,7 +624,7 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
//ui_sb_mount_floppy_img(fdd_id, sb_part, 0, fd_file_name);
floppy_mount(fdd_id, fd_file_name, 0);
} else {
new_floppy_msgbox(hdlg, MBX_ERROR, (wchar_t *)IDS_4108);
new_floppy_msgbox_header(hdlg, MBX_ERROR, (wchar_t *) IDS_4108, (wchar_t *) IDS_4115);
return TRUE;
}
/*FALLTHROUGH*/
@@ -637,7 +654,7 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
f = _wfopen(wopenfilestring, L"rb");
if (f != NULL) {
fclose(f);
if (new_floppy_msgbox(hdlg, MBX_QUESTION, (wchar_t *)IDS_4111) != 0) /* yes */
if (new_floppy_msgbox_ex(hdlg, MBX_QUESTION, (wchar_t *) IDS_4111, (wchar_t *) IDS_4118, (wchar_t *) IDS_4120, (wchar_t *) IDS_4121, NULL) != 0) /* yes */
return FALSE;
}
SendMessage(h, WM_SETTEXT, 0, (LPARAM) wopenfilestring);

View File

@@ -178,7 +178,7 @@ image_list_init(HWND hwndList, const uint8_t *icon_ids)
/* Show a MessageBox dialog. This is nasty, I know. --FvK */
static int
settings_msgbox(int type, void *arg)
settings_msgbox_header(int flags, void *header, void *message)
{
HWND h;
int i;
@@ -186,7 +186,24 @@ settings_msgbox(int type, void *arg)
h = hwndMain;
hwndMain = hwndParentDialog;
i = ui_msgbox(type, arg);
i = ui_msgbox_header(flags, header, message);
hwndMain = h;
return(i);
}
static int
settings_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, void *btn3)
{
HWND h;
int i;
h = hwndMain;
hwndMain = hwndParentDialog;
i = ui_msgbox_ex(flags, header, message, btn1, btn2, btn3);
hwndMain = h;
@@ -396,15 +413,21 @@ static int
settings_msgbox_reset(void)
{
int changed, i = 0;
HWND h;
changed = win_settings_changed();
if (changed) {
i = settings_msgbox(MBX_QUESTION, (wchar_t *)IDS_2051);
h = hwndMain;
hwndMain = hwndParentDialog;
i = ui_msgbox_ex(MBX_QUESTION | MBX_LINKS, (wchar_t *) IDS_2051, NULL, (wchar_t *) IDS_2121, (wchar_t *) IDS_2122, (wchar_t *) IDS_2123);
hwndMain = h;
if (i == 1) return(1); /* no */
if (i < 0) return(0); /* cancel */
if (i == -1) return(0); /* cancel */
return(2); /* yes */
} else
@@ -2862,7 +2885,7 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
/* Make sure no file name is allowed with removable SCSI hard disks. */
if (wcslen(hd_file_name) == 0) {
hdd_ptr->bus = HDD_BUS_DISABLED;
settings_msgbox(MBX_ERROR, (wchar_t *)IDS_4112);
settings_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2130, (wchar_t *) IDS_4112);
return TRUE;
}
@@ -2906,14 +2929,14 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
if (size > 0x1FFFFFFE00ll) {
fclose(f);
settings_msgbox(MBX_ERROR, (wchar_t *)IDS_4105);
settings_msgbox_header(MBX_ERROR, (wchar_t *) IDS_4116, (wchar_t *) IDS_4105);
return TRUE;
}
if (image_is_hdi(hd_file_name)) {
if (size >= 0x100000000ll) {
fclose(f);
settings_msgbox(MBX_ERROR, (wchar_t *)IDS_4104);
settings_msgbox_header(MBX_ERROR, (wchar_t *) IDS_4116, (wchar_t *) IDS_4104);
return TRUE;
}
@@ -3008,7 +3031,7 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
free(big_buf);
fclose(f);
settings_msgbox(MBX_INFO, (wchar_t *)IDS_4113);
settings_msgbox_header(MBX_INFO, (wchar_t *) IDS_4113, (wchar_t *) IDS_4117);
}
hard_disk_added = 1;
@@ -3037,7 +3060,7 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
f = _wfopen(wopenfilestring, L"rb");
if (f != NULL) {
fclose(f);
if (settings_msgbox(MBX_QUESTION, (wchar_t *)IDS_4111) != 0) /* yes */
if (settings_msgbox_ex(MBX_QUESTION_YN, (wchar_t *) IDS_4111, (wchar_t *) IDS_4118, (wchar_t *) IDS_4120, (wchar_t *) IDS_4121, NULL) != 0) /* yes */
return FALSE;
}
}
@@ -3046,7 +3069,7 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
if (f == NULL) {
hdd_add_file_open_error:
fclose(f);
settings_msgbox(MBX_ERROR, (existing & 1) ? (wchar_t *)IDS_4107 : (wchar_t *)IDS_4108);
settings_msgbox_header(MBX_ERROR, (existing & 1) ? (wchar_t *) IDS_4114 : (wchar_t *) IDS_4115, (existing & 1) ? (wchar_t *) IDS_4107 : (wchar_t *) IDS_4108);
return TRUE;
}
if (existing & 1) {
@@ -3054,7 +3077,7 @@ hdd_add_file_open_error:
fseeko64(f, 0x10, SEEK_SET);
fread(&sector_size, 1, 4, f);
if (sector_size != 512) {
settings_msgbox(MBX_ERROR, (wchar_t *)IDS_4109);
settings_msgbox_header(MBX_ERROR, (wchar_t *) IDS_4119, (wchar_t *) IDS_4109);
fclose(f);
return TRUE;
}

View File

@@ -312,7 +312,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case IDM_ACTION_HRESET:
win_notify_dlg_open();
i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2112);
i = ui_msgbox_ex(MBX_QUESTION_YN, (wchar_t *) IDS_2112, NULL, (wchar_t *) IDS_2137, (wchar_t *) IDS_2138, NULL);
if (i == 0)
pc_reset_hard();
win_notify_dlg_closed();
@@ -327,7 +327,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (no_quit_confirm)
i = 0;
else
i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2113);
i = ui_msgbox_ex(MBX_QUESTION_YN, (wchar_t *) IDS_2113, NULL, (wchar_t *) IDS_2119, (wchar_t *) IDS_2136, NULL);
if (i == 0) {
UnhookWindowsHookEx(hKeyboardHook);
KillTimer(hwnd, TIMER_1SEC);
@@ -695,7 +695,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (no_quit_confirm)
i = 0;
else
i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2113);
i = ui_msgbox_ex(MBX_QUESTION_YN, (wchar_t *) IDS_2113, NULL, (wchar_t *) IDS_2119, (wchar_t *) IDS_2136, NULL);
if (i == 0) {
UnhookWindowsHookEx(hKeyboardHook);
KillTimer(hwnd, TIMER_1SEC);
@@ -731,7 +731,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (manager_wm)
break;
win_notify_dlg_open();
i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2112);
i = ui_msgbox_ex(MBX_QUESTION_YN, (wchar_t *) IDS_2112, NULL, (wchar_t *) IDS_2137, (wchar_t *) IDS_2138, NULL);
if (i == 0)
pc_reset_hard();
win_notify_dlg_closed();
@@ -744,7 +744,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
if (no_quit_confirm)
i = 0;
else
i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2113);
i = ui_msgbox_ex(MBX_QUESTION_YN, (wchar_t *) IDS_2113, NULL, (wchar_t *) IDS_2119, (wchar_t *) IDS_2136, NULL);
if (i == 0) {
UnhookWindowsHookEx(hKeyboardHook);
KillTimer(hwnd, TIMER_1SEC);
@@ -819,6 +819,20 @@ SubWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
}
static HRESULT CALLBACK
TaskDialogProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, LONG_PTR lpRefData)
{
switch (message) {
case TDN_HYPERLINK_CLICKED:
/* open linked URL */
ShellExecute(hwnd, L"open", (LPCWSTR) lParam, NULL, NULL, SW_SHOW);
break;
}
return S_OK;
}
int
ui_init(int nCmdShow)
{
@@ -826,18 +840,31 @@ ui_init(int nCmdShow)
WNDCLASSEX wincl; /* buffer for main window's class */
RAWINPUTDEVICE ridev; /* RawInput device */
MSG messages; /* received-messages buffer */
HWND hwnd = NULL; /* handle for our window */
HWND hwnd = NULL; /* handle for our window */
HACCEL haccel; /* handle to accelerator table */
RECT sbar_rect; /* RECT of the status bar */
RECT sbar_rect; /* RECT of the status bar */
int bRet;
TASKDIALOGCONFIG tdconfig = {0};
TASKDIALOG_BUTTON tdbuttons[] = {{IDCANCEL, MAKEINTRESOURCE(IDS_2119)}};
/* Set up TaskDialog configuration. */
tdconfig.cbSize = sizeof(tdconfig);
tdconfig.dwFlags = TDF_ENABLE_HYPERLINKS;
tdconfig.dwCommonButtons = 0;
tdconfig.pszWindowTitle = MAKEINTRESOURCE(IDS_STRINGS);
tdconfig.pszMainIcon = TD_ERROR_ICON;
tdconfig.pszMainInstruction = MAKEINTRESOURCE(IDS_2050);
tdconfig.cButtons = ARRAYSIZE(tdbuttons);
tdconfig.pButtons = tdbuttons;
tdconfig.pfCallback = TaskDialogProcedure;
/* Start settings-only mode if requested. */
if (settings_only) {
if (! pc_init_modules()) {
/* Dang, no ROMs found at all! */
MessageBox(hwnd,
plat_get_string(IDS_2056),
plat_get_string(IDS_2050),
MB_OK | MB_ICONERROR);
tdconfig.pszMainInstruction = MAKEINTRESOURCE(IDS_2120);
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2056);
TaskDialogIndirect(&tdconfig, NULL, NULL, NULL);
return(6);
}
@@ -895,7 +922,7 @@ ui_init(int nCmdShow)
menuMain, /* menu */
hinstance, /* Program Instance handler */
NULL); /* no Window Creation data */
hwndMain = hwnd;
hwndMain = tdconfig.hwndParent = hwnd;
ui_window_title(title);
@@ -925,10 +952,8 @@ ui_init(int nCmdShow)
ridev.dwFlags = RIDEV_NOHOTKEYS;
ridev.hwndTarget = NULL; /* current focus window */
if (! RegisterRawInputDevices(&ridev, 1, sizeof(ridev))) {
MessageBox(hwndMain,
plat_get_string(IDS_2105),
plat_get_string(IDS_2050),
MB_OK | MB_ICONERROR);
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2105);
TaskDialogIndirect(&tdconfig, NULL, NULL, NULL);
return(4);
}
keyboard_getkeymap();
@@ -939,10 +964,8 @@ ui_init(int nCmdShow)
/* Load the accelerator table */
haccel = LoadAccelerators(hinstance, ACCEL_NAME);
if (haccel == NULL) {
MessageBox(hwndMain,
plat_get_string(IDS_2104),
plat_get_string(IDS_2050),
MB_OK | MB_ICONERROR);
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2104);
TaskDialogIndirect(&tdconfig, NULL, NULL, NULL);
return(3);
}
@@ -972,19 +995,16 @@ ui_init(int nCmdShow)
/* All done, fire up the actual emulated machine. */
if (! pc_init_modules()) {
/* Dang, no ROMs found at all! */
MessageBox(hwnd,
plat_get_string(IDS_2056),
plat_get_string(IDS_2050),
MB_OK | MB_ICONERROR);
tdconfig.pszMainInstruction = MAKEINTRESOURCE(IDS_2120);
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2056);
TaskDialogIndirect(&tdconfig, NULL, NULL, NULL);
return(6);
}
/* Initialize the configured Video API. */
if (! plat_setvid(vid_api)) {
MessageBox(hwnd,
plat_get_string(IDS_2089),
plat_get_string(IDS_2050),
MB_OK | MB_ICONERROR);
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2089);
TaskDialogIndirect(&tdconfig, NULL, NULL, NULL);
return(5);
}