Refactor ROM saving process to utilize SaveSettings struct
- Updated yaze_save_rom and Backup command to use the new SaveSettings struct for improved clarity and maintainability. - Adjusted SaveToFile calls in Tile16Transfer to align with the new structured settings approach. - Enhanced parameter management for ROM saving operations across multiple components.
This commit is contained in:
@@ -112,7 +112,8 @@ void yaze_unload_rom(zelda3_rom *rom) {
|
||||
void yaze_save_rom(zelda3_rom *rom, const char *filename) {
|
||||
if (rom->impl) {
|
||||
yaze::Rom *internal_rom = static_cast<yaze::Rom *>(rom->impl);
|
||||
if (auto status = internal_rom->SaveToFile(false, false, filename);
|
||||
if (auto status = internal_rom->SaveToFile(yaze::Rom::SaveSettings{
|
||||
.backup = true, .save_new = false, .filename = filename});
|
||||
!status.ok()) {
|
||||
throw std::runtime_error(status.message().data());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user