1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-05 21:18:30 -04:00

display config: fix mixed ID/model identifiers

fixes #2736
This commit is contained in:
bbedward
2026-07-04 13:24:53 -04:00
parent e7bd8e4002
commit 65c4167ab2
4 changed files with 32 additions and 10 deletions
+6 -1
View File
@@ -542,7 +542,12 @@ Singleton {
let width = 1920;
let height = 1080;
let refreshRate = 60;
if (output.modes && output.current_mode !== undefined) {
const configured = (output.configured_mode || "").match(/^(\d+)x(\d+)@([\d.]+)$/);
if (configured) {
width = parseInt(configured[1], 10);
height = parseInt(configured[2], 10);
refreshRate = Math.round(parseFloat(configured[3]));
} else if (output.modes && output.current_mode !== undefined) {
const mode = output.modes[output.current_mode];
if (mode) {
width = mode.width || 1920;