mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-20 06:00:58 +00:00
GE Debugger: Cleanup vertex list redraw.
When you're scrolled down and it deletes items, it was previously scrolling up an extra step, and not redrawing. This tries to force workaround the bug.
This commit is contained in:
parent
4a8d320479
commit
4de217d3e4
@ -266,6 +266,17 @@ void GenericListControl::ProcessUpdate() {
|
||||
int newRows = GetRowCount();
|
||||
|
||||
int items = ListView_GetItemCount(handle);
|
||||
ListView_SetItemCount(handle, newRows);
|
||||
|
||||
// Scroll to top if we're removing items. It kinda does this automatically, but it's buggy.
|
||||
if (items > newRows) {
|
||||
POINT pt{};
|
||||
ListView_GetOrigin(handle, &pt);
|
||||
|
||||
if (pt.x != 0 || pt.y != 0)
|
||||
ListView_Scroll(handle, -pt.x, -pt.y);
|
||||
}
|
||||
|
||||
while (items < newRows)
|
||||
{
|
||||
LVITEM lvI;
|
||||
@ -290,6 +301,7 @@ void GenericListControl::ProcessUpdate() {
|
||||
|
||||
InvalidateRect(handle, nullptr, TRUE);
|
||||
UpdateWindow(handle);
|
||||
ListView_RedrawItems(handle, 0, newRows - 1);
|
||||
updating = false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user