Merge remote-tracking branch 'origin/master' into feature/machine_and_kb
This commit is contained in:
@@ -563,22 +563,48 @@ do_stop(void)
|
||||
|
||||
int ui_msgbox(int flags, void *message)
|
||||
{
|
||||
return ui_msgbox_header(flags, message, NULL);
|
||||
return ui_msgbox_header(flags, NULL, message);
|
||||
}
|
||||
|
||||
int ui_msgbox_header(int flags, void *message, void* header)
|
||||
int ui_msgbox_header(int flags, void *header, void* message)
|
||||
{
|
||||
if (!header) header = L"86Box";
|
||||
SDL_MessageBoxData msgdata;
|
||||
SDL_MessageBoxButtonData msgbtn;
|
||||
if (!header) header = (flags & MBX_ANSI) ? "86Box" : L"86Box";
|
||||
if (header <= (void*)7168) header = plat_get_string(header);
|
||||
if (message <= (void*)7168) message = plat_get_string(message);
|
||||
msgbtn.buttonid = 1;
|
||||
msgbtn.text = "OK";
|
||||
msgbtn.flags = 0;
|
||||
memset(&msgdata, 0, sizeof(SDL_MessageBoxData));
|
||||
msgdata.numbuttons = 1;
|
||||
msgdata.buttons = &msgbtn;
|
||||
int msgflags = 0;
|
||||
if (msgflags & MBX_FATAL) msgflags |= SDL_MESSAGEBOX_ERROR;
|
||||
else if (msgflags & MBX_ERROR || msgflags & MBX_WARNING) msgflags |= SDL_MESSAGEBOX_WARNING;
|
||||
else msgflags |= SDL_MESSAGEBOX_INFORMATION;
|
||||
msgdata.flags = msgflags;
|
||||
if (flags & MBX_ANSI)
|
||||
{
|
||||
fwprintf(stderr, L"%s\n", header);
|
||||
fprintf(stderr, "==========================\n"
|
||||
"%s\n", message);
|
||||
return 0;
|
||||
int button = 0;
|
||||
msgdata.title = header;
|
||||
msgdata.message = message;
|
||||
SDL_ShowMessageBox(&msgdata, &button);
|
||||
return button;
|
||||
}
|
||||
fwprintf(stderr, L"%s\n", header);
|
||||
fwprintf(stderr, L"==========================\n"
|
||||
L"%s\n", plat_get_string(message));
|
||||
else
|
||||
{
|
||||
int button = 0;
|
||||
char *res = SDL_iconv_string("UTF-8", sizeof(wchar_t) == 2 ? "UTF-16LE" : "UTF-32LE", (char *)message, wcslen(message) * sizeof(wchar_t) + sizeof(wchar_t));
|
||||
char *res2 = SDL_iconv_string("UTF-8", sizeof(wchar_t) == 2 ? "UTF-16LE" : "UTF-32LE", (char *)header, wcslen(header) * sizeof(wchar_t) + sizeof(wchar_t));
|
||||
msgdata.message = res;
|
||||
msgdata.title = res2;
|
||||
SDL_ShowMessageBox(&msgdata, &button);
|
||||
free(res);
|
||||
free(res2);
|
||||
return button;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -973,7 +999,7 @@ int main(int argc, char** argv)
|
||||
SDL_Init(0);
|
||||
pc_init(argc, argv);
|
||||
if (! pc_init_modules()) {
|
||||
fprintf(stderr, "No ROMs found.\n");
|
||||
ui_msgbox_header(MBX_FATAL, L"No ROMs found.", L"86Box could not find any usable ROM images.\n\nPlease download a ROM set and extract it into the \"roms\" directory.");
|
||||
SDL_Quit();
|
||||
return 6;
|
||||
}
|
||||
|
@@ -825,12 +825,19 @@ END
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
// defining the icons depending on the build status
|
||||
#ifdef RELEASE_BUILD
|
||||
/* Icon by Devcore - https://commons.wikimedia.org/wiki/File:Icon_PC_256x256.png */
|
||||
10 ICON DISCARDABLE ICON_PATH "icons/86Box-RB.ico"
|
||||
/* Icon by OBattler and laciba96 (green for release builds)*/
|
||||
10 ICON DISCARDABLE ICON_PATH "icons/86Box-green.ico"
|
||||
#elif BETA_BUILD
|
||||
/* Icon by OBattler and laciba96 (yellow for beta builds done by Jenkins)*/
|
||||
10 ICON DISCARDABLE ICON_PATH "icons/86Box-yellow.ico"
|
||||
#elif ALPHA_BUILD
|
||||
/* Icon by OBattler and laciba96 (red for alpha builds done by Jenkins)*/
|
||||
10 ICON DISCARDABLE ICON_PATH "icons/86Box-red.ico"
|
||||
#else
|
||||
/* Icon by Devcore - https://commons.wikimedia.org/wiki/File:Icon_PC2_256x256.png */
|
||||
10 ICON DISCARDABLE ICON_PATH "icons/86Box.ico"
|
||||
/* Icon by OBattler and laciba96 (gray for builds of branches and from the git master)*/
|
||||
10 ICON DISCARDABLE ICON_PATH "icons/86Box-gray.ico"
|
||||
#endif
|
||||
16 ICON DISCARDABLE ICON_PATH "icons/floppy_525.ico"
|
||||
17 ICON DISCARDABLE ICON_PATH "icons/floppy_525_active.ico"
|
||||
|
BIN
src/win/icons/86Box-gray.ico
Normal file
BIN
src/win/icons/86Box-gray.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
BIN
src/win/icons/86Box-green.ico
Normal file
BIN
src/win/icons/86Box-green.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 142 KiB |
BIN
src/win/icons/86Box-red.ico
Normal file
BIN
src/win/icons/86Box-red.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 145 KiB |
BIN
src/win/icons/86Box-yellow.ico
Normal file
BIN
src/win/icons/86Box-yellow.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
Reference in New Issue
Block a user