Skip to content

Commit aa6aac6

Browse files
committed
SDL3: display+window: runtime fixes
1 parent 5f2b99e commit aa6aac6

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

168168
#define PG_GetSurfaceClipRect SDL_GetSurfaceClipRect
169169

170+
#define PG_GL_SetSwapInterval SDL_GL_SetSwapInterval
171+
170172
#else /* ~SDL_VERSION_ATLEAST(3, 0, 0)*/
171173
#define PG_ShowCursor() SDL_ShowCursor(SDL_ENABLE)
172174
#define PG_HideCursor() SDL_ShowCursor(SDL_DISABLE)
@@ -375,6 +377,12 @@ PG_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect)
375377
*rect = surface->clip_rect;
376378
return true;
377379
}
380+
381+
static inline bool
382+
PG_GL_SetSwapInterval(int interval)
383+
{
384+
return SDL_GL_SetSwapInterval(interval) == 0;
385+
}
378386
#endif
379387

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

0 commit comments

Comments
 (0)