We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5468 - [KMSDRM] Fix corruption on dynamic cursor changing
Summary: [KMSDRM] Fix corruption on dynamic cursor changing
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.15
Hardware: All Linux
: P2 normal
Assignee: Manuel Alfayate Corchete
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-15 21:47 UTC by Manuel Alfayate Corchete
Modified: 2021-01-17 20:34 UTC (History)
1 user (show)

See Also:


Attachments
Fix cursor corruption when it's changed dynamically to a different size bitmap (1011 bytes, patch)
2021-01-15 21:47 UTC, Manuel Alfayate Corchete
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Alfayate Corchete 2021-01-15 21:47:37 UTC
Created attachment 4669 [details]
Fix cursor corruption when it's changed dynamically to a different size bitmap

Hi,

Just noticed that, in FHeroes2 (https://github.com/ihhub/fheroes2), dynamic cursor changing on the map screen causes a small corruption. It's because I was not using the right size for the cursor buffer.

Fix patch attached. Please review. Thanks.
Comment 1 Ozkan Sezer 2021-01-17 16:45:36 UTC
Looks OK to me. Although you can just remove the memset and
simply change the allocation to
	ready_buffer = (uint32_t*)SDL_calloc(1, bufsize);
Comment 2 Sam Lantinga 2021-01-17 18:03:22 UTC
I agree with Ozkan. Go ahead and commit after you make that change.
Comment 3 Manuel Alfayate Corchete 2021-01-17 20:34:56 UTC
Ok! Changes done as requested, and pushed. Thanks for reviewing. Closing this.