calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
173 stars 42 forks source link

On Mac, preferences from replays seem to be applied persistently #456

Open NQNStudios opened 1 week ago

NQNStudios commented 1 week ago

I think I saw this happen, didn't confirm it, and forgot to write it down.

If it is the case, it'll be pretty annoying and worth fixing. We don't want replays to clobber our preferred settings.

It would make sense if Mac is doing it and Windows/Linux aren't, because Mac handles preferences differently.

NQNStudios commented 1 week ago

I confirmed it, but going back over the code I don't see how it's happening.

CelticMinstrel commented 1 week ago

I think the Cocoa preferences system syncs preferences in the background or something. Maybe replays shouldn't touch anything related to NSUserDefaults? I'm not really sure of that though. Looking at the current prefs code, it does clearly look like they shouldn't get saved. Maybe an NSUserDefaults automatically syncs when initialized? I'm just speculating here.