File tree Expand file tree Collapse file tree 2 files changed +574
-433
lines changed Expand file tree Collapse file tree 2 files changed +574
-433
lines changed Original file line number Diff line number Diff line change 4747#include <SDL.h>
4848#endif
4949
50+ #include "stdbool.h"
51+
5052#if SDL_VERSION_ATLEAST (3 , 0 , 0 )
5153#define PG_ShowCursor SDL_ShowCursor
5254#define PG_HideCursor SDL_HideCursor
@@ -119,6 +121,8 @@ PG_UnlockMutex(SDL_mutex *mutex)
119121
120122#define PG_INIT_TIMER 0
121123
124+ #define PG_GetSurfaceClipRect SDL_GetSurfaceClipRect
125+
122126#else /* ~SDL_VERSION_ATLEAST(3, 0, 0)*/
123127#define PG_ShowCursor () SDL_ShowCursor(SDL_ENABLE)
124128#define PG_HideCursor () SDL_ShowCursor(SDL_DISABLE)
@@ -190,6 +194,12 @@ PG_UnlockMutex(SDL_mutex *mutex)
190194
191195#define PG_SurfaceHasRLE SDL_HasSurfaceRLE
192196
197+ static inline bool
198+ PG_GetSurfaceClipRect (SDL_Surface * surface , SDL_Rect * rect )
199+ {
200+ * rect = surface -> clip_rect ;
201+ return true;
202+ }
193203#endif
194204
195205/* DictProxy is useful for event posting with an arbitrary dict. Maintains
You can’t perform that action at this time.
0 commit comments