Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor is offsetted after video mode change during program execution #542

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed
Labels
worksforme We can't reproduce the bug

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 1.2
Reported for operating system, platform: Mac OS X (All), All

Comments on the original bug report:

On 2009-12-30 09:04:44 +0000, Gabriel Gambetta wrote:

Created attachment 474
Working patch

Steps to reproduce :

  • Open a SDL app that uses the SDL-drawn cursor
  • Change the screen resolution

Tested with SDL 1.2.14 in OSX 10.5

Back in the app, the cursor isn't drawn at the same coordinates reported by SDL. This can be fixed by minimizing/restoring the window, or by moving the window a little by dragging the title bar.

Apparently there's something wrong with the window frame after the mode switch, since this ugly piece of code fixes it :

NSRect pRect = qz_window.frame;

pRect.origin.y++;
[qz_window setFrame:pRect display:0];

pRect.origin.y--;
[qz_window setFrame:pRect display:0];

I'm attaching a patch that checks the display resolution in every PollEvents call and does the above trick if necessary.

On 2011-12-29 01:59:32 +0000, Sam Lantinga wrote:

Ryan, what do you think about this patch? Is this even still an issue?

On 2011-12-30 00:25:38 +0000, Ryan C. Gordon wrote:

(In reply to comment # 1)

Ryan, what do you think about this patch? Is this even still an issue?

This patch is NASTY. :)

Let me take a look at this...a lot has changed in that code since the original bug report.

--ryan.

On 2011-12-30 01:25:49 +0000, Ryan C. Gordon wrote:

Bumping priority on a few bugs that I would like examined more closely before 1.2.15 is finalized. This is not a promise that a bug will be fixed. We may close it with WONTFIX or WORKSFORME or something, but I just want to make sure attention is paid.

--ryan.

On 2012-01-02 17:05:42 +0000, Ryan C. Gordon wrote:

I can't reproduce this. It's either something we fixed, or it was a bug in 10.5 that's since been fixed.

--ryan.

@SDLBugzilla SDLBugzilla added bug worksforme We can't reproduce the bug labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme We can't reproduce the bug
Projects
None yet
Development

No branches or pull requests

1 participant