[Scummvm-devel] SaveLoadChooser.PageDisplay vs lowres themes

Johannes Schickel lordhoto at gmail.com
Sat Jan 11 19:12:42 CET 2014


On 01/11/2014 05:54 PM, Marcus Comstedt wrote:
> Johannes Schickel <lordhoto at gmail.com> writes:
>
>> The hack would still be required, because of the implementation of the
>> choosers. It's two different classes,
> But if the theme does not support grid choosers, the class
> SaveLoadChooserGrid should never be instantiated.
>
> In fact, it _must_ not be instantiated, because if it is you'll get
> the crash I was talking about.  And if you must make sure not to
> instantiate the class, then what good are additional tests in the
> methods of that class going to do?  They aren't going to be executed
> anyway.
>

The issue is the following: Suppose you start ScummVM in 640x480 (i.e. 
hires with grid allowed), open the grid based save/load dialog and then 
use hotkeys to switch to 320x240 while the grid dialog is open, then you 
get SaveLoadChooserGrid::reflowLayout called with the lowres theme which 
doesn't allow a grid based dialog and doesn't have the page widget 
defined => crash. That's what the HACK tries to cover.

// Johannes





More information about the Scummvm-devel mailing list