1
0
mirror of synced 2025-01-18 00:56:49 +01:00

web: Prevent canvas flickering when resizing browser window

This commit is contained in:
WerWolv 2023-12-27 22:00:09 +01:00
parent 99ba47a554
commit 144d8d8ed4
2 changed files with 7 additions and 1 deletions

View File

@ -29,7 +29,7 @@ jobs:
uses: actions/cache@v3
with:
path: cache
key: ${{ runner.os }}-cmakecache-${{ hashFiles('**/CMakeLists.txt') }}
key: web-cmakecache-${{ hashFiles('**/CMakeLists.txt') }}
- name: 🐳 Inject /cache into docker
uses: reproducible-containers/buildkit-cache-dance@v2.1.2

View File

@ -73,4 +73,10 @@ function js_resizeCanvas() {
canvas.height = Math.min(document.documentElement.clientHeight, window.innerHeight || 0);
canvas.classList.add("canvas_full_screen")
if (GLFW.active && GLFW.active.windowPosFunc) {
getWasmTableEntry(GLFW.active.windowPosFunc)(GLFW.active.id, GLFW.active.x, GLFW.active.y);
}
GLFW.onWindowSizeChanged();
}