Fabric API

Fabric API

106M Downloads

Disconnected screen scissoring is incorrect on high-resolution displays

haykam821 opened this issue ยท 0 comments

commented

On Windows systems, the disconnect screen has correct scissoring:

Windows disconnect screen example

However, on macOS systems with Retina displays, the disconnect screen cuts off the bottom of text:

macOS Retina disconnect screen example

The related scissoring code does not use the getFramebufferHeight and getFramebufferWidth methods, causing this issue:

double scale = client.getWindow().getScaleFactor();
RenderSystem.enableScissor(0, (int) (y * scale), (int) (width * scale), (int) (reasonHeight * scale));
instance.drawCenterWithShadow(matrixStack, x, y - scroll);
RenderSystem.disableScissor();

Relates to CottonMC/LibGui#114