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.
Also prevent segmentation fault cases related to low-res or switching from low-res to hi-res
And fix memory leak related to loading and scaling of the thumbnail image
A lot of the updated logic is borrowed from the saveload-dialog.cpp for the simple list view (with the thumbnail to the right of the list).
PR #3976 changed the game and global options dialogs so that they are
inside the ScummVM main window, instead of the game list chooser.
We now limit the option dialog width and size, so that there isn't too
much spacing in large resolutions.
Follow-up to the feature that allows skipping certain ADGF flags.
This here now also allows skipping of incomplete file/md5/size matches. It is basically the same behavior as the graylist. For the mass add all files are treated as if they are on the list.
I added skipping for the ADGF_WARNING and ADGF_UNSUPPORTED flags.
For me, this is mostly about fixing bug no. 13282. We sometimes have bogus entries which only have the purpose of presenting the error message (reasons for being unsupported) contained in the extra field of the detection entry.
Strip formatting from the list widget string before taking the length of
it to calculate the caret position. This can be seen e.g. in the save
dialog when not using the icon view.
The detection was done on the dropped path, so it worked when
dropping a directory, but not a file. Now we can drop a file
and it will run the detection on the parent directory.
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).
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.