diff --git a/Core/HLE/sceCtrl.cpp b/Core/HLE/sceCtrl.cpp index 1ef00dbdaf87..1b552a419189 100644 --- a/Core/HLE/sceCtrl.cpp +++ b/Core/HLE/sceCtrl.cpp @@ -503,18 +503,20 @@ static int sceCtrlPeekBufferNegative(u32 ctrlDataPtr, u32 nBufs) return done; } -void __CtrlWriteUserLatch(CtrlLatch *userLatch) { +static void __CtrlWriteUserLatch(CtrlLatch *userLatch, int bufs) { *userLatch = latch; userLatch->btnBreak &= CTRL_MASK_USER; userLatch->btnMake &= CTRL_MASK_USER; userLatch->btnPress &= CTRL_MASK_USER; - userLatch->btnRelease &= CTRL_MASK_USER; + if (bufs > 0) { + userLatch->btnRelease |= CTRL_MASK_USER; + } } static u32 sceCtrlPeekLatch(u32 latchDataPtr) { auto userLatch = PSPPointer::Create(latchDataPtr); if (userLatch.IsValid()) { - __CtrlWriteUserLatch(userLatch); + __CtrlWriteUserLatch(userLatch, ctrlLatchBufs); } return hleLogSuccessI(SCECTRL, ctrlLatchBufs); } @@ -522,7 +524,7 @@ static u32 sceCtrlPeekLatch(u32 latchDataPtr) { static u32 sceCtrlReadLatch(u32 latchDataPtr) { auto userLatch = PSPPointer::Create(latchDataPtr); if (userLatch.IsValid()) { - __CtrlWriteUserLatch(userLatch); + __CtrlWriteUserLatch(userLatch, ctrlLatchBufs); } return hleLogSuccessI(SCECTRL, __CtrlResetLatch()); } diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 661211d1d0d0..d81a229d16ca 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -374,6 +374,7 @@ int main(int argc, const char* argv[]) g_Config.bBlockTransferGPU = true; g_Config.iSplineBezierQuality = 2; g_Config.bHighQualityDepth = true; + g_Config.bMemStickInserted = true; #ifdef _WIN32 InitSysDirectories();