OSDN Git Service

fix: fix not start for the first time
[delesterandomselector/DelesteRandomSelector.git] / src / com / ranfa / lib / Settings.java
index 7f7f57e..7c6c37b 100644 (file)
@@ -116,12 +116,14 @@ public class Settings {
                SettingJSONProperty property = new SettingJSONProperty();
                property.setCheckVersion(true);
                property.setCheckLibraryUpdates(true);
-               property.setWindowWidth(640);
-               property.setWindowHeight(360);
+               property.setWindowWidth(960);
+               property.setWindowHeight(540);
                property.setSongLimit(3);
                property.setSaveScoreLog(false);
                ObjectWriter writer = new ObjectMapper().writer(new DefaultPrettyPrinter());
                try {
+                       if(Files.notExists(Paths.get("generated")))
+                               Files.createDirectory(Paths.get("generated"));
                        writer.writeValue(Paths.get(FILEPATH).toFile(), property);
                } catch (IOException e) {
                        logger.error("Couldn't write down setting file.", e);