Made it compile as GUI again on Windows and made the help message a message box.
This commit is contained in:
@@ -73,7 +73,7 @@ if(WIN32)
|
|||||||
|
|
||||||
# Default value for the `WIN32` target property, which specifies whether
|
# Default value for the `WIN32` target property, which specifies whether
|
||||||
# to build the application for the Windows GUI or console subsystem
|
# to build the application for the Windows GUI or console subsystem
|
||||||
option(CMAKE_WIN32_EXECUTABLE "Build a Windows GUI executable" OFF)
|
option(CMAKE_WIN32_EXECUTABLE "Build a Windows GUI executable" ON)
|
||||||
else()
|
else()
|
||||||
# Prefer dynamic builds everywhere else
|
# Prefer dynamic builds everywhere else
|
||||||
set(PREFER_STATIC OFF)
|
set(PREFER_STATIC OFF)
|
||||||
|
|||||||
52
src/86box.c
52
src/86box.c
@@ -666,40 +666,44 @@ usage:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("\nUsage: 86box [options] [cfg-file]\n\n");
|
ui_msgbox(MBX_INFO, L"\nUsage: 86box [options] [cfg-file]\n\n"
|
||||||
printf("Valid options are:\n\n");
|
"Valid options are:\n\n"
|
||||||
printf("-? or --help - show this information\n");
|
"-? or --help\t\t\t- show this information\n"
|
||||||
printf("-C or --config path - set 'path' to be config file\n");
|
"-C or --config path\t\t- set 'path' to be config file\n"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
printf("-D or --debug - force debug output logging\n");
|
"-D or --debug\t\t\t- force debug output logging\n"
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
printf("-E or --nographic - forces the old behavior\n");
|
"-E or --nographic\t\t- forces the old behavior\n"
|
||||||
#endif
|
#endif
|
||||||
printf("-F or --fullscreen - start in fullscreen mode\n");
|
"-F or --fullscreen\t\t- start in fullscreen mode\n"
|
||||||
printf("-G or --lang langid - start with specified language (e.g. en-US, or system)\n");
|
"-G or --lang langid\t\t- start with specified language\n"
|
||||||
|
"\t\t\t\t (e.g. en-US, or system)\n"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n");
|
"-H or --hwnd id,hwnd\t\t- sends back the main dialog's hwnd\n"
|
||||||
#endif
|
#endif
|
||||||
printf("-I or --image d:path - load 'path' as floppy image on drive d\n");
|
"-I or --image d:path\t\t- load 'path' as floppy image on drive d\n"
|
||||||
#ifdef USE_INSTRUMENT
|
#ifdef USE_INSTRUMENT
|
||||||
printf("-J or --instrument name - set 'name' to be the profiling instrument\n");
|
"-J or --instrument name\t- set 'name' to be the profiling instrument\n"
|
||||||
#endif
|
#endif
|
||||||
printf("-L or --logfile path - set 'path' to be the logfile\n");
|
"-L or --logfile pat\t\t- set 'path' to be the logfile\n"
|
||||||
printf("-M or --missing - dump missing machines and video cards\n");
|
"-M or --missing\t\t- dump missing machines and video cards\n"
|
||||||
printf("-N or --noconfirm - do not ask for confirmation on quit\n");
|
"-N or --noconfirm\t\t- do not ask for confirmation on quit\n"
|
||||||
printf("-P or --vmpath path - set 'path' to be root for vm\n");
|
"-P or --vmpath path\t\t- set 'path' to be root for vm\n"
|
||||||
printf("-R or --rompath path - set 'path' to be ROM path\n");
|
"-R or --rompath path\t\t- set 'path' to be ROM path\n"
|
||||||
#ifndef USE_SDL_UI
|
#ifndef USE_SDL_UI
|
||||||
printf("-S or --settings - show only the settings dialog\n");
|
"-S or --settings\t\t\t- show only the settings dialog\n"
|
||||||
#endif
|
#endif
|
||||||
printf("-T or --testmode - test mode: execute the test mode entry point on init/hard reset\n");
|
"-T or --testmode\t\t- test mode: execute the test mode entry\n"
|
||||||
printf("-V or --vmname name - overrides the name of the running VM\n");
|
"\t\t\t\t point on init/hard reset\n"
|
||||||
printf("-W or --nohook - disables keyboard hook (compatibility-only outside Windows)\n");
|
"-V or --vmname name\t\t- overrides the name of the running VM\n"
|
||||||
printf("-X or --clear what - clears the 'what' (cmos/flash/both)\n");
|
"-W or --nohook\t\t- disables keyboard hook\n"
|
||||||
printf("-Y or --donothing - do not show any UI or run the emulation\n");
|
"\t\t\t\t (compatibility-only outside Windows)\n"
|
||||||
printf("-Z or --lastvmpath - the last parameter is VM path rather than config\n");
|
"-X or --clear what\t\t- clears the 'what' (cmos/flash/both)\n"
|
||||||
printf("\nA config file can be specified. If none is, the default file will be used.\n");
|
"-Y or --donothing\t\t- do not show any UI or run the emulation\n"
|
||||||
|
"-Z or --lastvmpath\t\t- the last parameter is VM path rather\n"
|
||||||
|
"\t\t\t\t than config\n"
|
||||||
|
"\nA config file can be specified. If none is, the default file will be used.\n");
|
||||||
return 0;
|
return 0;
|
||||||
} else if (!strcasecmp(argv[c], "--lastvmpath") || !strcasecmp(argv[c], "-Z")) {
|
} else if (!strcasecmp(argv[c], "--lastvmpath") || !strcasecmp(argv[c], "-Z")) {
|
||||||
lvmp = 1;
|
lvmp = 1;
|
||||||
|
|||||||
@@ -141,7 +141,14 @@ ui_msgbox_header(int flags, void *header, void *message)
|
|||||||
|
|
||||||
// any error in early init
|
// any error in early init
|
||||||
if (main_window == nullptr) {
|
if (main_window == nullptr) {
|
||||||
QMessageBox msgBox(QMessageBox::Icon::Critical, hdr, msg);
|
auto msgicon = QMessageBox::Icon::Critical;
|
||||||
|
if (flags & MBX_INFO)
|
||||||
|
msgicon = QMessageBox::Icon::Information;
|
||||||
|
else if (flags & MBX_QUESTION)
|
||||||
|
msgicon = QMessageBox::Icon::Question;
|
||||||
|
else if (flags & MBX_WARNING)
|
||||||
|
msgicon = QMessageBox::Icon::Warning;
|
||||||
|
QMessageBox msgBox(msgicon, hdr, msg);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
} else {
|
} else {
|
||||||
// else scope it to main_window
|
// else scope it to main_window
|
||||||
|
|||||||
Reference in New Issue
Block a user