mirror of
https://github.com/libretro/RetroArch
synced 2025-02-25 12:41:18 +00:00
Merge pull request #1308 from gizmo98/patch-2
RPI/VIDEOCORE: enable hardware upscaling...
This commit is contained in:
commit
b244b25082
@ -132,9 +132,16 @@ static void gfx_ctx_vc_get_video_size(void *data,
|
|||||||
unsigned *width, unsigned *height)
|
unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
|
if (g_settings.video.fullscreen_x != 0 &&
|
||||||
|
g_settings.video.fullscreen_y != 0) {
|
||||||
|
*width = g_settings.video.fullscreen_x;
|
||||||
|
*height = g_settings.video.fullscreen_y;
|
||||||
|
}
|
||||||
|
else {
|
||||||
*width = g_fb_width;
|
*width = g_fb_width;
|
||||||
*height = g_fb_height;
|
*height = g_fb_height;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void gfx_ctx_vc_destroy(void *data);
|
static void gfx_ctx_vc_destroy(void *data);
|
||||||
|
|
||||||
@ -216,9 +223,15 @@ static bool gfx_ctx_vc_init(void *data)
|
|||||||
|
|
||||||
src_rect.x = 0;
|
src_rect.x = 0;
|
||||||
src_rect.y = 0;
|
src_rect.y = 0;
|
||||||
|
if (g_settings.video.fullscreen_x != 0 &&
|
||||||
|
g_settings.video.fullscreen_y != 0) {
|
||||||
|
src_rect.width = g_settings.video.fullscreen_x << 16;
|
||||||
|
src_rect.height = g_settings.video.fullscreen_y << 16;
|
||||||
|
}
|
||||||
|
else {
|
||||||
src_rect.width = g_fb_width << 16;
|
src_rect.width = g_fb_width << 16;
|
||||||
src_rect.height = g_fb_height << 16;
|
src_rect.height = g_fb_height << 16;
|
||||||
|
}
|
||||||
dispman_display = vc_dispmanx_display_open(0 /* LCD */);
|
dispman_display = vc_dispmanx_display_open(0 /* LCD */);
|
||||||
vc_dispmanx_display_get_info(dispman_display, &dispman_modeinfo);
|
vc_dispmanx_display_get_info(dispman_display, &dispman_modeinfo);
|
||||||
dispman_update = vc_dispmanx_update_start(0);
|
dispman_update = vc_dispmanx_update_start(0);
|
||||||
@ -233,8 +246,15 @@ static bool gfx_ctx_vc_init(void *data)
|
|||||||
&src_rect, DISPMANX_PROTECTION_NONE, &alpha, 0 /*clamp*/, DISPMANX_NO_ROTATE);
|
&src_rect, DISPMANX_PROTECTION_NONE, &alpha, 0 /*clamp*/, DISPMANX_NO_ROTATE);
|
||||||
|
|
||||||
nativewindow.element = dispman_element;
|
nativewindow.element = dispman_element;
|
||||||
|
if (g_settings.video.fullscreen_x != 0 &&
|
||||||
|
g_settings.video.fullscreen_y != 0) {
|
||||||
|
nativewindow.width = g_settings.video.fullscreen_x;
|
||||||
|
nativewindow.height = g_settings.video.fullscreen_y;
|
||||||
|
}
|
||||||
|
else {
|
||||||
nativewindow.width = g_fb_width;
|
nativewindow.width = g_fb_width;
|
||||||
nativewindow.height = g_fb_height;
|
nativewindow.height = g_fb_height;
|
||||||
|
}
|
||||||
vc_dispmanx_update_submit_sync(dispman_update);
|
vc_dispmanx_update_submit_sync(dispman_update);
|
||||||
|
|
||||||
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, &nativewindow, NULL);
|
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, &nativewindow, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user