Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

common: common_funcs: Log error on R_UNLESS.

bunneid685f12dbc4d
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index 842d62ca71..71d136d4ae 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -97,6 +97,9 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
#define R_UNLESS(expr, res) \
{ \
if (!(expr)) { \
+ if (res.IsError()) { \
+ LOG_CRITICAL(Kernel, "Failed with error {}", res.raw); \
+ } \
return res; \
} \
}