Skip to content

Port key and mouse to SDL3 #3207

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Port key and mouse to SDL3 #3207

merged 2 commits into from
Jan 17, 2025

Conversation

ankith26
Copy link
Member

@ankith26 ankith26 commented Nov 2, 2024

Just following the footsteps of #3206 but separated out in a different PR because these changes are not as trivial as those

@ankith26 ankith26 requested a review from a team as a code owner November 2, 2024 08:51
@Starbuck5 Starbuck5 added the sdl3 label Nov 2, 2024
@Starbuck5 Starbuck5 added mouse pygame.mouse key pygame.key labels Nov 3, 2024
Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Starbuck5
Copy link
Member

I wanted to test this, so I rebased against main and ran python dev.py build --sdl3 --wheel

I got the following warnings-to-errors:

  ../src_c/mouse.c(100): error C2220: the following warning is treated as an error
  ../src_c/mouse.c(100): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  ../src_c/mouse.c(101): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  ../src_c/mouse.c(109): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  ../src_c/mouse.c(113): warning C4244: '=': conversion from 'int' to 'float', possible loss of data
  ../src_c/mouse.c(118): warning C4244: 'function': conversion from 'float' to 'int', possible loss of data
  ../src_c/mouse.c(118): warning C4244: 'function': conversion from 'float' to 'int', possible loss of data
  ../src_c/mouse.c(149): warning C4244: 'function': conversion from 'float' to 'int', possible loss of data
  ../src_c/mouse.c(149): warning C4244: 'function': conversion from 'float' to 'int', possible loss of data
  ../src_c/mouse.c(253): warning C4244: '=': conversion from 'SDL_WindowFlags' to 'Uint32', possible loss of data

@ankith26 ankith26 force-pushed the ankith26-more-sdl3-2 branch from 8bf0cd7 to f1e61a6 Compare January 2, 2025 04:30
@ankith26
Copy link
Member Author

ankith26 commented Jan 2, 2025

I have rebased this branch on main and force pushed. Previously I didn't see these warnings on CI but lets see how things go now

UPDATE: Could reproduce those fails on CI, so force pushed again with fixes for that

@ankith26 ankith26 force-pushed the ankith26-more-sdl3-2 branch from f1e61a6 to 634619b Compare January 2, 2025 13:30
Copy link
Member

@Starbuck5 Starbuck5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it in

@ankith26 ankith26 added this to the 2.5.3 milestone Jan 17, 2025
@ankith26 ankith26 merged commit 3ec0832 into main Jan 17, 2025
25 checks passed
@ankith26 ankith26 deleted the ankith26-more-sdl3-2 branch January 17, 2025 09:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
key pygame.key mouse pygame.mouse sdl3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants