1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

(VITA) Rotation workaround

This commit is contained in:
Francisco José García García 2016-08-01 20:26:29 +02:00
parent 3402c0d420
commit 95b630636d
2 changed files with 4 additions and 5 deletions

View File

@ -602,8 +602,8 @@ static inline void draw_texture_scale_rotate_hotspot_generic(const vita2d_textur
for (i = 0; i < 4; ++i) { // Rotate and translate
float _x = vertices[i].x;
float _y = vertices[i].y;
vertices[i].x = _x*c - _y*s + x;
vertices[i].y = _x*s + _y*c + y;
vertices[i].x = _x*c - _y*s + x + center_x_scaled;
vertices[i].y = _x*s + _y*c + y + center_y_scaled;
}
indices[0] = 0;

View File

@ -239,9 +239,8 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
const float rad = vita->rotation * radian;
float scalex = vita->vp.width / (float)vita->width;
float scaley = vita->vp.height / (float)vita->height;
vita2d_draw_texture_scale_rotate(vita->texture,
vita->vp.x + PSP_FB_WIDTH / (float)vita->width,
vita->vp.y + PSP_FB_HEIGHT / (float)vita->height, scalex, scaley, rad);
vita2d_draw_texture_scale_rotate(vita->texture,vita->vp.x,
vita->vp.y, scalex, scaley, rad);
}
}