mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 15:10:49 +00:00
Copy properties when converting a surface to a new format
This fixes retaining the cursor hotspot when converting cursor frames to SDL_PIXELFORMAT_ARGB8888
This commit is contained in:
parent
23fcf53c53
commit
2f810e0a5f
1 changed files with 7 additions and 0 deletions
|
|
@ -2147,6 +2147,13 @@ end:
|
|||
}
|
||||
}
|
||||
|
||||
// Copy properties
|
||||
if (surface->props) {
|
||||
if (!SDL_CopyProperties(surface->props, SDL_GetSurfaceProperties(convert))) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
// We're ready to go!
|
||||
return convert;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue