From aa1fa1e10a9f0033a3bd4e33f1949957be14223d Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 6 May 2025 10:16:18 +0900 Subject: [PATCH] Revert "example: disable vsync of sw window for stability." This reverts commit 2d695c4d46a41f446097b52d3869355a1e078ff5. because of crashes on MacOS. --- examples/Example.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/examples/Example.h b/examples/Example.h index 909a60ca..9ea003f7 100644 --- a/examples/Example.h +++ b/examples/Example.h @@ -283,8 +283,6 @@ struct Window struct SwWindow : Window { - SDL_Renderer* renderer = nullptr; - SwWindow(Example* example, uint32_t width, uint32_t height, uint32_t threadsCnt) : Window(example, width, height, threadsCnt) { if (!initialized) return; @@ -298,17 +296,9 @@ struct SwWindow : Window return; } - //VSync has been disabled. Remove this line if you need VSync enabled. - renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC); - resize(); } - ~SwWindow() - { - if (renderer) SDL_DestroyRenderer(renderer); - } - void resize() override { auto surface = SDL_GetWindowSurface(window);