AndreaOrru / LaiNES

Cycle-accurate NES emulator in ~1000 lines of code
BSD 2-Clause "Simplified" License
1.49k stars 115 forks source link

Add Configuration Saving/Loading #25

Closed kraln closed 7 years ago

kraln commented 7 years ago

Addresses #23.

LaiNES now can save and load configuration. At the moment, it's the size of the window, and the key bindings.

Saving and loading is done to a file in the same folder as LaiNES.

This commit adds SimpleINI as a git submodule.

AndreaOrru commented 7 years ago

This looks really good, thanks.

Just one thing - usually Unix applications put their configurations in ~/.config, any reason not to?

kraln commented 7 years ago

No reason. http://unix.stackexchange.com/questions/68721/where-should-user-configuration-files-go seems to indicate creating a sub-folder in ~/.config (if ~/.config exists)

kraln commented 7 years ago

Updated, support *nix home directories and pulled the config stuff out of the GUI

kraln commented 7 years ago

My one concern is that this is very 'c' and not so much c++. I think that's okay for now but it will need to be refactored to a proper class and clean c++ when it grows larger

kraln commented 7 years ago

(rebased + squished)

AndreaOrru commented 7 years ago

Merged. Awesome!