From 2d04a8063f56b1dd6c451caee44c2a331284bd61 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 29 Nov 2015 02:27:48 +0100 Subject: [PATCH] Move retro_fail to retroarch.c --- general.h | 18 +----------------- retroarch.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/general.h b/general.h index 475d8a6a0b..be86c9fb67 100644 --- a/general.h +++ b/general.h @@ -74,22 +74,6 @@ enum sound_mode_enums * * Sanely kills the program. **/ -static INLINE void retro_fail(int error_code, const char *error) -{ - global_t *global = global_get_ptr(); - - if (!global) - return; - - /* We cannot longjmp unless we're in rarch_main_init(). - * If not, something went very wrong, and we should - * just exit right away. */ - retro_assert(global->inited.error); - - strlcpy(global->error_string, error, sizeof(global->error_string)); - longjmp(global->error_sjlj_context, error_code); -} +void retro_fail(int error_code, const char *error); #endif - - diff --git a/retroarch.c b/retroarch.c index a267109f7e..141a21906e 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1691,3 +1691,26 @@ int rarch_info_get_capabilities(enum rarch_capabilities type, char *s, size_t le return 0; } + +/** + * retro_fail: + * @error_code : Error code. + * @error : Error message to show. + * + * Sanely kills the program. + **/ +void retro_fail(int error_code, const char *error) +{ + global_t *global = global_get_ptr(); + + if (!global) + return; + + /* We cannot longjmp unless we're in rarch_main_init(). + * If not, something went very wrong, and we should + * just exit right away. */ + retro_assert(global->inited.error); + + strlcpy(global->error_string, error, sizeof(global->error_string)); + longjmp(global->error_sjlj_context, error_code); +}