Skip to content

Conversation

@jimtahu
Copy link

@jimtahu jimtahu commented Nov 15, 2024

Description

WIN_AddDisplay asserted that the returned index is the expected next one in the list. This can be an unexpected number when displays are add and removed in a batch (eg, Remote Desktop disconnect and reconnect). Instead always just make use of the next index, even if it is not the expected next index value.

Existing Issue(s)

This fixes issue #9105

WIN_AddDisplay asserted that the returned index is the expected next
one in the list. This can be an unexpected number when displays are
add and removed in a batch (eg, Remote Desktop disconnect and reconnect).
Instead always just make use of the next index, even if it is not the
expected next index value. This fixes issue libsdl-org#9105
Copy link
Author

Choose a reason for hiding this comment

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

For additional context, the old removed display at index 0 has been marked invalid from the loop on 822, which is why the first existing display gets 1, and the defunct display isn't removed until the cleanup on line 833

@slouken slouken merged commit bee8874 into libsdl-org:release-2.30.x Nov 15, 2024
37 checks passed
@slouken
Copy link
Collaborator

slouken commented Nov 15, 2024

Merged, thanks!

@sezero
Copy link
Contributor

sezero commented Nov 15, 2024

Is this really for the 2.30.x only?

@slouken
Copy link
Collaborator

slouken commented Nov 15, 2024

Is this really for the 2.30.x only?

Nope, thanks for catching that.

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.

3 participants