Skip to content

Commit

Permalink
Implemented userSkipReapply setting
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed May 27, 2024
1 parent 889c382 commit 1dac1cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ const defaultSettings = {
disableMouseEvents: false,
disableThrottling: false,
userDDCBrightnessVCPs: {},
userSkipReapply: [],
preferredDDCCIMethod: "accurate",
lastDetectedDDCCIMethod: "none",
forceLowPowerGPU: false,
Expand Down Expand Up @@ -867,7 +868,14 @@ function shouldSkipDisplay(monitorOrHwid1, skipEventCheck = false) {
if(!displaysMayBeIdleBlocks.length && !skipEventCheck) return false;

const hwid1 = (typeof monitorOrHwid1 === "string" ? monitorOrHwid1 : monitorOrHwid1?.hwid?.[1])
const inRules = monitorRules.skipReapply.includes(hwid1)
let rules = []
rules = rules.concat(monitorRules.skipReapply)
try {
rules = rules.concat(settings.userSkipReapply)
} catch(e) {
console.log("Error merging userSkipReapply:", e)
}
const inRules = rules.includes(hwid1)
return inRules
}

Expand Down

0 comments on commit 1dac1cd

Please sign in to comment.