Fix Render GUI on Retina Screens (fixes #338)

window.getFramebufferWidth/Height() should be used instead of window.getWidth/Height()

Co-authored-by: Jonas Herzig <me@johni0702.de>
This commit is contained in:
Andrew S
2021-12-25 20:01:48 -05:00
committed by Jonas Herzig
parent e378ae8f93
commit 7e9a1e7c13
4 changed files with 50 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ package com.replaymod.render.mixin;
import net.minecraft.client.util.Window;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.gen.Invoker;
@Mixin(Window.class)
public interface MainWindowAccessor {
@@ -14,4 +15,12 @@ public interface MainWindowAccessor {
int getFramebufferHeight();
@Accessor
void setFramebufferHeight(int value);
// FIXME preprocessor should be able to infer this mapping
// FIXME preprocessor should be able to remap this one when the mapping is given manually
//#if MC>=11500
@Invoker
//#else
//$$ @Invoker("method_4483")
//#endif
void invokeUpdateFramebufferSize();
}