haiku: update modelist logic

This commit is contained in:
erysdren
2026-01-07 07:22:20 -06:00
committed by Ryan C. Gordon
parent e14514f484
commit 1dda484085
+4 -1
View File
@@ -244,7 +244,9 @@ void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display) {
uint32 count, i; uint32 count, i;
/* Get graphics-hardware supported modes */ /* Get graphics-hardware supported modes */
if (bscreen.GetModeList(&bmodes, &count) == B_OK && bscreen.GetMode(&this_bmode) == B_OK) if (bscreen.GetModeList(&bmodes, &count) == B_OK)
{
if (bscreen.GetMode(&this_bmode) == B_OK)
{ {
for (i = 0; i < count; ++i) { for (i = 0; i < count; ++i) {
// FIXME: Apparently there are errors with colorspace changes // FIXME: Apparently there are errors with colorspace changes
@@ -253,6 +255,7 @@ void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display) {
SDL_AddDisplayMode(display, &mode); SDL_AddDisplayMode(display, &mode);
} }
} }
}
free(bmodes); /* This should not be SDL_free() */ free(bmodes); /* This should not be SDL_free() */
} }
} }