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

[core] Fix mouse button order for PLATFORM_DESKTOP_SDL #3534

Merged
merged 1 commit into from Nov 12, 2023
Merged

[core] Fix mouse button order for PLATFORM_DESKTOP_SDL #3534

merged 1 commit into from Nov 12, 2023

Conversation

ghost
Copy link

@ghost ghost commented Nov 12, 2023

Changes

  • The SDL2 mouse button order is LEFT, MIDDLE, RIGHT, ... (doc), but raylib.h's MouseButton enum uses LEFT, RIGHT, MIDDLE, ... (L689-L690) like GLFW.
  • Fixes the MOUSE_BUTTON_RIGHT and MOUSE_BUTTON_MIDDLE order by remapping them during the input polling for PLATFORM_DESKTOP_SDL (R1087-R1093, R1100-R1106).

Reference

Environment

  • Tested on Linux (Ubuntu 22.04 64-bit) with SDL2 (2.28.4).

Edits

  • 1: added line marks.
  • 2: correction.

@raysan5 raysan5 merged commit 87f26c8 into raysan5:master Nov 12, 2023
@raysan5
Copy link
Owner

raysan5 commented Nov 12, 2023

@ubkp Oh! thanks for the review! I remember we talk about it and we left that review behind! thanks!

@ghost ghost deleted the fix/sdl-mousebuttons branch November 12, 2023 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant