Skip to content

Commit

Permalink
fix fps limit still being on in vr
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Sep 30, 2023
1 parent c4335d9 commit 2ec3827
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.vivecraft.client_vr.VRState;

import static com.mojang.blaze3d.systems.RenderSystem.blendFuncSeparate;

Expand All @@ -18,4 +19,11 @@ public class RenderSystemVRMixin {
blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
ci.cancel();
}

@Inject(at = @At("HEAD"), method = "limitDisplayFPS", cancellable = true, remap = false)
private static void vivecraft$noFPSlimit(CallbackInfo ci) {
if (VRState.vrRunning) {
ci.cancel();
}
}
}

0 comments on commit 2ec3827

Please sign in to comment.