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

Update SDL3-CS #6374

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Update SDL3-CS #6374

merged 3 commits into from
Sep 16, 2024

Conversation

hwsmm
Copy link
Contributor

@hwsmm hwsmm commented Sep 15, 2024

Pulls in ppy/SDL3-CS#129

  • Due to SDL_pen API rework, SDL no longer produces mouse events for pen inputs. I tried emulating mouse in the above o!f branch, but I'm not sure if it's in the right direction. We cannot adjust output area in this API, so making another handler for this felt too much to me. Please give it a test/review!

    You need to be on macOS/Linux(X11/Wayland) to test this since they don't have backends for other platforms yet. Disable in-game tablet driver, and use Artist Mode if you use desktop OTD on Linux before testing this.

  • SDL_bool is now C bool and more widely used. Every function that returns error with SDL_SetError now returns SDL_bool instead of int. It probably needs review.

@peppy peppy enabled auto-merge September 16, 2024 04:38
@peppy peppy disabled auto-merge September 16, 2024 04:38
@peppy peppy merged commit 21cf5d0 into ppy:master Sep 16, 2024
18 of 21 checks passed
@smoogipoo
Copy link
Contributor

I don't think we should be emulating mouse like this. We already have a mouse-from-touch emulation at an inputmanager level.

@hwsmm
Copy link
Contributor Author

hwsmm commented Sep 16, 2024

I guess we should probably fix OpenTabletDriverHandler first if we want to make separate events for tablets.

void IAbsolutePointer.SetPosition(System.Numerics.Vector2 pos) => enqueueInput(new MousePositionAbsoluteInput { Position = new Vector2(pos.X, pos.Y) });
void IRelativePointer.SetPosition(System.Numerics.Vector2 delta) => enqueueInput(new MousePositionRelativeInput { Delta = new Vector2(delta.X, delta.Y) });
void IPressureHandler.SetPressure(float percentage) => enqueueInput(new MouseButtonInput(osuTK.Input.MouseButton.Left, percentage > 0));

@peppy
Copy link
Member

peppy commented Sep 16, 2024

I don't think we should be emulating mouse like this. We already have a mouse-from-touch emulation at an inputmanager level.

Maybe I misunderstood, pen to me implies a pen/tablet flow rather than touch so (while untested) I'd see this as a good direction to see if it usable to us/users.

@smoogipoo
Copy link
Contributor

Maybe more my misunderstanding, but in that case I'm even more concerned this is going to be providing competing inputs with OTD. I guess we'll have to see how it works in practice, though I'd always favour OTD except for edgecases like apple pen (and even then I'd favour OTD if it gains support).

@hwsmm hwsmm deleted the sdl3-cs-update branch November 7, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants