Try to fix crashing on iOS (#455)

This commit is contained in:
redphx
2024-07-21 06:17:12 +07:00
parent 5a27caad23
commit 1ec162115f
3 changed files with 12 additions and 4 deletions

View File

@@ -15,6 +15,10 @@ window.dispatchEvent(new Event(BxEvent.STREAM_SESSION_READY));
// Patch updateDimensions() to make native touch work correctly with WebGL2
let updateDimensionsStr = this.updateDimensions.toString();
if (updateDimensionsStr.startsWith('function ')) {
updateDimensionsStr = updateDimensionsStr.substring(9);
}
// if(r){
const renderTargetVar = updateDimensionsStr.match(/if\((\w+)\){/)[1];