mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 20:50:38 +00:00
Duke3d: VM_ASSERT fix
This commit is contained in:
parent
86e2f4ec8a
commit
7fbcab3dc1
1 changed files with 14 additions and 2 deletions
|
@ -1383,15 +1383,27 @@ static void ResizeArray(int const arrayNum, int const newSize)
|
||||||
# define abort_after_error(...) continue // non-threaded dispatch handles this in the loop condition in VM_Execute()
|
# define abort_after_error(...) continue // non-threaded dispatch handles this in the loop condition in VM_Execute()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define VM_ASSERT(condition, ...) \
|
#if defined _MSC_VER
|
||||||
|
#define VM_ASSERT(condition, fmt, ...) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (EDUKE32_PREDICT_FALSE(!(condition))) \
|
if (EDUKE32_PREDICT_FALSE(!(condition))) \
|
||||||
{ \
|
{ \
|
||||||
CON_ERRPRINTF(__VA_ARGS__); \
|
CON_ERRPRINTF(fmt, __VA_ARGS__); \
|
||||||
abort_after_error(); \
|
abort_after_error(); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#else
|
||||||
|
#define VM_ASSERT(condition, fmt, ...) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
if (EDUKE32_PREDICT_FALSE(!(condition))) \
|
||||||
|
{ \
|
||||||
|
CON_ERRPRINTF(fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||||
|
abort_after_error(); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
GAMEEXEC_STATIC void VM_Execute(int const loop /*= false*/)
|
GAMEEXEC_STATIC void VM_Execute(int const loop /*= false*/)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue