Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/video/haiku/SDL_bmodes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,20 @@ void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display) {
uint32 count, i;

/* Get graphics-hardware supported modes */
bscreen.GetModeList(&bmodes, &count);
bscreen.GetMode(&this_bmode);

for (i = 0; i < count; ++i) {
// FIXME: Apparently there are errors with colorspace changes
if (bmodes[i].space == this_bmode.space) {
_BDisplayModeToSdlDisplayMode(&bmodes[i], &mode);
SDL_AddDisplayMode(display, &mode);
if (bscreen.GetModeList(&bmodes, &count) == B_OK)
{
if (bscreen.GetMode(&this_bmode) == B_OK)
{
for (i = 0; i < count; ++i) {
// FIXME: Apparently there are errors with colorspace changes
if (bmodes[i].space == this_bmode.space) {
_BDisplayModeToSdlDisplayMode(&bmodes[i], &mode);
SDL_AddDisplayMode(display, &mode);
}
}
}
free(bmodes); /* This should not be SDL_free() */
}
free(bmodes); /* This should not be SDL_free() */
}


Expand Down
Loading