Skip to content

Commit af6fd9b

Browse files
committed
Adjust graphics acceleration string if software WebGL not automatic
#1158 #1192
1 parent 4cc4ecf commit af6fd9b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src-renderer/desktop-settings/desktop-settings.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,14 @@ <h1 class="title"></h1>
225225
hardwareAcceleration.checked = settings.hardwareAcceleration;
226226
hardwareAccelerationWarning.hidden = hardwareAcceleration.checked;
227227

228-
document.querySelector('.hardware-acceleration-label').textContent = strings['desktop-settings.hardware-acceleration-when-available'];
228+
const chromiumMajorVersion = +(navigator.userAgent.match(/Chrome\/(\d+)/)[1]);
229+
document.querySelector('.hardware-acceleration-label').textContent = (
230+
// Chromium 139 no longer does software fallback for WebGL by default
231+
// https://chromestatus.com/feature/5166674414927872
232+
chromiumMajorVersion >= 139 ?
233+
strings['desktop-settings.hardware-acceleration'] :
234+
strings['desktop-settings.hardware-acceleration-when-available']
235+
);
229236
hardwareAccelerationWarning.textContent = strings['desktop-settings.hardware-acceleration-disabled'];
230237
</script>
231238

0 commit comments

Comments
 (0)