mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2026-05-10 19:01:53 +00:00
Move init_saving to recomp:start from ultramodern::preinit and some other fixes
This commit is contained in:
parent
d38e10eac4
commit
d1c40a4435
6 changed files with 10 additions and 8 deletions
|
|
@ -16,8 +16,9 @@ namespace recomp {
|
|||
size_t len;
|
||||
};
|
||||
|
||||
extern void register_overlays(const overlay_section_table_data_t& sections, const overlays_by_index_t& overlays);
|
||||
extern void register_patch_section(SectionTableEntry* code_sections);
|
||||
void register_overlays(const overlay_section_table_data_t& sections, const overlays_by_index_t& overlays);
|
||||
void register_patch_section(SectionTableEntry* code_sections);
|
||||
void load_patch_functions();
|
||||
};
|
||||
|
||||
extern "C" void load_overlays(uint32_t rom, int32_t ram_addr, uint32_t size);
|
||||
|
|
|
|||
|
|
@ -142,8 +142,6 @@ extern "C" void unload_overlays(int32_t ram_addr, uint32_t size) {
|
|||
}
|
||||
}
|
||||
|
||||
void load_patch_functions();
|
||||
|
||||
void init_overlays() {
|
||||
section_addresses = (int32_t *)malloc(sections_info.total_num_sections * sizeof(int32_t));
|
||||
|
||||
|
|
@ -158,7 +156,7 @@ void init_overlays() {
|
|||
}
|
||||
);
|
||||
|
||||
load_patch_functions();
|
||||
recomp::load_patch_functions();
|
||||
}
|
||||
|
||||
extern "C" recomp_func_t * get_function(int32_t addr) {
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ static SectionTableEntry* code_sections = nullptr;
|
|||
|
||||
void load_special_overlay(const SectionTableEntry& section, int32_t ram);
|
||||
|
||||
void register_patch_section(SectionTableEntry* sections) {
|
||||
void recomp::register_patch_section(SectionTableEntry* sections) {
|
||||
code_sections = sections;
|
||||
}
|
||||
|
||||
void load_patch_functions() {
|
||||
void recomp::load_patch_functions() {
|
||||
load_special_overlay(code_sections[0], code_sections[0].ram_addr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,8 @@ struct {
|
|||
|
||||
const std::u8string save_folder = u8"saves";
|
||||
|
||||
extern std::filesystem::path config_path;
|
||||
|
||||
std::filesystem::path get_save_file_path() {
|
||||
return config_path / save_folder / (std::u8string{recomp::current_game_id()} + u8".bin");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -450,6 +450,8 @@ void recomp::start(ultramodern::WindowHandle window_handle, const recomp::rsp::c
|
|||
ultramodern::error_handling::message_box("Error opening stored ROM! Please restart this program.");
|
||||
}
|
||||
|
||||
ultramodern::init_saving(rdram);
|
||||
|
||||
auto find_it = game_roms.find(current_game.value());
|
||||
const recomp::GameEntry& game_entry = find_it->second;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ void ultramodern::preinit(RDRAM_ARG ultramodern::WindowHandle window_handle) {
|
|||
ultramodern::init_events(PASS_RDRAM window_handle);
|
||||
ultramodern::init_timers(PASS_RDRAM1);
|
||||
ultramodern::init_audio();
|
||||
ultramodern::init_saving(PASS_RDRAM1);
|
||||
ultramodern::init_thread_cleanup();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue