Skip to content

[rcore_desktop_sdl] fix: handle monitor ID correctly on SDL3#5290

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
sleeptightAnsiC:fix_rcore_sdl__monitor_id
Oct 21, 2025
Merged

[rcore_desktop_sdl] fix: handle monitor ID correctly on SDL3#5290
raysan5 merged 1 commit into
raysan5:masterfrom
sleeptightAnsiC:fix_rcore_sdl__monitor_id

Conversation

@sleeptightAnsiC

@sleeptightAnsiC sleeptightAnsiC commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

SDL3 uses ID when dealing with monitors, unlike SDL2 which uses Index for the same thing. This problem was already fixed in multiple places by use of preprocessor branches, so I did the very same thing elsewhere.

Please, notice that this is a pretty bad solution to this problem, and I only did it to keep it consistent with the rest of the code. The more about why it's not correct is mentioned here #5256 (comment) and here #5256 (comment) . Hopefully, someone will refactor it someday :)

Fixes: #5256

SDL3 uses ID when dealing with monitors, unlike SDL2 which uses Index
for the same thing. This problem was already fixed in multiple places
by use of preprocessor branches, so I did the very same thing.

Please, notice that this is a pretty bad solution to this problem,
and I only did it to keep it consistent with the rest of the code.
The more about why it's not correct is mentioned here:
raysan5#5256 (comment)
Hopefully, someone will refactor it someday :)

Fixes: raysan5#5256
@raysan5 raysan5 merged commit 1b5a14e into raysan5:master Oct 21, 2025
16 checks passed
@raysan5

raysan5 commented Oct 21, 2025

Copy link
Copy Markdown
Owner

@sleeptightAnsiC thanks for the review!

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.

[rcore][windows] Failed to find selected monitor on SDL platform

2 participants