From ea5996bf0237c7bcbe17ba66d443532f68026cd1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 9 Jun 2013 20:38:54 -0700 Subject: [PATCH] Don't restart release on double keyoff. Fixes Kingdom Hearts bug, #2066. --- Core/HLE/sceSas.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index cee3f663c4..5ce7df48bf 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -261,7 +261,7 @@ u32 sceSasSetKeyOn(u32 core, int voiceNum) { return ERROR_SAS_INVALID_VOICE; } - if (sas->voices[voiceNum].paused) { + if (sas->voices[voiceNum].paused || sas->voices[voiceNum].on) { return ERROR_SAS_VOICE_PAUSED; } @@ -282,7 +282,7 @@ u32 sceSasSetKeyOff(u32 core, int voiceNum) { } else { DEBUG_LOG(HLE,"sceSasSetKeyOff(%08x, %i)", core, voiceNum); - if (sas->voices[voiceNum].paused) { + if (sas->voices[voiceNum].paused || !sas->voices[voiceNum].on) { return ERROR_SAS_VOICE_PAUSED; }