Skip to content

Commit

Permalink
Close app on peer Roku device when closed on simulator (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvcabral authored Feb 3, 2025
1 parent bf53950 commit 6b2ef83
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/helpers/roku.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ ipcMain.on("keySent", (_, data) => {
}
});

ipcMain.on("currentApp", (_, data) => {
if (data.id === "") {
// Terminate current app
const device = getPeerRoku();
if (!device.deploy) {
return;
}
if (isValidIP(device.ip)) {
postEcpRequest(device, "/exit-app/dev");
postEcpRequest(device, "/keypress/home");
}
}
});

export function resetPeerRoku() {
sendECPKeys = false;
}
Expand Down

0 comments on commit 6b2ef83

Please sign in to comment.