mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-11 14:59:38 -04:00
fix(DisplayConfigState): Repair crash introduced in Automatic configs PR
This commit is contained in:
@@ -266,8 +266,7 @@ Singleton {
|
|||||||
const fp = outputSetFingerprint(outputIdentifiers);
|
const fp = outputSetFingerprint(outputIdentifiers);
|
||||||
let hash = 0;
|
let hash = 0;
|
||||||
for (let i = 0; i < fp.length; i++) {
|
for (let i = 0; i < fp.length; i++) {
|
||||||
const char = fp.charCodeAt(i);
|
hash = ((hash << 5) - hash) + fp.charCodeAt(i);
|
||||||
hash = ((hash << 5) - hash) + char;
|
|
||||||
}
|
}
|
||||||
const hashStr = (hash >>> 0).toString(16);
|
const hashStr = (hash >>> 0).toString(16);
|
||||||
return "auto_" + hashStr;
|
return "auto_" + hashStr;
|
||||||
@@ -1034,7 +1033,12 @@ Singleton {
|
|||||||
result[name] = {
|
result[name] = {
|
||||||
"name": name,
|
"name": name,
|
||||||
"disabled": true,
|
"disabled": true,
|
||||||
"logical": { "x": 0, "y": 0, "scale": 1.0, "transform": "Normal" }
|
"logical": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"scale": 1.0,
|
||||||
|
"transform": "Normal"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -2022,7 +2026,9 @@ Singleton {
|
|||||||
|
|
||||||
function confirmChanges(profileId) {
|
function confirmChanges(profileId) {
|
||||||
const outputConfigs = buildCurrentOutputConfigs();
|
const outputConfigs = buildCurrentOutputConfigs();
|
||||||
lastAppliedEntry = { outputs: outputConfigs };
|
lastAppliedEntry = {
|
||||||
|
outputs: outputConfigs
|
||||||
|
};
|
||||||
|
|
||||||
if (profileId) {
|
if (profileId) {
|
||||||
readMonitorsJson(data => {
|
readMonitorsJson(data => {
|
||||||
|
|||||||
Reference in New Issue
Block a user