Skip to content

Commit 98e2ace

Browse files
committed
SDL3: display+window: runtime fixes
1 parent 93189e3 commit 98e2ace

File tree

3 files changed

+202
-88
lines changed

3 files changed

+202
-88
lines changed

src_c/_pygame.h

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

192192
#define PG_GetSurfaceClipRect SDL_GetSurfaceClipRect
193193

194+
#define PG_GL_SetSwapInterval SDL_GL_SetSwapInterval
195+
194196
#else /* ~SDL_VERSION_ATLEAST(3, 0, 0)*/
195197
#define PG_ShowCursor() SDL_ShowCursor(SDL_ENABLE)
196198
#define PG_HideCursor() SDL_ShowCursor(SDL_DISABLE)
@@ -403,6 +405,12 @@ PG_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect)
403405
*rect = surface->clip_rect;
404406
return true;
405407
}
408+
409+
static inline bool
410+
PG_GL_SetSwapInterval(int interval)
411+
{
412+
return SDL_GL_SetSwapInterval(interval) == 0;
413+
}
406414
#endif
407415

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

0 commit comments

Comments
 (0)