fix GLES for VideoCore

This commit is contained in:
Toad King 2012-09-24 21:25:31 -04:00
parent df77bbd0bd
commit eee9468900
2 changed files with 11 additions and 1 deletions

View File

@ -172,9 +172,14 @@ static bool gfx_ctx_init(void)
vc_dispmanx_display_get_info(dispman_display, &dispman_modeinfo);
dispman_update = vc_dispmanx_update_start(0);
VC_DISPMANX_ALPHA_T alpha;
alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS;
alpha.opacity = 255;
alpha.mask = 0;
dispman_element = vc_dispmanx_element_add(dispman_update, dispman_display,
0 /*layer*/, &dst_rect, 0 /*src*/,
&src_rect, DISPMANX_PROTECTION_NONE, 0 /*alpha*/, 0 /*clamp*/, DISPMANX_NO_ROTATE);
&src_rect, DISPMANX_PROTECTION_NONE, &alpha, 0 /*clamp*/, DISPMANX_NO_ROTATE);
nativewindow.element = dispman_element;
nativewindow.width = g_fb_width;

View File

@ -610,6 +610,11 @@ void gl_set_viewport(gl_t *gl, unsigned width, unsigned height, bool force_full,
{
float desired_aspect = g_settings.video.aspect_ratio;
float device_aspect = (float)width / height;
// check for SD televisions: they should always be 4:3
if ((width == 640 || width == 720) && (height == 480 || height == 576))
device_aspect = 4.0f / 3.0f;
float delta;
#ifdef RARCH_CONSOLE