Opened 9 years ago

Closed 9 years ago

Last modified 12 months ago

#4916 closed defect (fixed)

Cursor Leaves Trail in GUI when Screen is Shaking

Reported by: SF/mthreepwood Owned by: sev-
Priority: normal Component: Ports
Keywords: Cc:


Mac OS X 10.6.4, gcc 4.2.1, r50656

Found this one and took a while to reproduce...

I attached a saved game for Day of the Tentacle (English/CD) in the foyer with the music playing. Pause the game (with the screen offset vertically) and then move the cursor around to see the cursor leave a trail.

Ticket imported from: #3025258. Ticket imported from: bugs/4916.

Attachments (3)

tentacle.s03 (22.3 KB ) - added by SF/mthreepwood 9 years ago.
Saved Game - Day of the Tentacle (English/CD)
tentacle-cursor-trail.png (34.6 KB ) - added by SF/mthreepwood 9 years ago.
20100706-screen-shake-fix.patch (487 bytes ) - added by digitall 9 years ago.
Proposed Fix For Bug

Download all attachments as: .zip

Change History (12)

by SF/mthreepwood, 9 years ago

Attachment: tentacle.s03 added

Saved Game - Day of the Tentacle (English/CD)

by SF/mthreepwood, 9 years ago

Attachment: tentacle-cursor-trail.png added


comment:1 by SF/mthreepwood, 9 years ago

Attached a screenshot too (the scaler is Normal2x, but I don't think that's relevant here)

comment:2 by eriktorbjorn, 9 years ago

I think this is because the cursor, in overlay mode, is drawn without taking shake position into account (see comment in OSystem_SDL::drawMouse()) while internUpdateScreen() always takes shake position into account.

I'm not sure what's the proper fix here. If internUpdateScreen() is changed to not use the shake position when the overlay is visible, you presumably can't pause the game in mid-shake. Not without adjusting clearOverlay() at least.

by digitall, 9 years ago

Proposed Fix For Bug

comment:3 by digitall, 9 years ago

Have attached a fix for this bug, but this will need review as I'm not a SDL backend expert.

comment:4 by eriktorbjorn, 9 years ago

That might work, but it seems a bit backwards to me. Right now, the mouse cursor isn't affected by the shake position, but the rest of the overlay is - you can see that if you manage to open the debug console in mid-shake - and that doesn't feel right to me. But I'm no SDL backend expert either.

Also, it would have to check if the overlay is visible, because otherwise it causes the normal game cursor to leave a trail. Not as noticeably as the GUI cursor, because the screen is completely redrawn every time the shake position changes, but you can still see it.

comment:5 by eriktorbjorn, 9 years ago

Oops, I made the wrong change when I tried it. I don't get any trailing with the normal cursor after all.

comment:6 by eriktorbjorn, 9 years ago

On third thought, it doesn't seem right to have the shake position affect the height of the dirty rect.

comment:7 by sev-, 9 years ago

Fixed in SVN. Actually the proposed patch was not everything what is needed. I also redraw top black square added by the backend.

comment:8 by sev-, 9 years ago

Owner: set to sev-
Resolution: fixed
Status: newclosed

comment:9 by digitall, 12 months ago

Component: Ports
Note: See TracTickets for help on using tickets.