Fix last frame from previous session displaying when starting a new one

This commit is contained in:
Cameron Gutman 2022-11-06 21:42:58 -06:00
parent 11de8f49ff
commit 13c22ea16f
2 changed files with 5 additions and 1 deletions

View File

@ -722,6 +722,9 @@ function playGameMode() {
$("#main-content").addClass("fullscreen"); $("#main-content").addClass("fullscreen");
$("#listener").addClass("fullscreen"); $("#listener").addClass("fullscreen");
// Hide the NaCl module until the first frame is rendered
$("#nacl_module")[0].style.opacity = 0.0
fullscreenNaclModule(); fullscreenNaclModule();
$('#loadingSpinner').css('display', 'inline-block'); $('#loadingSpinner').css('display', 'inline-block');
} }

View File

@ -80,7 +80,8 @@ function handleMessage(msg) {
// FIXME: Really use a dialog // FIXME: Really use a dialog
snackbarLogLong(msg.data.replace('DialogMsg: ', '')); snackbarLogLong(msg.data.replace('DialogMsg: ', ''));
} else if (msg.data === 'displayVideo') { } else if (msg.data === 'displayVideo') {
$("#listener").addClass("fullscreen"); // Show the video stream now
$("#nacl_module")[0].style.opacity = 1.0;
} else if (msg.data.indexOf('controllerRumble: ' ) === 0) { } else if (msg.data.indexOf('controllerRumble: ' ) === 0) {
const eventData = msg.data.split( ' ' )[1].split(','); const eventData = msg.data.split( ' ' )[1].split(',');
const gamepadIdx = parseInt(eventData[0]); const gamepadIdx = parseInt(eventData[0]);