Added option to disable automatic checking for updates.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -142,16 +142,18 @@ public class Opsu extends StateBasedGame {
|
|||||||
Updater.get().setUpdateInfo(args[0], args[1]);
|
Updater.get().setUpdateInfo(args[0], args[1]);
|
||||||
|
|
||||||
// check for updates
|
// check for updates
|
||||||
new Thread() {
|
if (!Options.isUpdaterDisabled()) {
|
||||||
@Override
|
new Thread() {
|
||||||
public void run() {
|
@Override
|
||||||
try {
|
public void run() {
|
||||||
Updater.get().checkForUpdates();
|
try {
|
||||||
} catch (IOException e) {
|
Updater.get().checkForUpdates();
|
||||||
Log.warn("Check for updates failed.", e);
|
} catch (IOException e) {
|
||||||
|
Log.warn("Check for updates failed.", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}.start();
|
||||||
}.start();
|
}
|
||||||
|
|
||||||
// start the game
|
// start the game
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -454,7 +454,8 @@ public class Options {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
ENABLE_THEME_SONG ("Enable Theme Song", "MenuMusic", "Whether to play the theme song upon starting opsu!", true),
|
ENABLE_THEME_SONG ("Enable Theme Song", "MenuMusic", "Whether to play the theme song upon starting opsu!", true),
|
||||||
REPLAY_SEEKING ("Replay Seeking", "ReplaySeeking", "Enable a seeking bar on the left side of the screen during replays.", false);
|
REPLAY_SEEKING ("Replay Seeking", "ReplaySeeking", "Enable a seeking bar on the left side of the screen during replays.", false),
|
||||||
|
DISABLE_UPDATER ("Disable Automatic Updates", "DisableUpdater", "Disable automatic checking for updates upon starting opsu!.", false);
|
||||||
|
|
||||||
/** Option name. */
|
/** Option name. */
|
||||||
private String name;
|
private String name;
|
||||||
@@ -965,6 +966,12 @@ public class Options {
|
|||||||
*/
|
*/
|
||||||
public static boolean isReplaySeekingEnabled() { return GameOption.REPLAY_SEEKING.getBooleanValue(); }
|
public static boolean isReplaySeekingEnabled() { return GameOption.REPLAY_SEEKING.getBooleanValue(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether or not automatic checking for updates is disabled.
|
||||||
|
* @return true if disabled
|
||||||
|
*/
|
||||||
|
public static boolean isUpdaterDisabled() { return GameOption.DISABLE_UPDATER.getBooleanValue(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the track checkpoint time, if within bounds.
|
* Sets the track checkpoint time, if within bounds.
|
||||||
* @param time the track position (in ms)
|
* @param time the track position (in ms)
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ public class OptionsMenu extends BasicGameState {
|
|||||||
GameOption.FIXED_AR,
|
GameOption.FIXED_AR,
|
||||||
GameOption.FIXED_OD,
|
GameOption.FIXED_OD,
|
||||||
GameOption.CHECKPOINT,
|
GameOption.CHECKPOINT,
|
||||||
GameOption.REPLAY_SEEKING
|
GameOption.REPLAY_SEEKING,
|
||||||
|
GameOption.DISABLE_UPDATER
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Total number of tabs. */
|
/** Total number of tabs. */
|
||||||
|
|||||||
Reference in New Issue
Block a user