Proper write protection settings

This commit is contained in:
dingusdev 2022-02-27 22:41:59 -07:00
parent 827d7f10dd
commit 8d3427c475
2 changed files with 6 additions and 5 deletions

View File

@ -67,6 +67,8 @@ static const map<uint32_t, std::tuple<string, const char*>> rom_identity = {
{0x5A616E7A, {"pm4400", "Power Mac 4400/7220"}}, // Zanzibar
};
static const vector<string> WriteToggle = {"ON", "on", "OFF", "off"};
static const PropMap GossamerSettings = {
{"rambank1_size",
new IntProperty(256, vector<uint32_t>({8, 16, 32, 64, 128, 256}))},
@ -80,8 +82,7 @@ static const PropMap GossamerSettings = {
new StrProperty("")},
{"fdd_img",
new StrProperty("")},
{"fdd_wr_prot",
new StrProperty("")},
{"fdd_wr_prot", new StrProperty("OFF", WriteToggle)},
};
/** Monitors supported by the PDM on-board video. */
@ -102,7 +103,7 @@ static const PropMap PDMSettings = {
{"fdd_img",
new StrProperty("")},
{"fdd_wr_prot",
new StrProperty("")},
new StrProperty("OFF", WriteToggle)},
};
static const map<string, string> PropHelp = {

View File

@ -109,7 +109,7 @@ int create_pdm(std::string& id) {
bool write_flag = false;
if (!fd_write_prot.empty()) {
if (fd_write_prot.compare("on") == 0) {
if ((fd_write_prot.compare("ON") == 0) or (fd_write_prot.compare("on") == 0)) {
write_flag = true;
}
}