Skip to content

Commit

Permalink
kmsdrm: add temporary RPI4_COMPAT define to try RPI4+current Rasbian …
Browse files Browse the repository at this point in the history
…compatibility.
  • Loading branch information
vanfanel committed Sep 7, 2020
1 parent 0f807fd commit 6e03fab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/video/kmsdrm/SDL_kmsdrmvideo.c
Expand Up @@ -50,6 +50,7 @@
#define KMSDRM_DRI_PATH "/dev/dri/"

#define AMDGPU_COMPAT 1
#define RPI4_COMPAT 0

static int
check_modesetting(int devindex)
Expand Down Expand Up @@ -793,10 +794,14 @@ KMSDRM_CreateDevice(int devindex)
device->GL_SetSwapInterval = KMSDRM_GLES_SetSwapInterval;
device->GL_GetSwapInterval = KMSDRM_GLES_GetSwapInterval;

#if RPI4_COMPAT
device->GL_SwapWindow = KMSDRM_GLES_SwapWindowDB;
#else
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_DOUBLE_BUFFER, SDL_FALSE))
device->GL_SwapWindow = KMSDRM_GLES_SwapWindowDB;
else
device->GL_SwapWindow = KMSDRM_GLES_SwapWindow;
#endif

device->GL_DeleteContext = KMSDRM_GLES_DeleteContext;
#endif
Expand Down Expand Up @@ -1425,8 +1430,6 @@ KMSDRM_VideoQuit(_THIS)

#else

/*********************************************************************************/
/*********************************************************************************/
if (add_connector_property(dispdata->atomic_req, dispdata->connector , "CRTC_ID", 0) < 0)
SDL_SetError("Failed to set CONNECTOR prop CRTC_ID to zero before buffer destruction");

Expand Down

0 comments on commit 6e03fab

Please sign in to comment.