use forced aspect ratio instead

This commit is contained in:
Kiloku
2025-01-11 11:17:45 -03:00
committed by Lywx
parent 63fa98d02f
commit 2d538fac86
4 changed files with 50 additions and 50 deletions
+8 -8
View File
@@ -547,12 +547,12 @@ extern "C" float OTRGetDimensionFromRightEdge(float v) {
(gfx_native_dimensions.width - v));
}
extern "C" float OTRGetDimensionFromLeftEdgeCentered(float v) {
return (gfx_native_dimensions.width / 2 - gfx_native_dimensions.height / 2 + (v));
extern "C" float OTRGetDimensionFromLeftEdgeForcedAspect(float v, float aspectRatio) {
return (gfx_native_dimensions.width / 2 - gfx_native_dimensions.height / 2 * (aspectRatio > 0 ? aspectRatio : OTRGetAspectRatio()) + (v));
}
extern "C" float OTRGetDimensionFromRightEdgeCentered(float v) {
return (gfx_native_dimensions.width / 2 + gfx_native_dimensions.height / 2 -
extern "C" float OTRGetDimensionFromRightEdgeForcedAspect(float v, float aspectRatio) {
return (gfx_native_dimensions.width / 2 + gfx_native_dimensions.height / 2 * (aspectRatio > 0 ? aspectRatio : OTRGetAspectRatio()) -
(gfx_native_dimensions.width - v));
}
// Gets the width of the current render target area
@@ -573,12 +573,12 @@ extern "C" int16_t OTRGetRectDimensionFromRightEdge(float v) {
return ((int) ceilf(OTRGetDimensionFromRightEdge(v)));
}
extern "C" int16_t OTRGetRectDimensionFromLeftEdgeCentered(float v) {
return ((int) floorf(OTRGetDimensionFromLeftEdgeCentered(v)));
extern "C" int16_t OTRGetRectDimensionFromLeftEdgeForcedAspect(float v, float aspectRatio) {
return ((int) floorf(OTRGetDimensionFromLeftEdgeForcedAspect(v, aspectRatio)));
}
extern "C" int16_t OTRGetRectDimensionFromRightEdgeCentered(float v) {
return ((int) ceilf(OTRGetDimensionFromRightEdgeCentered(v)));
extern "C" int16_t OTRGetRectDimensionFromRightEdgeForcedAspect(float v, float aspectRatio) {
return ((int) ceilf(OTRGetDimensionFromRightEdgeForcedAspect(v, aspectRatio)));
}
extern "C" int32_t OTRConvertHUDXToScreenX(int32_t v) {