Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src_c/_pygame.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ PG_GetSurfaceFormat(SDL_Surface *surf)

#define PG_GetSurfaceClipRect SDL_GetSurfaceClipRect

#define PG_GL_SetSwapInterval SDL_GL_SetSwapInterval

#else /* ~SDL_VERSION_ATLEAST(3, 0, 0)*/
#define PG_ShowCursor() SDL_ShowCursor(SDL_ENABLE)
#define PG_HideCursor() SDL_ShowCursor(SDL_DISABLE)
Expand Down Expand Up @@ -378,6 +380,12 @@ PG_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect)
*rect = surface->clip_rect;
return true;
}

static inline bool
PG_GL_SetSwapInterval(int interval)
{
return SDL_GL_SetSwapInterval(interval) == 0;
}
#endif

/* DictProxy is useful for event posting with an arbitrary dict. Maintains
Expand Down
Loading
Loading