From be690b9689970d4777ee2bc3a1525f2afe36c474 Mon Sep 17 00:00:00 2001 From: Duilio Protti Date: Sat, 25 Jun 2016 01:09:30 -0300 Subject: [PATCH] Save width & height between runs --- src/main.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 3a5fbf3..cfc1880 100644 --- a/src/main.cc +++ b/src/main.cc @@ -72,6 +72,7 @@ public: private: void load_settings (); + void save_settings(); }; EXPORT InfinityPlugin aud_plugin_instance; @@ -104,7 +105,7 @@ void InfinityPlugin::clear () void InfinityPlugin::cleanup(void) { g_message("Infinity: cleanup()"); - config_save_prefs(); + save_settings(); renderer_finish(); } @@ -136,3 +137,9 @@ void InfinityPlugin::load_settings(void) config_set_fps(aud_get_int(CFGID, "max_fps")); config_set_show_title(aud_get_bool(CFGID, "show_title")); } + +void InfinityPlugin::save_settings(void) +{ + aud_set_int(CFGID, "width", config_get_xres()); + aud_set_int(CFGID, "height", config_get_yres()); +}