mirror of
https://github.com/libretro/RetroArch
synced 2025-02-24 09:40:07 +00:00
Merge pull request #3315 from frangarcj/master
(VITA) Rotation workaround
This commit is contained in:
commit
0e814c4e6d
4
deps/libvita2d/source/vita2d_texture.c
vendored
4
deps/libvita2d/source/vita2d_texture.c
vendored
@ -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
|
for (i = 0; i < 4; ++i) { // Rotate and translate
|
||||||
float _x = vertices[i].x;
|
float _x = vertices[i].x;
|
||||||
float _y = vertices[i].y;
|
float _y = vertices[i].y;
|
||||||
vertices[i].x = _x*c - _y*s + x;
|
vertices[i].x = _x*c - _y*s + x + center_x_scaled;
|
||||||
vertices[i].y = _x*s + _y*c + y;
|
vertices[i].y = _x*s + _y*c + y + center_y_scaled;
|
||||||
}
|
}
|
||||||
|
|
||||||
indices[0] = 0;
|
indices[0] = 0;
|
||||||
|
@ -239,9 +239,8 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
|
|||||||
const float rad = vita->rotation * radian;
|
const float rad = vita->rotation * radian;
|
||||||
float scalex = vita->vp.width / (float)vita->width;
|
float scalex = vita->vp.width / (float)vita->width;
|
||||||
float scaley = vita->vp.height / (float)vita->height;
|
float scaley = vita->vp.height / (float)vita->height;
|
||||||
vita2d_draw_texture_scale_rotate(vita->texture,
|
vita2d_draw_texture_scale_rotate(vita->texture,vita->vp.x,
|
||||||
vita->vp.x + PSP_FB_WIDTH / (float)vita->width,
|
vita->vp.y, scalex, scaley, rad);
|
||||||
vita->vp.y + PSP_FB_HEIGHT / (float)vita->height, scalex, scaley, rad);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user