aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 0bbb400..f236dc8 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -1,6 +1,7 @@
#include <config.hpp>
#include <ui.hpp>
+#include <fileio.hpp>
#include <SDL2/SDL_mixer.h>
@@ -26,6 +27,9 @@ namespace game {
std::string fontFamily;
void read(void) {
+ if (!fileExists("config/settings.xml"))
+ copyFile("config/settings.xml", "config/settings.xml.example");
+
xml.LoadFile("config/settings.xml");
auto exml = xml.FirstChildElement("screen");