#8534 closed patch
Possible fix for recent cursor regressions
Reported by: | eriktorbjorn | Owned by: | sev- |
---|---|---|---|
Priority: | normal | Component: | GUI |
Version: | Keywords: | ||
Cc: | Game: |
Description
The recent GUI changes appear to have introduced a couple of regressions with in-game cursors:
* Hotspots are off, except with the 1x scaler. * Cursor position is not adjusted by the "shake position".
This patch attempts to fix both, while at the same time simplifying the code a bit. But I'm not as familiar with the cursor handling as I should be, so I'm not sure I got it right.
The general idea is that I'm trying to calculate a _mouseBackup rect in unscaled, unadjusted coordinates. I'm not sure how this interacts with cursor scaling, though, so please take a closer look at that.
Once we have the unscaled dimensions, we adjust them by scale, shake position and aspect ratio correction, and use them for blitting the pre-scaled image.
I've made a slight change to addDirtyRect() so that if the clipped rect is outside the screen, it's not added. This eliminates the need for clipping _mouseBackup. We don't need to clip the pre-scaled cursor image either, since SDL_BlitSurface() should handle that by itself.
Ticket imported from: #1491859. Ticket imported from: patches/639.
Attachments (1)
Change History (3)
by , 18 years ago
Attachment: | cursor-fixes.diff added |
---|
comment:1 by , 18 years ago
Status: | new → closed |
---|
comment:2 by , 6 years ago
Component: | → GUI |
---|
Patch against current SVN