Skip to content

Commit

Permalink
MorphOS: add BMF_3DTARGET detection
Browse files Browse the repository at this point in the history
before creation bitmap
  • Loading branch information
BeWorld2018 committed Oct 10, 2023
1 parent 210b0f2 commit 55a0860
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/video/morphos/SDL_mosmodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ MOS_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
mode.refresh_rate = (int)hori;
mode.format = MOS_GetSDLPixelFormat(pixelfmt,SDL_PIXELFORMAT_BGRA8888);

//D("[%s] Mode %s - pixelfmt %ld\n", __FUNCTION__, name, pixelfmt);
D("[%s] Mode %s - pixelfmt %ld 3DSUPPORT=%d\n", __FUNCTION__, name, pixelfmt, MOS_MonitorHas3D(md->monitor, pixelfmt));
mode.driverdata = sdl_display->desktop_mode.driverdata ? SDL_malloc(4) : NULL;
SDL_AddDisplayMode(sdl_display, &mode);
}
Expand Down
4 changes: 2 additions & 2 deletions src/video/morphos/SDL_mosopengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ SDL_bool MOS_GL_AllocBitmap(_THIS, SDL_Window * window)
FreeBitMap(data->bitmap);
data->bitmap = NULL;
}

return (data->bitmap = AllocBitMap(window->w, window->h, data->win->RPort->BitMap->Depth, BMF_MINPLANES|BMF_DISPLAYABLE|BMF_3DTARGET, data->win->RPort->BitMap)) != NULL;
ULONG flags = GetBitMapAttr(vd->WScreen->RastPort.BitMap, BMA_FLAGS);
return (!(flags & BMF_3DTARGET) && (data->bitmap = AllocBitMap(window->w, window->h, data->win->RPort->BitMap->Depth, BMF_MINPLANES|BMF_DISPLAYABLE|BMF_3DTARGET, data->win->RPort->BitMap)) != NULL);

}

Expand Down

0 comments on commit 55a0860

Please sign in to comment.