re-implement alert dialogs for SDL2 version and add sane ROM message

This commit is contained in:
Dagen Brock 2018-08-10 09:32:55 -05:00
parent c8c0f04173
commit 99c51da6e8
2 changed files with 7 additions and 3 deletions

View File

@ -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() { }

View File

@ -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;
}