Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/itdelatrisu/opsu/options/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ public Object[] getItemList() {
if (itemList == null) {
itemList = new String[targetFPS.length];
for (int i = 0; i < targetFPS.length; i++)
itemList[i] = String.format((targetFPS[i] == 60) ? "%dfps (vsync)" : "%dfps", targetFPS[i]);
itemList[i] = String.format((targetFPS[i] == -1) ? "Unlimited" :
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same as above)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, what?

The shortcut function to "Unlimited" has already been removed. Removing this would result in the option "Unlimited" being not displayed on the option's dropdown list, but available via modifying the configuration file's FrameSync parameter to -1.

(targetFPS[i] == 60) ? "%dfps (vsync)" : "%dfps", targetFPS[i]);
}
return itemList;
}
Expand Down Expand Up @@ -954,7 +955,7 @@ public boolean hasFullscreenDisplayMode() {
private static Skin skin;

/** Frame limiters. */
private static final int[] targetFPS = { 60, 120, 240 };
private static final int[] targetFPS = { 60, 120, 240, -1 };

/** Index in targetFPS[] array. */
private static int targetFPSindex = 0;
Expand Down Expand Up @@ -985,7 +986,7 @@ private Options() {}
* @param container the game container
*/
public static void setNextFPS(GameContainer container) {
int index = (targetFPSindex + 1) % targetFPS.length;
int index = (targetFPSindex + 1) % (targetFPS.length - 1); // Skip "Unlimited" option
GameOption.TARGET_FPS.selectItem(index, container);
UI.getNotificationManager().sendBarNotification(String.format("Frame limiter: %s", GameOption.TARGET_FPS.getValueString()));
}
Expand Down