From f02b7e1791ebf7bf6844b20c625286ec27f8cc0f Mon Sep 17 00:00:00 2001 From: Toad King Date: Thu, 22 Nov 2012 02:08:50 -0500 Subject: [PATCH] [GX] set auto-return for crashes on release builds --- Makefile.wii | 2 +- gx/frontend/main.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile.wii b/Makefile.wii index 73f002b175..cea624965d 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -61,7 +61,7 @@ endif CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_CONFIGFILE=1 -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"0.9.8-beta2\" -Dmain=rarch_main -Wno-char-subscripts ifeq ($(DEBUG), 1) - CFLAGS += -O0 -g + CFLAGS += -O0 -g -DDEBUG else CFLAGS += -O3 endif diff --git a/gx/frontend/main.c b/gx/frontend/main.c index 722e6d5425..bfbcdf4b90 100644 --- a/gx/frontend/main.c +++ b/gx/frontend/main.c @@ -409,8 +409,6 @@ static void menu_free(void) rgui_free(rgui); } -int rarch_main(int argc, char **argv); - static void get_environment_settings(void) { #ifdef HW_DOL @@ -471,6 +469,8 @@ static void make_directories(void) MAKE_FILE(default_paths.config_file); } +extern void __exception_setreload(int t); + int main(int argc, char *argv[]) { #ifdef HW_RVL @@ -479,6 +479,10 @@ int main(int argc, char *argv[]) gx_init_mem2(); #endif +#ifndef DEBUG + __exception_setreload(8); +#endif + fatInitDefault(); #ifdef HAVE_LOGGER