diff options
Diffstat (limited to 'src/setup')
-rw-r--r-- | src/setup/display.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/setup/display.c b/src/setup/display.c index 1e5e9e31..9ed0ae5f 100644 --- a/src/setup/display.c +++ b/src/setup/display.c @@ -257,9 +257,7 @@ static int GetSupportedBPPIndex(char *description) } } - // Shouldn't happen; fall back to the first in the list. - - return 0; + return -1; } // Set selected_bpp to match screen_bpp. @@ -277,7 +275,11 @@ static int TrySetSelectedBPP(void) if (pixel_depths[i].bpp == screen_bpp) { selected_bpp = GetSupportedBPPIndex(pixel_depths[i].description); - return 1; + + if (selected_bpp >= 0) + { + return 1; + } } } |