Resolve review feedback

This commit is contained in:
dcvz 2024-06-05 00:46:49 +02:00
parent 3a0d970415
commit 5198c0b036
4 changed files with 11 additions and 9 deletions

View File

@ -94,6 +94,7 @@ add_custom_command(OUTPUT
${CMAKE_SOURCE_DIR}/RecompiledPatches/patches.c
${CMAKE_SOURCE_DIR}/RecompiledPatches/recomp_overlays.inl
${CMAKE_SOURCE_DIR}/RecompiledPatches/funcs.h
# TODO: Look into why modifying patches requires two builds to take
COMMAND ./N64Recomp patches.toml
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS ${CMAKE_SOURCE_DIR}/patches/patches.bin

View File

@ -9,6 +9,7 @@ namespace zelda64 {
constexpr std::u8string_view program_id = u8"Zelda64Recompiled";
constexpr std::string_view program_name = "Zelda 64: Recompiled";
// TODO: Move loading configs to the runtime once we have a way to allow per-project customization.
void load_config();
void save_config();
@ -24,7 +25,7 @@ namespace zelda64 {
enum class AutosaveMode {
On,
Off,
OptionCount
OptionCount
};
NLOHMANN_JSON_SERIALIZE_ENUM(zelda64::AutosaveMode, {

View File

@ -386,34 +386,34 @@ int main(int argc, char** argv) {
recomp::register_config_path(zelda64::get_app_folder_path());
zelda64::load_config();
const static recomp::rsp::callbacks_t &rsp_callbacks{
recomp::rsp::callbacks_t rsp_callbacks{
.get_rsp_microcode = get_rsp_microcode,
};
const static ultramodern::gfx_callbacks_t gfx_callbacks{
ultramodern::gfx_callbacks_t gfx_callbacks{
.create_gfx = create_gfx,
.create_window = create_window,
.update_gfx = update_gfx,
};
const static ultramodern::audio_callbacks_t audio_callbacks{
ultramodern::audio_callbacks_t audio_callbacks{
.queue_samples = queue_samples,
.get_frames_remaining = get_frames_remaining,
.set_frequency = set_frequency,
};
const static ultramodern::input_callbacks_t input_callbacks{
ultramodern::input_callbacks_t input_callbacks{
.poll_input = recomp::poll_inputs,
.get_input = recomp::get_n64_input,
.set_rumble = recomp::set_rumble,
};
const static ultramodern::events::callbacks_t thread_callbacks{
ultramodern::events::callbacks_t thread_callbacks{
.vi_callback = recomp::update_rumble,
.gfx_init_callback = recompui::update_supported_options,
};
const static ultramodern::error_handling::callbacks_t error_handling_callbacks{
ultramodern::error_handling::callbacks_t error_handling_callbacks{
.message_box = recompui::message_box,
};

View File

@ -4,13 +4,13 @@
#include "librecomp/overlays.hpp"
void zelda64::register_overlays() {
const static recomp::overlay_section_table_data_t sections {
recomp::overlay_section_table_data_t sections {
.code_sections = section_table,
.num_code_sections = ARRLEN(section_table),
.total_num_sections = num_sections,
};
const static recomp::overlays_by_index_t overlays {
recomp::overlays_by_index_t overlays {
.table = overlay_sections_by_index,
.len = ARRLEN(overlay_sections_by_index),
};