SDL_ShowCursor(SDL_DISABLE) craziness

I’ve compiled one of my old programs from years ago with msvc 2017 with windows 10
So its using SDL 1.2.14

works great except for some crazy bug
as soon as I make the cursor invisible with SDL_ShowCursor(SDL_DISABLE);

input goes crazy, eg heres me moving the cursor around a bit

int x,y;
Uint8 button = SDL_GetMouseState( &x, &y );
cout << x << " " << y << endl;
658 612
659 607
657 592
635 567
596 546
568 543
560 544

all well and good, but heres the same approx movement with showcursor diabled

1644 1125
1633 1113
0 0
0 0
96 79
1162 79
1644 1107
0 0

Any ideas?, ta zed

This probably is a Win10 bug, introduced with the Fall Creators Update, see Win10 Fall Creators Update breaks Mouse Warping

In short, there is a workaround for SDL2 (that’s in HG, but not part in the last release), as far as I know no workaround has been implemented for SDL1.2 yet.

Thanks Daniel, I’ll look into that but FWIW
this happens both with and without MouseWarping, but yes it could be due to the Fall Update, I have no idea if it worked before as I hadn’t run this program since Win XP I think

Sorry I haven’t fixed it, but just made a hacky workaround
I keep the cursor visible but changed the cursor to a 1x1 sized pixel :slight_smile: so its hardly visible
If it is a Windows Issue, I don’t want to spend much time on it, cheers all