mirror of
https://github.com/digarok/gsplus.git
synced 2024-09-25 04:54:37 +00:00
fatal_printf - show an alert immediately.
win32 - actually show the alert.
This commit is contained in:
parent
886a1a591a
commit
9d6c9a4e6e
@ -12,6 +12,7 @@
|
||||
|
||||
#include "glog.h"
|
||||
|
||||
extern int x_show_alert(int fatal, const char *str);
|
||||
|
||||
#define MAX_FATAL_LOGS 20
|
||||
|
||||
@ -70,10 +71,12 @@ int fatal_printf(const char *fmt, ...) {
|
||||
|
||||
glog(buffer);
|
||||
|
||||
x_show_alert(1, buffer);
|
||||
/*
|
||||
if (g_fatal_log < MAX_FATAL_LOGS) {
|
||||
g_fatal_log_strs[g_fatal_log++] = strdup(buffer);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
va_end(ap);
|
||||
return ret;
|
||||
|
@ -61,6 +61,10 @@ void x_dialog_create_gsport_conf(const char *str) {
|
||||
}
|
||||
|
||||
int x_show_alert(int is_fatal, const char *str) {
|
||||
|
||||
if (str && *str) {
|
||||
MessageBox(NULL, str, "GS+", is_fatal ? MB_ICONERROR : MB_ICONWARNING);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user