mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-21 20:18:14 +07:00
Added V-Sync Cvar toggle
This commit is contained in:
parent
70c5a5ecb5
commit
1bbfd0b02e
@ -503,6 +503,13 @@ public class Client extends Game {
|
||||
}
|
||||
});
|
||||
|
||||
Cvars.Client.Display.VSync.addStateListener(new CvarStateAdapter<Boolean>() {
|
||||
@Override
|
||||
public void onChanged(Cvar<Boolean> cvar, Boolean from, Boolean to) {
|
||||
Gdx.graphics.setVSync(to);
|
||||
}
|
||||
});
|
||||
|
||||
Cvars.Client.Realm.addStateListener(new CvarStateAdapter<String>() {
|
||||
@Override
|
||||
public void onChanged(Cvar<String> cvar, String from, String to) {
|
||||
|
@ -167,6 +167,14 @@ public class Cvars {
|
||||
.defaultValue(1.0f)
|
||||
.validator(NumberRangeValidator.of(Float.class, 0.5f, 4.0f))
|
||||
.build();
|
||||
|
||||
Cvar<Boolean> VSync = Cvar.builder(Boolean.class)
|
||||
.alias("Client.Display.VSync")
|
||||
.description(
|
||||
"Whether or not wait for vertical refresh is enabled.")
|
||||
.defaultValue(Boolean.FALSE)
|
||||
.validator(Validator.ACCEPT_NON_NULL)
|
||||
.build();
|
||||
}
|
||||
|
||||
interface Input {
|
||||
|
Loading…
Reference in New Issue
Block a user