scp-fs2open / scp-fs2open/fs2open.github.com
SDL3 Requires Better Device References To Avoid Buggy Behavior (Name instead of index)
- Dominant language
- C++
- Stars
- 487
- Forks
- 184
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 44
Description
"Basically IDs shouldn't be used to reference anything between sessions. It was that way in SDL2 as well, but IDs and indexes got used to reference devices because SDL2 maintained a fairly consistent list order (a hold-over from bad SDL1 design). SDL3 dropped that bad behavior.
This issue here isn't specific to monitors though, it's all devices. Joysticks are another big one that required a bit of nuance, since they are referenced by index, but they're also referenced by GUID which allowed me to deal with it better (the joystick code now ignores the index and/or sets it to -1). Though I would like to change it to use both device name and GUID for joysticks at some point when/if we can agree to break config compatibility."
_Originally posted by @notimaginative in https://github.com/scp-fs2open/fs2open.github.com/pull/7220#discussion_r3313743293_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.