videocore: enable upscaling...
...if retroarch.cfg contains custom resolution.
This commit is contained in:
parent
141cd55112
commit
e699f7e46e
|
@ -132,8 +132,15 @@ static void gfx_ctx_vc_get_video_size(void *data,
|
||||||
unsigned *width, unsigned *height)
|
unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
*width = g_fb_width;
|
if (g_settings.video.fullscreen_x != 0 &&
|
||||||
*height = g_fb_height;
|
g_settings.video.fullscreen_y != 0) {
|
||||||
|
*width = g_settings.video.fullscreen_x;
|
||||||
|
*height = g_settings.video.fullscreen_y;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
*width = g_fb_width;
|
||||||
|
*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;
|
||||||
src_rect.width = g_fb_width << 16;
|
if (g_settings.video.fullscreen_x != 0 &&
|
||||||
src_rect.height = g_fb_height << 16;
|
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.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;
|
||||||
nativewindow.width = g_fb_width;
|
if (g_settings.video.fullscreen_x != 0 &&
|
||||||
nativewindow.height = g_fb_height;
|
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.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…
Reference in New Issue