1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Fix bug in webGl parameter faking

Fixes #508
This commit is contained in:
kkapsner 2021-01-03 22:23:46 +01:00
parent e2c5dfc06e
commit 1f1d7052a1
3 changed files with 12 additions and 6 deletions

View File

@ -549,10 +549,12 @@
webgl.parameterChangeDefinition[originalValue.UNMASKED_VENDOR_WEBGL] &&
webgl.parameterChangeDefinition[originalValue.UNMASKED_RENDERER_WEBGL]
){
const vendorDef = webgl.parameterChangeDefinition[originalValue.UNMASKED_VENDOR_WEBGL];
const {vendorValue, vendorFaked} = vendorDef.fake(originalValue, window, prefs);
const rendererDef = webgl.parameterChangeDefinition[originalValue.UNMASKED_RENDERER_WEBGL];
const {rendererValue, rendererFaked} = vendorDef.fake(originalValue, window, prefs);
const {value: vendorValue, faked: vendorFaked} = webgl
.parameterChangeDefinition[originalValue.UNMASKED_VENDOR_WEBGL]
.fake(this.getParameter(originalValue.UNMASKED_VENDOR_WEBGL), window, prefs);
const {value: rendererValue, faked: rendererFaked} = webgl
.parameterChangeDefinition[originalValue.UNMASKED_RENDERER_WEBGL]
.fake(this.getParameter(originalValue.UNMASKED_RENDERER_WEBGL), window, prefs);
if (
vendorFaked && vendorValue === null &&
rendererFaked && rendererValue === null

View File

@ -209,8 +209,8 @@
scope.initializeParameterDefinitions = function(){
function singleFake(originalValue, window, prefs){
let value = parameterFakeTypes[this.type](originalValue, this, window, prefs);
let faked = value === originalValue;
const value = parameterFakeTypes[this.type](originalValue, this, window, prefs);
const faked = value !== originalValue;
this.fake = function(){
return {value, faked};
};

View File

@ -157,6 +157,10 @@
{
"version": "1.5Alpha20210103",
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.5Alpha20210103-an+fx.xpi"
},
{
"version": "1.5Alpha20210104",
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-1.5Alpha20210104-an+fx.xpi"
}
]
}