diff options
-rw-r--r-- | setup/display.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/setup/display.c b/setup/display.c index f4a82520..b4e95688 100644 --- a/setup/display.c +++ b/setup/display.c @@ -247,9 +247,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. @@ -267,7 +265,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; + } } } |