Skip to content

Commit

Permalink
Fix: [SDL] remove hint to avoid hardware acceleration (OpenTTD#11790)
Browse files Browse the repository at this point in the history
This hint was once needed because of the way we handled surfaces.
But as OpenGL already uses a hardware surface, we already had to
fix all the issues that comes with it. As that is generic code,
this hint is no longer actually needed. Further more, recent SDL
versions break because of it on Wayland.
  • Loading branch information
TrueBrain authored Jan 15, 2024
1 parent b18e78e commit 3750745
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/video/sdl2_v.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,6 @@ bool VideoDriver_SDL_Base::PollEvent()

static const char *InitializeSDL()
{
/* Explicitly disable hardware acceleration. Enabling this causes
* UpdateWindowSurface() to update the window's texture instead of
* its surface. */
SDL_SetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION, "0");

/* Check if the video-driver is already initialized. */
if (SDL_WasInit(SDL_INIT_VIDEO) != 0) return nullptr;

Expand Down

0 comments on commit 3750745

Please sign in to comment.