mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-24 10:53:11 +00:00
Fix _assert_ on Android to assert properly
This commit is contained in:
parent
bfec850933
commit
cc3ba1bbf7
17
Common/Log.h
17
Common/Log.h
@ -136,7 +136,7 @@ void AndroidAssertLog(const char *func, const char *file, int line, const char *
|
||||
if (!PanicYesNo(__VA_ARGS__)) AndroidAssertLog(__FUNCTION__, __FILENAME__, __LINE__, #_a_, __VA_ARGS__); \
|
||||
}
|
||||
|
||||
#else // __ANDROID__
|
||||
#else // !defined(__ANDROID__)
|
||||
|
||||
#define _dbg_assert_msg_(_t_, _a_, ...)\
|
||||
if (!(_a_)) {\
|
||||
@ -158,15 +158,13 @@ void AndroidAssertLog(const char *func, const char *file, int line, const char *
|
||||
#endif // dbg_assert
|
||||
#endif // MAX_LOGLEVEL DEBUG
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
|
||||
#define _assert_(_a_) \
|
||||
if (!(_a_)) {\
|
||||
ERROR_LOG(SYSTEM, "Error...\n\n Line: %d\n File: %s\n\nIgnore and continue?", \
|
||||
__LINE__, __FILE__); \
|
||||
if (!PanicYesNo("*** Assertion ***\n")) { Crash(); } \
|
||||
AndroidAssertLog(__FUNCTION__, __FILENAME__, __LINE__, #_a_, "Assertion failed!"); \
|
||||
}
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
|
||||
#define _assert_msg_(_t_, _a_, ...) \
|
||||
if (!(_a_) && !PanicYesNo(__VA_ARGS__)) { \
|
||||
AndroidAssertLog(__FUNCTION__, __FILENAME__, __LINE__, #_a_, __VA_ARGS__); \
|
||||
@ -174,6 +172,13 @@ void AndroidAssertLog(const char *func, const char *file, int line, const char *
|
||||
|
||||
#else // __ANDROID__
|
||||
|
||||
#define _assert_(_a_) \
|
||||
if (!(_a_)) {\
|
||||
ERROR_LOG(SYSTEM, "Error...\n\n Line: %d\n File: %s\n\nIgnore and continue?", \
|
||||
__LINE__, __FILE__); \
|
||||
if (!PanicYesNo("*** Assertion ***\n")) { Crash(); } \
|
||||
}
|
||||
|
||||
#define _assert_msg_(_t_, _a_, ...) \
|
||||
if (!(_a_) && !PanicYesNo(__VA_ARGS__)) { \
|
||||
Crash(); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user