Revert "Fix renderer creation for HW display engine (#22445)"

This reverts commit b1e14c676d.
This commit is contained in:
Aaron van Geffen authored and GitHub committed 2024-08-01 22:37:03 +02:00
1 parent 144fa13a84
commit 65bf7753a1
2 files changed
-10

No files matched your search

-1
View File
@@ -35,7 +35,6 @@
- Fix: [#22339] Printing ui.tool.cursor in console crashes the game.
- Fix: [#22348] Progress bar screen doesn’t handle window resizing.
- Fix: [#22389] Alpine coaster has wrong tunnel entrance type.
- Fix: [#22445] Crash due to incorrect renderer state.
0.4.12 (2024-07-07)
------------------------------------------------------------------------
@@ -67,16 +67,7 @@ public:
void Initialise() override
{
#if SDL_VERSION_ATLEAST(2, 28, 0)
// Before creating a new renderer, destroy any possible leftover state, as it will prevent the renderer from being
// created.
if (SDL_GetWindowSurface(_window) != nullptr)
{
SDL_DestroyWindowSurface(_window);
}
#endif
_sdlRenderer = SDL_CreateRenderer(_window, -1, SDL_RENDERER_ACCELERATED | (_useVsync ? SDL_RENDERER_PRESENTVSYNC : 0));
Guard::Assert(_sdlRenderer != nullptr, "Failed to create renderer: %s", SDL_GetError());
}
void SetVSync(bool vsync) override