libsdl-org/SDL

Windows: custom cursors are displayed at a fixed size instead of the image's size.

Closed this issue · 5 comments

On Windows, with SDL 2.0.18 or the latest git code (I've tested with both), custom cursors created with SDL_CreateColorCursor seem to render at a fixed size instead of the specified width and height. This appears to be a regression from at least some previous versions (I have also tested with a build of SDL 2.0.10 and it works - as well as the latest git code on macOS which works too).

I don't have a standalone C repro, but there is a repro/demo project using LÖVE, here: love2d/love#1762

LÖVE can be downloaded here: https://github.com/love2d/love/releases (the project can be run with love by passing the zip file as a command line argument to love.exe, or dragging the zip onto the exe, or unzipping it into a folder and doing the prior steps with the folder instead of the zip).

LÖVE 11.4 uses SDL 2.0.18 on Windows, and 11.3 uses 2.0.10. You can also easily swap out the SDL2 dll to test different builds with that code.

If I revert this change, the issue is fixed for me (although it probably reintroduces the problem that commit was meant to fix): 301819c

Again for reference, cursors are displayed at the image's size (perhaps scaled by a constant factor) on macOS for me, whereas in 2.0.18 on Windows every custom cursor is displayed at the same fixed size.

This should be fixed, can you verify?

It is fixed now, thanks!

Great, thanks!