File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -244,13 +244,16 @@ void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display) {
244244 uint32 count, i;
245245
246246 /* Get graphics-hardware supported modes */
247- if (bscreen.GetModeList (&bmodes, &count) == B_OK && bscreen. GetMode (&this_bmode) == B_OK )
247+ if (bscreen.GetModeList (&bmodes, &count) == B_OK)
248248 {
249- for (i = 0 ; i < count; ++i) {
250- // FIXME: Apparently there are errors with colorspace changes
251- if (bmodes[i].space == this_bmode.space ) {
252- _BDisplayModeToSdlDisplayMode (&bmodes[i], &mode);
253- SDL_AddDisplayMode (display, &mode);
249+ if (bscreen.GetMode (&this_bmode) == B_OK)
250+ {
251+ for (i = 0 ; i < count; ++i) {
252+ // FIXME: Apparently there are errors with colorspace changes
253+ if (bmodes[i].space == this_bmode.space ) {
254+ _BDisplayModeToSdlDisplayMode (&bmodes[i], &mode);
255+ SDL_AddDisplayMode (display, &mode);
256+ }
254257 }
255258 }
256259 free (bmodes); /* This should not be SDL_free() */
You can’t perform that action at this time.
0 commit comments