Fixed compilation errors in macOS. I still need to think about the Settings stuff, though.

This commit is contained in:
Stephen Anthony 2019-02-23 16:02:13 -03:30
parent 814977e968
commit 032b08cca1
3 changed files with 7 additions and 8 deletions

View File

@ -716,7 +716,7 @@ void EventHandler::setActionMappings(EventMode mode)
#ifndef BSPF_MACOS
modifier = "Ctrl";
#else
modfier = "Cmd";
modifier = "Cmd";
#endif
if(event == Event::Quit)

View File

@ -1154,7 +1154,7 @@ int Thumbulator::execute()
case 0xA: //b ge N == V
DO_DISS(statusMsg << "bge 0x" << Base::HEX8 << (rb-3) << endl);
if(((cpsr & CPSR_N) && (cpsr & CPSR_V)) ||
(!(cpsr & CPSR_N)) && (!(cpsr & CPSR_V)))
((!(cpsr & CPSR_N)) && (!(cpsr & CPSR_V))))
write_register(15, rb);
return 0;
@ -1170,7 +1170,7 @@ int Thumbulator::execute()
if(!(cpsr & CPSR_Z))
{
if(((cpsr & CPSR_N) && (cpsr & CPSR_V)) ||
(!(cpsr & CPSR_N)) && (!(cpsr & CPSR_V)))
((!(cpsr & CPSR_N)) && (!(cpsr & CPSR_V))))
write_register(15, rb);
}
return 0;

View File

@ -36,12 +36,11 @@ bool SettingsMACOS::loadConfigFile(const string&)
char cvalue[4096];
// Read key/value pairs from the plist file
const SettingsArray& settings = getInternalSettings();
for(uInt32 i = 0; i < settings.size(); ++i)
for(const auto& s: getInternalSettings())
{
prefsGetString(settings[i].key.c_str(), cvalue, 4090);
prefsGetString(s.first.c_str(), cvalue, 4090);
if(cvalue[0] != 0)
setInternal(settings[i].key, cvalue, i, true);
setValue(s.first, cvalue);
}
return true;
}
@ -51,7 +50,7 @@ bool SettingsMACOS::saveConfigFile(const string&) const
{
// Write out each of the key and value pairs
for(const auto& s: getInternalSettings())
prefsSetString(s.key.c_str(), s.value.toCString());
prefsSetString(s.first.c_str(), s.second.toCString());
prefsSave();