Skip to content

Conversation

xpple
Copy link
Collaborator

@xpple xpple commented Mar 24, 2025

Closes #711. The unlimited framerate cutoff is now increased to the maximum of the refresh rates of all connected monitors. This allows people to set their maximum framerate to a value possibly higher than 260, without effectively setting it to unlimited.


public class FramerateCommand {

public static final IntSupplier MAX_REFRESH_RATE = () -> Minecraft.getInstance().virtualScreen.screenManager.monitors.values().stream()
Copy link
Owner

Choose a reason for hiding this comment

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

Why not make this a method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I intended to make it come across as a constant that only rarely changes.

Copy link
Owner

Choose a reason for hiding this comment

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

That's not a good reason to not use a method

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What's wrong with a supplier though?

@xpple
Copy link
Collaborator Author

xpple commented Mar 24, 2025

Closed in favour of #726.

@xpple xpple closed this Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to set maximum framerate via command

2 participants