Fixed testshape on high DPI displays

Since the shape is set based on the pixels in the image, we want the window to have the same number of pixels.
This commit is contained in:
Sam Lantinga
2023-03-02 10:15:14 -08:00
parent 59ca0c8b22
commit 3bba33932f
2 changed files with 11 additions and 5 deletions

View File

@@ -80,9 +80,7 @@ int Win32_SetWindowShape(SDL_WindowShaper *shaper, SDL_Surface *shape, SDL_Windo
if ((shaper == NULL) ||
(shape == NULL) ||
((shape->format->Amask == 0) && (shape_mode->mode != ShapeModeColorKey)) ||
(shape->w != shaper->window->w) ||
(shape->h != shaper->window->h)) {
((shape->format->Amask == 0) && (shape_mode->mode != ShapeModeColorKey))) {
return SDL_INVALID_SHAPE_ARGUMENT;
}