mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-07-11 15:29:05 -04:00
Update to latest N64ModernRuntime (#392)
- updates to new controller changes - updates to new render context changes - updates to new controller number changes - fix for crash on save thread
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "ultramodern/input.hpp"
|
||||
|
||||
#include "json/json.hpp"
|
||||
|
||||
namespace recomp {
|
||||
@@ -150,10 +152,12 @@ namespace recomp {
|
||||
InputField& get_input_binding(GameInput input, size_t binding_index, InputDevice device);
|
||||
void set_input_binding(GameInput input, size_t binding_index, InputDevice device, InputField value);
|
||||
|
||||
void get_n64_input(uint16_t* buttons_out, float* x_out, float* y_out);
|
||||
void set_rumble(bool);
|
||||
bool get_n64_input(int controller_num, uint16_t* buttons_out, float* x_out, float* y_out);
|
||||
void set_rumble(int controller_num, bool);
|
||||
void update_rumble();
|
||||
void handle_events();
|
||||
|
||||
ultramodern::input::connected_device_info_t get_connected_device_info(int controller_num);
|
||||
|
||||
// Rumble strength ranges from 0 to 100.
|
||||
int get_rumble_strength();
|
||||
|
||||
+3
-1
@@ -119,7 +119,9 @@ namespace recompui {
|
||||
void set_cont_active(bool active);
|
||||
void activate_mouse();
|
||||
|
||||
void message_box(const char* msg);
|
||||
void message_box(const char* msg);
|
||||
|
||||
void set_render_hooks();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef __ZELDA_RENDER_H__
|
||||
#define __ZELDA_RENDER_H__
|
||||
|
||||
#include "common/rt64_user_configuration.h"
|
||||
#include "ultramodern/renderer_context.hpp"
|
||||
|
||||
namespace RT64 {
|
||||
struct Application;
|
||||
}
|
||||
|
||||
namespace zelda64 {
|
||||
namespace renderer {
|
||||
class RT64Context : public ultramodern::renderer::RendererContext {
|
||||
public:
|
||||
~RT64Context() override;
|
||||
RT64Context(uint8_t *rdram, ultramodern::renderer::WindowHandle window_handle, bool developer_mode);
|
||||
|
||||
bool valid() override { return static_cast<bool>(app); }
|
||||
|
||||
bool update_config(const ultramodern::renderer::GraphicsConfig &old_config, const ultramodern::renderer::GraphicsConfig &new_config) override;
|
||||
|
||||
void enable_instant_present() override;
|
||||
void send_dl(const OSTask *task) override;
|
||||
void update_screen(uint32_t vi_origin) override;
|
||||
void shutdown() override;
|
||||
uint32_t get_display_framerate() const override;
|
||||
float get_resolution_scale() const override;
|
||||
void load_shader_cache(std::span<const char> cache_binary) override;
|
||||
|
||||
protected:
|
||||
std::unique_ptr<RT64::Application> app;
|
||||
};
|
||||
|
||||
std::unique_ptr<ultramodern::renderer::RendererContext> create_render_context(uint8_t *rdram, ultramodern::renderer::WindowHandle window_handle, bool developer_mode);
|
||||
|
||||
RT64::UserConfiguration::Antialiasing RT64MaxMSAA();
|
||||
bool RT64SamplePositionsSupported();
|
||||
bool RT64HighPrecisionFBEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user