Added mechanism for getting aspect ratio from recompiled code, fixed wipe3 transition in widescreen

This commit is contained in:
Mr-Wiseguy
2024-02-17 22:12:23 -05:00
parent b6cec905c7
commit 99c14fde04
6 changed files with 66 additions and 0 deletions
+9
View File
@@ -4,6 +4,7 @@
#include "recomp_input.h"
#include "../ultramodern/ultramodern.hpp"
#include "../patches/input.h"
#include "../patches/graphics.h"
// Arrays that hold the mappings for every input for keyboard and controller respectively.
using input_mapping = std::array<recomp::InputField, recomp::bindings_per_input>;
@@ -127,3 +128,11 @@ extern "C" void recomp_get_gyro_deltas(uint8_t* rdram, recomp_context* ctx) {
recomp::get_gyro_deltas(x_out, y_out);
}
#include "recomp_ui.h"
extern "C" void recomp_get_aspect_ratio(uint8_t* rdram, recomp_context* ctx) {
int width, height;
recomp::get_window_size(width, height);
_return(ctx, static_cast<float>(width) / height);
}