mirror of
https://github.com/digarok/gsplus.git
synced 2025-02-17 11:31:11 +00:00
re-implement alert dialogs for SDL2 version and add sane ROM message
This commit is contained in:
parent
c8c0f04173
commit
99c51da6e8
@ -752,6 +752,12 @@ int clipboard_get_char(void) {
|
||||
return c | 0x80;
|
||||
}
|
||||
|
||||
int x_show_alert(int is_fatal, const char *str) {
|
||||
if (str) {
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "GS+ Alert", str, NULL);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -759,7 +765,6 @@ int clipboard_get_char(void) {
|
||||
// THIS DRIVER.
|
||||
|
||||
// called by src/sim65816.c
|
||||
int x_show_alert(int is_fatal, const char *str) { return 0; }
|
||||
void get_ximage(Kimage *kimage_ptr) { }
|
||||
void x_toggle_status_lines() { }
|
||||
void x_redraw_status_lines() { }
|
||||
|
@ -1182,6 +1182,7 @@ void setup_gsplus_file(char *outname, int maxlen, int ok_if_missing, int can_cre
|
||||
glog(" ftp://ftp.apple.asimov.net/pub/apple_II/emulators/rom_images/");
|
||||
glog(" ... and rename the file to \"ROM\" and restart");
|
||||
glog(" ... or hit <F4> and browse for a valid ROM image.");
|
||||
x_show_alert(0, "Missing Apple IIgs ROM file.\nHit F4 to configure ROM location or refer to documentation.");
|
||||
}
|
||||
|
||||
if(can_create_file) {
|
||||
@ -1214,8 +1215,6 @@ void setup_gsplus_file(char *outname, int maxlen, int ok_if_missing, int can_cre
|
||||
// If it returns, then there was succes and we should get out
|
||||
return;
|
||||
} else if(ok_if_missing) {
|
||||
/* Just show an alert and return if ok_if_missing < 0 */
|
||||
x_show_alert(0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user