SDL_SetWindowShape(): Remove shape when argument is NULL
This commit is contained in:
committed by
Sam Lantinga
parent
1d2f9f0e0e
commit
53c799a7a9
@@ -6147,9 +6147,13 @@ bool SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
surface = SDL_ConvertSurface(shape, SDL_PIXELFORMAT_ARGB32);
|
if (shape) {
|
||||||
if (!surface) {
|
surface = SDL_ConvertSurface(shape, SDL_PIXELFORMAT_ARGB32);
|
||||||
return false;
|
if (!surface) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
surface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SDL_SetSurfaceProperty(props, SDL_PROP_WINDOW_SHAPE_POINTER, surface)) {
|
if (!SDL_SetSurfaceProperty(props, SDL_PROP_WINDOW_SHAPE_POINTER, surface)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user