Make it clear that you can't mix 2D rendering and the window surface API

Also added functions to query and destroy the window surface so you can switch between modes if you want.

See https://github.com/pygame-community/pygame-ce/issues/2190 for more details.
This commit is contained in:
Sam Lantinga 2023-06-10 08:54:36 -07:00
parent 320f3fffbe
commit 36033e3832
7 changed files with 62 additions and 17 deletions

View file

@ -868,3 +868,5 @@
++'_SDL_ResetHints'.'SDL2.dll'.'SDL_ResetHints'
++'_SDL_strcasestr'.'SDL2.dll'.'SDL_strcasestr'
# ++'_SDL_GDKSuspendComplete'.'SDL2.dll'.'SDL_GDKSuspendComplete'
++'_SDL_HasWindowSurface'.'SDL2.dll'.'SDL_HasWindowSurface'
++'_SDL_DestroyWindowSurface'.'SDL2.dll'.'SDL_DestroyWindowSurface'

View file

@ -894,3 +894,5 @@
#define SDL_ResetHints SDL_ResetHints_REAL
#define SDL_strcasestr SDL_strcasestr_REAL
#define SDL_GDKSuspendComplete SDL_GDKSuspendComplete_REAL
#define SDL_HasWindowSurface SDL_HasWindowSurface_REAL
#define SDL_DestroyWindowSurface SDL_DestroyWindowSurface_REAL

View file

@ -979,3 +979,5 @@ SDL_DYNAPI_PROC(char*,SDL_strcasestr,(const char *a, const char *b),(a,b),return
#if defined(__GDK__)
SDL_DYNAPI_PROC(void,SDL_GDKSuspendComplete,(void),(),)
#endif
SDL_DYNAPI_PROC(SDL_bool,SDL_HasWindowSurface,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_DestroyWindowSurface,(SDL_Window *a),(a),return)