mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-09 20:41:38 +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) {
|
void IRUserService::disconnect(u32 messagePointer) {
|
||||||
log("IR:USER: Disconnect\n");
|
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 there's a connected device, disconnect it and trigger the status event
|
||||||
if (connectedDevice) {
|
if (connectedDevice) {
|
||||||
connectedDevice = false;
|
connectedDevice = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue