mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
more verbose logging, fixed minor namespace pollution
This commit is contained in:
parent
2d4fc6628f
commit
7a87c76091
@ -16,6 +16,7 @@ function createWindow(state) {
|
||||
}
|
||||
|
||||
chrome.app.runtime.onLaunched.addListener(function() {
|
||||
console.log('Chrome app runtime launched.');
|
||||
var windowState = 'normal';
|
||||
|
||||
if (chrome.storage) {
|
||||
|
@ -76,7 +76,7 @@ function restoreUiAfterNaClLoad() {
|
||||
$('#naclSpinner').hide();
|
||||
$('#loadingSpinner').css('display', 'none');
|
||||
showHostsAndSettingsMode();
|
||||
for(hostUID in hosts) {
|
||||
for(var hostUID in hosts) {
|
||||
beginBackgroundPollingOfHost(hosts[hostUID]);
|
||||
}
|
||||
|
||||
@ -579,10 +579,10 @@ function playGameMode() {
|
||||
$(".mdl-layout__header").hide();
|
||||
$("#main-content").children().not("#listener, #loadingSpinner").hide();
|
||||
$("#main-content").addClass("fullscreen");
|
||||
fullscreenNaclModule();
|
||||
$("body").css('backgroundColor', 'black');
|
||||
|
||||
chrome.app.window.current().fullscreen();
|
||||
fullscreenNaclModule();
|
||||
$('#loadingSpinner').css('display', 'inline-block');
|
||||
|
||||
}
|
||||
@ -691,7 +691,7 @@ function saveFramerate() {
|
||||
// unfortunately, objects with function instances (classes) are stripped of their function instances when converted to a raw object
|
||||
// so we cannot forget to revive the object after we load it.
|
||||
function saveHosts() {
|
||||
for(hostUID in hosts) {
|
||||
for(var hostUID in hosts) {
|
||||
// slim the object down to only store the necessary bytes, because we have limited storage
|
||||
hosts[hostUID]._prepareForStorage();
|
||||
}
|
||||
@ -741,6 +741,7 @@ function updateDefaultBitrate() {
|
||||
}
|
||||
|
||||
function onWindowLoad(){
|
||||
console.log('Window loaded.');
|
||||
// don't show the game selection div
|
||||
$('#gameSelection').css('display', 'none');
|
||||
|
||||
@ -787,13 +788,14 @@ function onWindowLoad(){
|
||||
// load previously connected hosts, which have been killed into an object, and revive them back into a class
|
||||
chrome.storage.sync.get('hosts', function(previousValue) {
|
||||
hosts = previousValue.hosts != null ? previousValue.hosts : {};
|
||||
for(hostUID in hosts) { // programmatically add each new host.
|
||||
for(var hostUID in hosts) { // programmatically add each new host.
|
||||
var revivedHost = new NvHTTP(hosts[hostUID].address, myUniqueid, hosts[hostUID].userEnteredAddress);
|
||||
revivedHost.serverUid = hosts[hostUID].serverUid;
|
||||
revivedHost.externalIP = hosts[hostUID].externalIP;
|
||||
revivedHost.hostname = hosts[hostUID].hostname;
|
||||
addHostToGrid(revivedHost);
|
||||
}
|
||||
console.log('Loaded previously connected hosts.');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ NvHTTP.prototype = {
|
||||
string += 'gpu type: ' + this.gputype + '\r\n';
|
||||
string += 'number of apps: ' + this.numofapps + '\r\n';
|
||||
string += 'supported display modes: ' + '\r\n';
|
||||
for(displayMode in this.supportedDisplayModes) {
|
||||
for(var displayMode in this.supportedDisplayModes) {
|
||||
string += '\t' + displayMode + ': ' + this.supportedDisplayModes[displayMode] + '\r\n';
|
||||
}
|
||||
return string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user