mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-26 17:50:56 +00:00
Fix rotation on 3DS and Wii U (#13353)
* Fix rotation on 3DS * Fix rotation on Wii U
This commit is contained in:
parent
98431a15c0
commit
34892555ec
@ -138,10 +138,10 @@ static INLINE void ctr_set_screen_coords(ctr_video_t * ctr)
|
||||
}
|
||||
else if (ctr->rotation == 1) /* 90° */
|
||||
{
|
||||
ctr->frame_coords->x0 = ctr->vp.x;
|
||||
ctr->frame_coords->y0 = ctr->vp.y;
|
||||
ctr->frame_coords->x1 = ctr->vp.x + ctr->vp.width;
|
||||
ctr->frame_coords->y1 = ctr->vp.y + ctr->vp.height;
|
||||
ctr->frame_coords->x1 = ctr->vp.x;
|
||||
ctr->frame_coords->y1 = ctr->vp.y;
|
||||
ctr->frame_coords->x0 = ctr->vp.x + ctr->vp.width;
|
||||
ctr->frame_coords->y0 = ctr->vp.y + ctr->vp.height;
|
||||
}
|
||||
else if (ctr->rotation == 2) /* 180° */
|
||||
{
|
||||
@ -152,10 +152,10 @@ static INLINE void ctr_set_screen_coords(ctr_video_t * ctr)
|
||||
}
|
||||
else /* 270° */
|
||||
{
|
||||
ctr->frame_coords->x1 = ctr->vp.x;
|
||||
ctr->frame_coords->y1 = ctr->vp.y;
|
||||
ctr->frame_coords->x0 = ctr->vp.x + ctr->vp.width;
|
||||
ctr->frame_coords->y0 = ctr->vp.y + ctr->vp.height;
|
||||
ctr->frame_coords->x0 = ctr->vp.x;
|
||||
ctr->frame_coords->y0 = ctr->vp.y;
|
||||
ctr->frame_coords->x1 = ctr->vp.x + ctr->vp.width;
|
||||
ctr->frame_coords->y1 = ctr->vp.y + ctr->vp.height;
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,9 +194,6 @@ static void ctr_update_viewport(
|
||||
bool video_scale_integer = settings->bools.video_scale_integer;
|
||||
unsigned aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
|
||||
|
||||
if (ctr->rotation & 0x1)
|
||||
desired_aspect = 1.0 / desired_aspect;
|
||||
|
||||
if (video_scale_integer)
|
||||
{
|
||||
video_viewport_get_scaled_integer(&ctr->vp, ctr->vp.full_width,
|
||||
|
@ -88,7 +88,7 @@ static void wiiu_set_projection(wiiu_video_t *wiiu)
|
||||
{
|
||||
math_matrix_4x4 proj, rot;
|
||||
matrix_4x4_ortho(proj, 0, 1, 1, 0, -1, 1);
|
||||
matrix_4x4_rotate_z(rot, wiiu->rotation * -M_PI_2);
|
||||
matrix_4x4_rotate_z(rot, wiiu->rotation * M_PI_2);
|
||||
matrix_4x4_multiply((*wiiu->ubo_mvp), rot, proj);
|
||||
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_UNIFORM_BLOCK, wiiu->ubo_mvp, sizeof(*wiiu->ubo_mvp));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user