diff --git a/dosbox_pure_libretro.cpp b/dosbox_pure_libretro.cpp index b6090a26..78907e5f 100644 --- a/dosbox_pure_libretro.cpp +++ b/dosbox_pure_libretro.cpp @@ -2643,7 +2643,7 @@ static bool check_variables(bool is_startup = false) DBP_ASSERT(prop); std::string tmpval; const char* old_val = (prop->Get_type() == Value::V_STRING ? (const char*)prop->GetValue() : (tmpval = prop->GetValue().ToString()).c_str()); - if (!section || !strcmp(new_value, old_val) || prop->getChange() == Property::Changeable::Fixed) return false; + if (!section || !strcmp(new_value, old_val) || prop->IsFixed()) return false; bool reInitSection = (dbp_state != DBPSTATE_BOOT); if (disallow_in_game && dbp_game_running) diff --git a/dosbox_pure_osd.h b/dosbox_pure_osd.h index 4b8a7d2b..1ecf2f11 100644 --- a/dosbox_pure_osd.h +++ b/dosbox_pure_osd.h @@ -1306,8 +1306,7 @@ struct DBP_PureMenuState : DBP_MenuState else if (ok_type == IT_BOOTIMG) { // Machine property was fixed by dbp_reboot_machine or DOSBOX.CONF and cannot be modified here, so automatically boot the image as is (RES_NONE check is for GoToSubMenu) - if (control->GetProp("dosbox", "machine")->getChange() == Property::Changeable::Fixed) - { if (res != RES_NONE) goto handle_result; else goto top_menu; } + if (control->GetProp("dosbox", "machine")->IsFixed()) { if (res != RES_NONE) goto handle_result; else goto top_menu; } list.clear(); list.emplace_back(IT_NONE, INFO_HEADER, "Select Boot System Mode"); list.emplace_back(IT_NONE); diff --git a/dosbox_pure_run.h b/dosbox_pure_run.h index 690414d5..03272839 100644 --- a/dosbox_pure_run.h +++ b/dosbox_pure_run.h @@ -336,7 +336,7 @@ struct DBP_Run } Property* bootImgMachine = (mode == RUN_BOOTIMG && info ? control->GetProp("dosbox", "machine") : NULL); - if (startup.reboot || dbp_game_running || (bootImgMachine && info != *(const char*)bootImgMachine->GetValue() && bootImgMachine->getChange() != Property::Changeable::Fixed)) + if (startup.reboot || dbp_game_running || (bootImgMachine && info != *(const char*)bootImgMachine->GetValue() && !bootImgMachine->IsFixed())) { startup.reboot = false; if (mode == RUN_BOOTIMG) dbp_reboot_machine = (info ? (char)info : *(const char*)bootImgMachine->GetValue()); diff --git a/include/setup.h b/include/setup.h index 8e13c18b..97192ef3 100644 --- a/include/setup.h +++ b/include/setup.h @@ -150,7 +150,8 @@ class Property { Value::Etype Get_type(){return default_value.type;} Changeable::Value getChange() {return change;} #ifdef C_DBP_LIBRETRO - void MarkFixed(){const_cast(change)=Changeable::Fixed;} + inline void MarkFixed(){const_cast(change)=Changeable::Fixed;} + inline bool IsFixed(){return change==Changeable::Fixed;} #endif protected: