Skip to content

Commit

Permalink
Debug Config
Browse files Browse the repository at this point in the history
  • Loading branch information
kairusds committed Jan 8, 2022
1 parent a9d6908 commit b5b3c25
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ru/nsu/ccfit/zuev/osu/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ public static void loadConfig(final Context context) {
soundVolume = prefs.getInt("soundvolume", 100) / 100f;
bgmVolume = prefs.getInt("bgmvolume", 100) / 100f;
cursorSize = prefs.getInt("cursorSize", 50) / 100f;
}catch(RuntimeException e) { // migrate to integers to prevent crash
}catch(RuntimeException e) { // use valid integer since this makes the game crash on android m
prefs.edit()
.putInt("offset", Integer.parseInt(prefs.getString("offset", "0")))
.putInt("bgbrightness", Integer.parseInt(prefs.getString("bgbrightness", "25")))
.putInt("soundvolume", Integer.parseInt(prefs.getString("soundvolume", "100")))
.putInt("bgmvolume", Integer.parseInt(prefs.getString("bgmvolume", "100")))
.putInt("cursorSize", Integer.parseInt(prefs.getString("cursorSize", "50")))
.putInt("offset", 0)
.putInt("bgbrightness", 25)
.putInt("soundvolume", 100)
.putInt("bgmvolume", 100)
.putInt("cursorSize", 50)
.commit();
Config.loadConfig(context);
}
Expand Down

0 comments on commit b5b3c25

Please sign in to comment.