mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-19 09:31:26 +00:00
On 10.1, parse_screen_prefs() was being called with a nil string
(i.e. PrefsInit wasn't getting a screen pref item). Cope with that.
This commit is contained in:
parent
db3c11dd75
commit
4a61b727af
@ -101,6 +101,9 @@ colours_from_depth(const uint16 depth)
|
|||||||
bool
|
bool
|
||||||
parse_screen_prefs(const char *mode_str)
|
parse_screen_prefs(const char *mode_str)
|
||||||
{
|
{
|
||||||
|
if ( ! mode_str )
|
||||||
|
return false;
|
||||||
|
|
||||||
if (sscanf(mode_str, "win/%hd/%hd/%hd",
|
if (sscanf(mode_str, "win/%hd/%hd/%hd",
|
||||||
&init_width, &init_height, &init_depth) == 3)
|
&init_width, &init_height, &init_depth) == 3)
|
||||||
display_type = DISPLAY_WINDOW;
|
display_type = DISPLAY_WINDOW;
|
||||||
|
Loading…
Reference in New Issue
Block a user