Skip to content

Commit 9aeca32

Browse files
committed
SDL3: display+window: runtime fixes
1 parent c7e9c15 commit 9aeca32

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
@@ -166,6 +166,8 @@ PG_GetSurfaceFormat(SDL_Surface *surf)
166166

167167
#define PG_GetSurfaceClipRect SDL_GetSurfaceClipRect
168168

169+
#define PG_GL_SetSwapInterval SDL_GL_SetSwapInterval
170+
169171
#else /* ~SDL_VERSION_ATLEAST(3, 0, 0)*/
170172
#define PG_ShowCursor() SDL_ShowCursor(SDL_ENABLE)
171173
#define PG_HideCursor() SDL_ShowCursor(SDL_DISABLE)
@@ -378,6 +380,12 @@ PG_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect)
378380
*rect = surface->clip_rect;
379381
return true;
380382
}
383+
384+
static inline bool
385+
PG_GL_SetSwapInterval(int interval)
386+
{
387+
return SDL_GL_SetSwapInterval(interval) == 0;
388+
}
381389
#endif
382390

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

0 commit comments

Comments
 (0)