VERY experimental Nintendo Switch 2 emulator
C++
Added bitfield instead of manually checking if the bit is set
David Marcec704742a9c5d8
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cppindex 2cae5c8f0c..b488b508d3 100644--- a/src/core/hle/kernel/svc.cpp+++ b/src/core/hle/kernel/svc.cpp@@ -301,19 +301,27 @@ static ResultCode ArbitrateUnlock(VAddr mutex_addr) {return Mutex::Release(mutex_addr);}+struct BreakReason {+ union {+ u64 raw;+ BitField<31, 1, u64> dont_kill_application;+ };+};+/// Break program executionstatic void Break(u64 reason, u64 info1, u64 info2) {- if ((reason & (1 << 31)) == 0) {- LOG_CRITICAL(+ BreakReason break_reason{reason};+ if (break_reason.dont_kill_application) {+ LOG_ERROR(Debug_Emulated,"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",reason, info1, info2);- ASSERT(false);} else {- LOG_ERROR(+ LOG_CRITICAL(Debug_Emulated,"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",reason, info1, info2);+ ASSERT(false);}}