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:
1 parent
320f3fffbe
commit
36033e3832
7 files changed
+62
-17
No files matched your search
@@ -950,6 +950,11 @@ SDL_Renderer *SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (SDL_HasWindowSurface(window)) {
|
||||
SDL_SetError("Surface already associated with window");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (SDL_GetRenderer(window)) {
|
||||
SDL_SetError("Renderer already associated with window");
|
||||
goto error;
|
||||
|
||||
Reference in new issue
Block a user