mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 17:58:27 +00:00
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:
parent
5490873daa
commit
281018f169
7 changed files with 154 additions and 957 deletions
|
@ -822,6 +822,11 @@ SDL_Renderer *SDL_CreateRenderer(SDL_Window *window, const char *name, Uint32 fl
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue