mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-11 08:39:48 +12:00
[IR] Fix disconnect
This commit is contained in:
parent
03ae0d02d8
commit
af8661a249
1 changed files with 7 additions and 0 deletions
|
@ -118,6 +118,13 @@ void IRUserService::requireConnection(u32 messagePointer) {
|
|||
void IRUserService::disconnect(u32 messagePointer) {
|
||||
log("IR:USER: Disconnect\n");
|
||||
|
||||
if (sharedMemory.has_value()) {
|
||||
u32 sharedMemAddress = sharedMemory.value().addr;
|
||||
|
||||
mem.write8(sharedMemAddress + offsetof(SharedMemoryStatus, connectionStatus), 0);
|
||||
mem.write8(sharedMemAddress + offsetof(SharedMemoryStatus, isConnected), 0);
|
||||
}
|
||||
|
||||
// If there's a connected device, disconnect it and trigger the status event
|
||||
if (connectedDevice) {
|
||||
connectedDevice = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue