ref: b7be4d672bbf4b91e883496cb1470bd767d490cd
parent: 393e572945ba9f2c011d97d70292776d2207804e
author: Snesrev <snesrev@protonmail.com>
date: Tue Oct 11 17:52:26 EDT 2022
Show a message box on errors in release mode on Windows.
--- a/main.c
+++ b/main.c
@@ -65,6 +65,9 @@
static int g_sdl_audio_mixer_volume = SDL_MIX_MAXVOLUME;
void NORETURN Die(const char *error) {
+#if defined(NDEBUG) && defined(_WIN32)
+ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, kWindowTitle, error, NULL);
+#endif
fprintf(stderr, "Error: %s\n", error);
exit(1);
}
@@ -742,7 +745,7 @@
uint8 *data = ReadFile("tables/zelda3_assets.dat", &length);
if (!data)
data = ReadFile("zelda3_assets.dat", &length);
- if (!data) Die("Failed to read zelda3_assets.dat");
+ if (!data) Die("Failed to read zelda3_assets.dat. Please see the README for information about how you get this file.");
static const char kAssetsSig[] = { kAssets_Sig };