mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Upstream OGA patch for vertical screen
This keeps the tradition DRM driver along with the OGA one. The probe function skips the driver if the screen is non rotated to fall back to the regular DRM driver. This is being upstreamed from the Lakka repo.
This commit is contained in:
parent
0d06927105
commit
1cad93207b
3 changed files with 14 additions and 6 deletions
|
@ -1372,11 +1372,10 @@ OBJ += gfx/drivers_context/gfx_null_ctx.o
|
|||
|
||||
ifeq ($(HAVE_KMS), 1)
|
||||
HAVE_AND_WILL_USE_DRM = 1
|
||||
OBJ += gfx/drivers_context/drm_ctx.o
|
||||
|
||||
ifeq ($(HAVE_ODROIDGO2), 1)
|
||||
OBJ += gfx/drivers_context/drm_go2_ctx.o
|
||||
else
|
||||
OBJ += gfx/drivers_context/drm_ctx.o
|
||||
endif
|
||||
DEF_FLAGS += $(GBM_CFLAGS) $(DRM_CFLAGS)
|
||||
LIBS += $(GBM_LIBS) $(DRM_LIBS)
|
||||
|
|
|
@ -119,12 +119,22 @@ static void *gfx_ctx_go2_drm_init(void *video_driver)
|
|||
return NULL;
|
||||
|
||||
drm->display = go2_display_create();
|
||||
drm->presenter = go2_presenter_create(drm->display,
|
||||
DRM_FORMAT_RGB565, 0xff000000, true);
|
||||
|
||||
drm->native_width = go2_display_height_get(drm->display);
|
||||
drm->native_height = go2_display_width_get(drm->display);
|
||||
|
||||
/* This driver should only be used on rotated screens */
|
||||
if (drm->native_width < drm->native_height)
|
||||
{
|
||||
/* This should be fixed by using wayland/weston... */
|
||||
go2_display_destroy(drm->display);
|
||||
free(drm);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
drm->presenter = go2_presenter_create(drm->display,
|
||||
DRM_FORMAT_RGB565, 0xff000000, true);
|
||||
|
||||
return drm;
|
||||
}
|
||||
|
||||
|
|
|
@ -795,9 +795,8 @@ static const gfx_ctx_driver_t *gfx_ctx_gl_drivers[] = {
|
|||
#if defined(HAVE_KMS)
|
||||
#if defined(HAVE_ODROIDGO2)
|
||||
&gfx_ctx_go2_drm,
|
||||
#else
|
||||
&gfx_ctx_drm,
|
||||
#endif
|
||||
&gfx_ctx_drm,
|
||||
#endif
|
||||
#if defined(ANDROID)
|
||||
&gfx_ctx_android,
|
||||
|
|
Loading…
Add table
Reference in a new issue