fixed FXAA crash on other browsers, added exit chat button, fixed arrow key mappings
This commit is contained in:
parent
6d1bfd9e3e
commit
403987807e
File diff suppressed because it is too large
Load Diff
|
@ -26,8 +26,10 @@ public class EffectPipelineFXAA {
|
|||
private static BufferArrayGL renderQuadArray = null;
|
||||
private static BufferGL renderQuadBuffer;
|
||||
|
||||
private static int width = -1;
|
||||
private static int height = -1;
|
||||
public static int displayWidth = -1;
|
||||
public static int displayHeight = -1;
|
||||
public static int width = -1;
|
||||
public static int height = -1;
|
||||
|
||||
private static int[] originalViewport = new int[4];
|
||||
|
||||
|
@ -142,6 +144,9 @@ public class EffectPipelineFXAA {
|
|||
}
|
||||
|
||||
public static void beginPipelineRender() {
|
||||
if(width == -1 || displayWidth == -1 || height == -1 || displayHeight == -1) {
|
||||
return;
|
||||
}
|
||||
int mode = Minecraft.getMinecraft().gameSettings.antialiasMode;
|
||||
if(mode == 0) newState = 0;
|
||||
if(mode == 1) newState = Minecraft.getMinecraft().gameSettings.fancyGraphics ? 1 : 0;
|
||||
|
@ -153,14 +158,12 @@ public class EffectPipelineFXAA {
|
|||
if(state == 0) {
|
||||
destroy();
|
||||
}
|
||||
width = -1;
|
||||
height = -1;
|
||||
}
|
||||
if(state == 0) return;
|
||||
_wglGetParameter(_wGL_VIEWPORT, 4, originalViewport);
|
||||
if (width != originalViewport[2] || height != originalViewport[3]) {
|
||||
width = originalViewport[2];
|
||||
height = originalViewport[3];
|
||||
//_wglGetParameter(_wGL_VIEWPORT, 4, originalViewport);
|
||||
if (displayWidth != width || displayHeight != height) {
|
||||
width = displayWidth;
|
||||
height = displayHeight;
|
||||
if(state == 1) {
|
||||
if(isUsingFXAA == false || fxaaProgram == null) {
|
||||
initFXAA();
|
||||
|
@ -190,6 +193,9 @@ public class EffectPipelineFXAA {
|
|||
}
|
||||
|
||||
public static void endPipelineRender() {
|
||||
if(width == -1 || displayWidth == -1 || height == -1 || displayHeight == -1) {
|
||||
return;
|
||||
}
|
||||
if(state == 0) return;
|
||||
_wglBindFramebuffer(_wGL_FRAMEBUFFER, null);
|
||||
_wglClear(_wGL_COLOR_BUFFER_BIT | _wGL_DEPTH_BUFFER_BIT);
|
||||
|
|
|
@ -919,6 +919,8 @@ public class EntityRenderer {
|
|||
}
|
||||
|
||||
EaglerAdapter.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
|
||||
EffectPipelineFXAA.displayWidth = this.mc.displayWidth;
|
||||
EffectPipelineFXAA.displayHeight = this.mc.displayHeight;
|
||||
EffectPipelineFXAA.beginPipelineRender();
|
||||
this.mc.mcProfiler.endStartSection("clear");
|
||||
EaglerAdapter.glClear(EaglerAdapter.GL_COLOR_BUFFER_BIT | EaglerAdapter.GL_DEPTH_BUFFER_BIT);
|
||||
|
|
|
@ -43,6 +43,7 @@ public class GuiChat extends GuiScreen {
|
|||
*/
|
||||
public void initGui() {
|
||||
EaglerAdapter.enableRepeatEvents(true);
|
||||
this.buttonList.add(new GuiButton(69, this.width - 100, 3, 97, 20, "Exit Chat"));
|
||||
this.sentHistoryCursor = this.mc.ingameGUI.getChatGUI().getSentMessages().size();
|
||||
this.inputField = new GuiTextField(this.fontRenderer, 4, this.height - 12, this.width - 4, 12);
|
||||
this.inputField.setMaxStringLength(100);
|
||||
|
@ -51,6 +52,12 @@ public class GuiChat extends GuiScreen {
|
|||
this.inputField.setText(this.defaultInputFieldText);
|
||||
this.inputField.setCanLoseFocus(false);
|
||||
}
|
||||
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if (par1GuiButton.id == 69) {
|
||||
this.mc.displayGuiScreen(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the screen is unloaded. Used to disable keyboard repeat events
|
||||
|
|
|
@ -20,6 +20,10 @@ public class MouseHelper {
|
|||
* Grabs the mouse cursor it doesn't move and isn't seen.
|
||||
*/
|
||||
public void grabMouseCursor() {
|
||||
int var1 = Minecraft.getMinecraft().displayWidth;
|
||||
int var2 = Minecraft.getMinecraft().displayHeight;
|
||||
|
||||
EaglerAdapter.mouseSetCursorPosition(var1 / 2, var2 / 2);
|
||||
EaglerAdapter.mouseSetGrabbed(true);
|
||||
this.deltaX = 0;
|
||||
this.deltaY = 0;
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user