When changing gui.scale to scale the whole gui the size of the cursor is not affected, so in HiDPI screens it remains very small
Details
- Reviewers
domdomegg elexis - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP19667: Scale the cursor according to the GUI scale (HiDPI support).
- Trac Tickets
- #3875
Starting the game the cursor is scaled correctly
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Manually tested, fixes bug and makes playing experience much better. Automated tests pass.
May be worth updating the copyright to 2017 on all files updated as per the 0ad coding conventions.
domdomegg, did you only test the patch or also check the code? the latter is needed before accepting a revision.
Did check code, I'm fact because track was down I tried to fix this myself and pretty much did the exact same thing before I found this.
Thanks (that was not clear from your previous comment), it will ease following reviews.
Patch correct since it scales the cursor correctly.
Patch complete because all cursor draw calls are treated.
Thanks!
source/lib/res/graphics/cursor.cpp | ||
---|---|---|
75 ↗ | (On Diff #1224) | Was wondering whether we can avoid the copy and the if, but not really. Front falls off when multiplying in the first SDL_CreateRGBSurfaceFrom call and skipping the if. Note to self: Don't read SDL tutorials from 2008. |
80 ↗ | (On Diff #1224) | |
246 ↗ | (On Diff #1224) | else if ( while at it |
249 ↗ | (On Diff #1224) | Since the adjacent cases don't have scopes, that one here can go too |
source/lib/res/graphics/cursor.h | ||
42 ↗ | (On Diff #1224) | drawing size |