-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mixin conflict with Sodium 0.5 (Fixes #31)
- Loading branch information
Showing
4 changed files
with
35 additions
and
21 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
common/src/main/java/cn/zbx1425/mtrsteamloco/mixin/GLFWMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cn.zbx1425.mtrsteamloco.mixin; | ||
|
||
import cn.zbx1425.sowcer.ContextCapability; | ||
import com.mojang.blaze3d.platform.Window; | ||
import org.lwjgl.glfw.GLFW; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(GLFW.class) | ||
public class GLFWMixin { | ||
|
||
// Promote to a higher OpenGL version, as glVertexAttribDivisor is only available in OpenGL 3.3+ | ||
|
||
@Inject(method = "glfwCreateWindow(IILjava/lang/CharSequence;JJ)J", at = @At("HEAD"), cancellable = true, remap = false) | ||
private static void glfwCreateWindow(int width, int height, CharSequence title, long monitor, long share, CallbackInfoReturnable<Long> cir) { | ||
cir.setReturnValue(ContextCapability.createWindow(width, height, title, monitor, share)); | ||
} | ||
|
||
} |
19 changes: 0 additions & 19 deletions
19
common/src/main/java/cn/zbx1425/mtrsteamloco/mixin/WindowMixin.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters