Commit graph

152 commits

Author SHA1 Message Date
Walter Agazzi
2b7dee23b6 GUI: Add overlay to show demo status on thumbnails 2022-10-01 00:14:56 +02:00
Thierry Crozat
f4bbbe5786
GUI: Improve thread-safety for icons set access
The previous commit was not sufficient as getIconsSet() returns a
reference to the SearchSet and it could then be used after the
mutex had been unlocked and while it was being modified in
initIconsSet() called in another thread.
2022-07-02 21:47:12 +02:00
antoniou79
ac8377286d
GUI: Fix mouse wheel on grid item tray
When using the mouse wheel (scroll up/down) in the Grid view, item tray for a selected game, ScummVM would exit

I didn't notice any side-effects from the fix, but someone more familiar with the code should confirm.
2022-07-02 12:03:31 +02:00
Thierry Crozat
4213af2469 GUI: Fix crash in GridWidget when adding game to grid launcher
The crash was not systematic but occured in the case where adding
the game did not change the indexes for the first and last visible
items. The issue was that in setEntryList() was called it did not
cleat the _visibleEntryList array that still contained dangling
pointers to the old items in the _dataEntryList. In most cases
the _visibleEntryList would be updated with pointers to the new
items when calcVisibleEntries() was called from reflowLayout(),
before being used in assignEntriesToItems() (also called from
reflowLayout()). But if the indexes of the first and last visible
items did not change, _visibleEntryList was not updated and we
got a crash in assignEntriesToItems() when trying to access freed
memory.
2022-06-21 00:33:46 +01:00
Thierry Crozat
4881b8fdec GUI: Add slider for Grid Launcher icon size 2022-06-12 22:15:18 +01:00
Le Philousophe
ebbc0b09e9
GUI: Fix dangling pointer when _headerEntryList was reallocated
As we know the size of the array in advance we can preallocate it.
2022-06-10 11:13:58 +02:00
Le Philousophe
929d60fdcc
GUI: When resizing grid make sure selected entry is displayed
Without this, at startup, the grid is not scrolled on the selected game.
2022-06-10 11:13:57 +02:00
Le Philousophe
77700ab06d
GUI: Implement setSelected in Grid and use it in launcher 2022-06-10 11:13:57 +02:00
Le Philousophe
f9aca7ee31
GUI: Don't store GridItemInfo items twice 2022-06-10 11:13:57 +02:00
Le Philousophe
572d5a2971
GUI: Apply filter even when changing sorting criteria 2022-06-10 11:13:53 +02:00
Le Philousophe
293a08df76 GUI: Fix in vs int32 discrepancies 2022-06-02 22:44:11 +02:00
Thierry Crozat
7e69686855 GUI: Fix crash when clicking on item in grid widget
The tray position was not correctly computed and it was most of the
time trying to display it way outside the window (it was using X
instead of Y in one place for the vertical position).

This was a recent regression from a6bc1d587 (GUI: Fixed grid view
for long games list).
2022-06-02 20:49:06 +01:00
Thierry Crozat
d3ae365f18 GUI: Fix grid items being twice as small on HiDPI screens with OpenGL mode 2022-06-02 20:34:27 +01:00
Eugene Sandulenko
a6bc1d5876
GUI: Fixed grid view for long games list
We used Common::Rect which uses in16 for its members. Lomger lists
exceeded 32,768 in heights, thus, leading to negative numbers. As a result,
scrollbar was not showing up.
2022-06-02 17:40:42 +02:00
Eugene Sandulenko
4bd1053236
GUI: Properly reload flags/platforms when resolution is changed 2022-05-29 16:39:35 +02:00
SupSuper
22711c9d0d GUI: Show full game description in grid view tooltip 2022-04-02 05:52:06 +01:00
SupSuper
95f8fc1218 GUI: Handle grid fallback icons more gracefully
Always use the full ID as thumbPath
2022-04-01 08:11:03 +01:00
SupSuper
284c3936ed GUI: Fix grid game icons only showing once 2022-03-31 01:06:49 +01:00
SupSuper
10b085ee5f GUI: Render grid thumbnails correctly in different pixel formats 2022-03-29 05:29:13 +01:00
SupSuper
dd4d8fc859 GUI: Add engine icon fallbacks to GridWidget thumbnails 2022-03-29 05:29:11 +01:00
Thierry Crozat
24cec3cd1b GUI: Fix use after free of surface in GridWidget
This happened after calling scaleGfx if the original surface was
already at the correct size. In such a case scaleGfx returns the
original surface, so it should not be freed.
2022-02-27 20:11:02 +00:00
SupSuper
57d0df273e GUI: Scale grid widget icons with filtering 2022-02-22 17:46:21 +00:00
Le Philousophe
1b3ac06f69 GUI: Fix various memory leaks related to grid widget 2022-01-06 19:36:23 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Torbjörn Andersson
934567a87c GUI: Fix grid memory leaks
Clearing a HashMap doesn't delete the objects stored inside it, so do
that explicitly.
2021-11-16 13:34:17 +01:00
Torbjörn Andersson
c420983634 GUI: Don't leak tray dialogs
Since the dialog isn't used outside of the function, I've also made the
variables local.
2021-11-15 09:46:01 +01:00
Eugene Sandulenko
ed5f0c1924
GUI: Properly initialize GridWidget 2021-11-13 22:06:35 +01:00
D G Turner
2a5429f947 GUI: Fix GCC Fall Through Warning 2021-11-13 05:56:51 +00:00
Eugene Sandulenko
1661fa1ba6 GUI: Read icons and metadata from gui-icons.dat 2021-11-12 14:46:34 +01:00
Eugene Sandulenko
79e2150a6f GUI: Do not spam console when icon files are not available 2021-11-12 14:46:34 +01:00
Eugene Sandulenko
f33e3c26a5 GUI: Mark Grid-related things translatable 2021-11-12 14:46:34 +01:00
Eugene Sandulenko
109beb4f86 GUI: Explicitely use Common:: namespace 2021-11-12 14:46:34 +01:00
av-dx
422b3cd64e GUI: Redraw the grid on switching grouping method 2021-11-12 14:46:34 +01:00
av-dx
009280aa53 GUI: Add filtering to grid view 2021-11-12 14:46:34 +01:00
av-dx
07a25290b3 GUI: Get platform and flag icon size from theme 2021-11-12 14:46:34 +01:00
av-dx
042fcf45bc GUI: Remove unnecessary if-else in toggleGroup 2021-11-12 14:46:34 +01:00
av-dx
af969a48f3 GUI: Add scrollToEntry() function in the grid 2021-11-12 14:46:34 +01:00
av-dx
9d1c12ff88 JANITORIAL: Fix alignment 2021-11-12 14:46:34 +01:00
av-dx
440ad82504 GUI: Remove redundant constructors 2021-11-12 14:46:34 +01:00
av-dx
d175762444 JANITORIAL: Follow naming convention for class members 2021-11-12 14:46:34 +01:00
av-dx
dc291ee56e GUI: Add metadata XMLs and MetadataParser 2021-11-12 14:46:34 +01:00
av-dx
751490d82c GUI: Invalidate visible grid when toggling groups 2021-11-12 14:46:34 +01:00
av-dx
c2999c09a2 GUI: Display fold indicator within header bounds 2021-11-12 14:46:34 +01:00
av-dx
27de66dbf6 GUI: Add hor. padding to row of game entries 2021-11-12 14:46:34 +01:00
av-dx
46c804986d GUI: Add group header formatting to grid view 2021-11-12 14:46:34 +01:00
av-dx
26e16916fe GUI: Add popup to select grouping method in grid view 2021-11-12 14:46:34 +01:00
av-dx
0c59bb0801 GUI: Find the last visible item via binary search
Store last visible item instead of an estimate of total items on screen
2021-11-12 14:46:34 +01:00
av-dx
449b18484b GUI: Handle empty _gridItems case when assigning entries 2021-11-12 14:46:34 +01:00
av-dx
c19fb00a15 GUI: Proper scaling of indicator triangle on lowres theme 2021-11-12 14:46:34 +01:00
av-dx
01030ab10f GUI: Add variables for grid padding 2021-11-12 14:46:34 +01:00