VERY experimental Nintendo Switch 2 emulator
C++
hle: service: Ensure system is powered on before writing IPC result.
bunnei8cf0ba96d9c8
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cppindex abf3d1ea3b..d55fba831b 100644--- a/src/core/hle/service/service.cpp+++ b/src/core/hle/service/service.cpp@@ -184,7 +184,11 @@ ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& coUNIMPLEMENTED_MSG("command_type={}", context.GetCommandType());}- context.WriteToOutgoingCommandBuffer(context.GetThread());+ // If emulation was shutdown, we are closing service threads, do not write the response back to+ // memory that may be shutting down as well.+ if (system.IsPoweredOn()) {+ context.WriteToOutgoingCommandBuffer(context.GetThread());+ }return RESULT_SUCCESS;}