u32 sceCtrlReadLatch(u32 latchDataPtr) { ERROR_LOG(HLE,"FAKE sceCtrlReadLatch(%08x)", latchDataPtr); // Hackery to do it here. SampleControls(); UpdateLatch(); if (Memory::IsValidAddress(latchDataPtr)) Memory::WriteStruct(latchDataPtr, &latch); return 1; }
void sceCtrlReadLatch() { u32 latchDataPtr = PARAM(0); ERROR_LOG(HLE,"FAKE sceCtrlReadLatch(%08x)", latchDataPtr); // Hackery to do it here. SampleControls(); UpdateLatch(); if (Memory::IsValidAddress(latchDataPtr)) Memory::WriteStruct(latchDataPtr, &latch); RETURN(1); }
u32 sceCtrlReadBufferPositive(u32 ctrlDataPtr, u32 nBufs) { DEBUG_LOG(HLE,"sceCtrlReadBufferPositive(%08x, %i)", ctrlDataPtr, nBufs); _assert_msg_(HLE, nBufs > 0, "sceCtrlReadBufferPositive: trying to read nothing?"); std::lock_guard<std::recursive_mutex> guard(ctrlMutex); // Let's just ignore if ctrl is inited or not; some games don't init it (Super Fruit Fall) //if (ctrlInited) //{ SampleControls(); memcpy(Memory::GetPointer(ctrlDataPtr), &ctrl, sizeof(_ctrl_data)); //} return 1; }
void sceCtrlReadBufferPositive() { u32 ctrlDataPtr = PARAM(0); // u32 nBufs = PARAM(1); DEBUG_LOG(HLE,"sceCtrlReadBufferPositive(%08x)", PARAM(0)); std::lock_guard<std::recursive_mutex> guard(ctrlMutex); // Let's just ignore if ctrl is inited or not; some games don't init it (Super Fruit Fall) //if (ctrlInited) //{ SampleControls(); memcpy(Memory::GetPointer(ctrlDataPtr), &ctrl, sizeof(_ctrl_data)); //} RETURN(1); }