mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2026-03-26 04:51:45 +00:00
pass gameid to init_saving()
This commit is contained in:
parent
496639b8c1
commit
8eaa83204a
5 changed files with 6 additions and 10 deletions
|
|
@ -101,10 +101,6 @@ namespace recomp {
|
|||
///
|
||||
void start(const Configuration& cfg);
|
||||
|
||||
bool eeprom_allowed();
|
||||
bool sram_allowed();
|
||||
bool flashram_allowed();
|
||||
|
||||
void start_game(const std::u8string& game_id);
|
||||
std::u8string current_game_id();
|
||||
std::string current_mod_game_id();
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ void do_dma(RDRAM_ARG PTR(OSMesgQueue) mq, gpr rdram_address, uint32_t physical_
|
|||
// Send a message to the mq to indicate that the transfer completed
|
||||
ultramodern::enqueue_external_message_src(mq, 0, false, ultramodern::EventMessageSource::Pi);
|
||||
} else if (physical_addr >= recomp::sram_base) {
|
||||
if (!recomp::sram_allowed()) {
|
||||
if (!ultramodern::sram_allowed()) {
|
||||
ultramodern::error_handling::message_box("Attempted to use SRAM saving with other save type");
|
||||
ULTRAMODERN_QUICK_EXIT();
|
||||
}
|
||||
|
|
@ -112,7 +112,7 @@ void do_dma(RDRAM_ARG PTR(OSMesgQueue) mq, gpr rdram_address, uint32_t physical_
|
|||
// write cart rom
|
||||
throw std::runtime_error("ROM DMA write unimplemented");
|
||||
} else if (physical_addr >= recomp::sram_base) {
|
||||
if (!recomp::sram_allowed()) {
|
||||
if (!ultramodern::sram_allowed()) {
|
||||
ultramodern::error_handling::message_box("Attempted to use SRAM saving with other save type");
|
||||
ULTRAMODERN_QUICK_EXIT();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -687,7 +687,7 @@ bool wait_for_game_started(uint8_t* rdram, recomp_context* context) {
|
|||
recomp::init_heap(rdram, recomp::mod_rdram_start + mod_ram_used);
|
||||
|
||||
ultramodern::set_save_type(game_entry.save_type);
|
||||
ultramodern::init_saving(rdram);
|
||||
ultramodern::init_saving(rdram, recomp::current_game_id());
|
||||
|
||||
try {
|
||||
game_entry.entrypoint(rdram, context);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace ultramodern {
|
|||
|
||||
void set_save_file_path(const std::u8string& subfolder, const std::u8string& name);
|
||||
|
||||
void init_saving(RDRAM_ARG1);
|
||||
void init_saving(RDRAM_ARG const std::u8string& name);
|
||||
|
||||
void change_save_file(const std::u8string& subfolder, const std::u8string& name);
|
||||
|
||||
|
|
|
|||
|
|
@ -189,8 +189,8 @@ void read_save_file() {
|
|||
}
|
||||
}
|
||||
|
||||
void ultramodern::init_saving(RDRAM_ARG1) {
|
||||
set_save_file_path(u8"", ultramodern::current_game_id());
|
||||
void ultramodern::init_saving(RDRAM_ARG const std::u8string& name) {
|
||||
set_save_file_path(u8"", name);
|
||||
|
||||
save_context.save_buffer.resize(get_save_size(ultramodern::get_save_type()));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue