Skip to content

Commit 5136abb

Browse files
committed
SDL3: display+window: runtime fixes
1 parent 2e0c6bd commit 5136abb

File tree

3 files changed

+180
-73
lines changed

3 files changed

+180
-73
lines changed

src_c/_pygame.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ PG_GetSurfaceFormat(SDL_Surface *surf)
192192

193193
#define PG_GetSurfaceClipRect SDL_GetSurfaceClipRect
194194

195+
#define PG_GL_SetSwapInterval SDL_GL_SetSwapInterval
196+
195197
#else /* ~SDL_VERSION_ATLEAST(3, 0, 0)*/
196198
#define PG_ShowCursor() SDL_ShowCursor(SDL_ENABLE)
197199
#define PG_HideCursor() SDL_ShowCursor(SDL_DISABLE)
@@ -400,6 +402,12 @@ PG_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect)
400402
*rect = surface->clip_rect;
401403
return true;
402404
}
405+
406+
static inline bool
407+
PG_GL_SetSwapInterval(int interval)
408+
{
409+
return SDL_GL_SetSwapInterval(interval) == 0;
410+
}
403411
#endif
404412

405413
/* DictProxy is useful for event posting with an arbitrary dict. Maintains

0 commit comments

Comments
 (0)