1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

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

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

View File

@@ -35,7 +35,6 @@
- Fix: [#22339] Printing ui.tool.cursor in console crashes the game.
- Fix: [#22348] Progress bar screen doesnt 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)
------------------------------------------------------------------------

View File

@@ -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