Merge pull request #67815 from Calinou/html5-improve-feature-errors

Improve feature errors in HTML5 for easier understanding
This commit is contained in:
Rémi Verschelde 2022-11-28 08:40:39 +01:00
commit 23f3adb7a0
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 6 additions and 6 deletions

View File

@ -215,7 +215,7 @@ const engine = new Engine(GODOT_CONFIG);
const missing = Engine.getMissingFeatures();
if (missing.length !== 0) {
const missingMsg = 'Warning!\nThe following features required to run Godot projects on the Web are missing:\n';
const missingMsg = 'Error\nThe following features required to run Godot projects on the Web are missing:\n';
displayFailureNotice(missingMsg + missing.join('\n'));
} else {
setStatusMode('indeterminate');

View File

@ -76,19 +76,19 @@ const Features = { // eslint-disable-line no-unused-vars
getMissingFeatures: function () {
const missing = [];
if (!Features.isWebGLAvailable(2)) {
missing.push('WebGL2');
missing.push('WebGL2 - Check web browser configuration and hardware support');
}
if (!Features.isFetchAvailable()) {
missing.push('Fetch');
missing.push('Fetch - Check web browser version');
}
if (!Features.isSecureContext()) {
missing.push('Secure Context');
missing.push('Secure Context - Check web server configuration (use HTTPS)');
}
if (!Features.isCrossOriginIsolated()) {
missing.push('Cross Origin Isolation');
missing.push('Cross Origin Isolation - Check web server configuration (send correct headers)');
}
if (!Features.isSharedArrayBufferAvailable()) {
missing.push('SharedArrayBuffer');
missing.push('SharedArrayBuffer - Check web server configuration (send correct headers)');
}
// Audio is normally optional since we have a dummy fallback.
return missing;