mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2026-06-18 06:41:11 +00:00
minor updates for quitting apps
This commit is contained in:
+8
-4
@@ -154,6 +154,7 @@ function showAppsMode() {
|
|||||||
$("#main-content").removeClass("fullscreen");
|
$("#main-content").removeClass("fullscreen");
|
||||||
$("#listener").removeClass("fullscreen");
|
$("#listener").removeClass("fullscreen");
|
||||||
$("body").css('backgroundColor', 'white');
|
$("body").css('backgroundColor', 'white');
|
||||||
|
gameSelectUpdated(); // since we just played the game, we need to show it as running once we quit.
|
||||||
}
|
}
|
||||||
|
|
||||||
// every time the user selects an app from the select menu,
|
// every time the user selects an app from the select menu,
|
||||||
@@ -246,11 +247,14 @@ function fullscreenNaclModule() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function stopGame() {
|
function stopGame() {
|
||||||
if(!api || !api.paired) {
|
|
||||||
api = new NvHTTP(target, myUniqueid);
|
|
||||||
}
|
|
||||||
api.refreshServerInfo().then(function (ret) {
|
api.refreshServerInfo().then(function (ret) {
|
||||||
return api.quitApp();
|
api.getAppById(api.currentGame).then(function (runningApp) {
|
||||||
|
var appName = runningApp.title;
|
||||||
|
snackbarLog('Stopping ' + appName);
|
||||||
|
return api.quitApp().then(function (ret2) {
|
||||||
|
gameSelectUpdated(); // once we quit the app, refresh the button text
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
showAppsMode();
|
showAppsMode();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user