Fix and improve fullscreen exit notice (also introducing MBX_DONTASK for "don't show this message again")
This commit is contained in:
@@ -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);
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#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 // "Use CTRL+ALT+PAGE DOWN.."
|
||||
#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..."
|
||||
@@ -107,6 +107,8 @@
|
||||
#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_4096 4096 // "Hard disk (%s)"
|
||||
#define IDS_4097 4097 // "%01i:%01i"
|
||||
|
@@ -37,6 +37,7 @@ extern "C" {
|
||||
#define MBX_FATAL 0x20
|
||||
#define MBX_ANSI 0x80
|
||||
#define MBX_LINKS 0x100
|
||||
#define MBX_DONTASK 0x200
|
||||
|
||||
extern int ui_msgbox(int flags, void *message);
|
||||
extern int ui_msgbox_header(int flags, void *header, void *message);
|
||||
|
@@ -881,7 +881,7 @@ BEGIN
|
||||
IDS_2049 "Error"
|
||||
IDS_2050 "Fatal error"
|
||||
IDS_2051 "Are you sure you want to save the settings?"
|
||||
IDS_2052 "Use CTRL+ALT+PAGE DOWN to return to windowed mode"
|
||||
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"
|
||||
@@ -991,6 +991,8 @@ BEGIN
|
||||
#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"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
@@ -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. */
|
||||
|
@@ -66,7 +66,7 @@ ui_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, voi
|
||||
tdb_no = {IDNO, STRING_OR_RESOURCE(btn2)},
|
||||
tdb_cancel = {IDCANCEL, STRING_OR_RESOURCE(btn3)},
|
||||
tdb_exit = {IDCLOSE, MAKEINTRESOURCE(IDS_2119)};
|
||||
int ret = 0;
|
||||
int ret = 0, checked = 0;
|
||||
|
||||
/* Configure the default OK button. */
|
||||
tdconfig.cButtons = 0;
|
||||
@@ -133,15 +133,19 @@ ui_msgbox_ex(int flags, void *header, void *message, void *btn1, void *btn2, voi
|
||||
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, NULL);
|
||||
TaskDialogIndirect(&tdconfig, &ret, NULL, &checked);
|
||||
|
||||
/* Convert return values to generic ones. */
|
||||
if (ret == IDNO) ret = 1;
|
||||
else if (ret == IDCANCEL) ret = -1;
|
||||
else ret = 0;
|
||||
|
||||
if (checked) ret += 10;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user