mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
Revert "example: disable vsync of sw window for stability."
This reverts commit 2d695c4d46
.
because of crashes on MacOS.
This commit is contained in:
parent
2d695c4d46
commit
aa1fa1e10a
1 changed files with 0 additions and 10 deletions
|
@ -283,8 +283,6 @@ struct Window
|
||||||
|
|
||||||
struct SwWindow : 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)
|
SwWindow(Example* example, uint32_t width, uint32_t height, uint32_t threadsCnt) : Window(example, width, height, threadsCnt)
|
||||||
{
|
{
|
||||||
if (!initialized) return;
|
if (!initialized) return;
|
||||||
|
@ -298,17 +296,9 @@ struct SwWindow : Window
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//VSync has been disabled. Remove this line if you need VSync enabled.
|
|
||||||
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC);
|
|
||||||
|
|
||||||
resize();
|
resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
~SwWindow()
|
|
||||||
{
|
|
||||||
if (renderer) SDL_DestroyRenderer(renderer);
|
|
||||||
}
|
|
||||||
|
|
||||||
void resize() override
|
void resize() override
|
||||||
{
|
{
|
||||||
auto surface = SDL_GetWindowSurface(window);
|
auto surface = SDL_GetWindowSurface(window);
|
||||||
|
|
Loading…
Add table
Reference in a new issue