mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
SDL_SetWindowShape(): Remove shape when argument is NULL
(cherry picked from commit 53c799a7a9)
This commit is contained in:
parent
764d7633ea
commit
db3ff5f5c4
1 changed files with 7 additions and 3 deletions
|
|
@ -6162,9 +6162,13 @@ bool SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape)
|
|||
return false;
|
||||
}
|
||||
|
||||
surface = SDL_ConvertSurface(shape, SDL_PIXELFORMAT_ARGB32);
|
||||
if (!surface) {
|
||||
return false;
|
||||
if (shape) {
|
||||
surface = SDL_ConvertSurface(shape, SDL_PIXELFORMAT_ARGB32);
|
||||
if (!surface) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
surface = NULL;
|
||||
}
|
||||
|
||||
if (!SDL_SetSurfaceProperty(props, SDL_PROP_WINDOW_SHAPE_POINTER, surface)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue