Prefer downscaling in SDL_GetSurfaceImage.

This implements the ideas described in  #10536
This commit is contained in:
Kaktus514
2024-08-15 13:41:20 +02:00
committed by Sam Lantinga
parent 4ac5d4506b
commit 3586df3151
3 changed files with 31 additions and 7 deletions

View File

@@ -423,8 +423,9 @@ extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor(const Uint8 * data,
* situations. For example, if the original surface is 32x32, then on a 2x
* macOS display or 200% display scale on Windows, a 64x64 version of the
* image will be used, if available. If a matching version of the image isn't
* available, the closest size image will be scaled to the appropriate size
* and be used instead.
* available, the closest larger size image will be downscaled to the
* appropriate size and be used instead, if available. Otherwise, the closest
* smaller image will be upscaled and be used instead.
*
* \param surface an SDL_Surface structure representing the cursor image.
* \param hot_x the x position of the cursor hot spot.