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

FSUI: Don't move IMGUI cursor unnecessarily in DrawGameGrid() #11969

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

TheLastRar
Copy link
Contributor

Description of Changes

Move setting the cursor to the beginning of the Game Grid drawing loop.
Previously we would also set the cursor for the next item, even when we where the last item.

Rationale behind Changes

If the GameGrid was drawing an empty list, or a list where the number of grids was a multiple of the grid width, we would set the cursor onto a "grid line" with no entries.

In older versions of IMGUI, setting the cursor implicitly extended the parent's boundaries, this change was deprecated and only adding items would set the size. ocornut/imgui#5548
During this, an assert was added to detect the programs relying on this deprecated behaviour.

We trigger this assert when we move the cursor onto a new line, but leave it empty.

As the problem this PR addresses is minor, it should not block v2.2's release.

Suggested Testing Steps

Test Big Picture Mode's GameList, using the grid view

@lightningterror lightningterror merged commit e57f7d9 into PCSX2:master Nov 4, 2024
12 checks passed
@TheLastRar TheLastRar deleted the FSUI-NoEmptyLine branch November 4, 2024 12:44
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