Skip to content

Commit

Permalink
fixes #548 (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsloley authored Apr 28, 2024
1 parent fdcd441 commit dd48ea4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/java/net/coderbot/iris/Iris.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ public class Iris {
private static PipelineManager pipelineManager;
private static IrisConfig irisConfig;
private static FileSystem zipFileSystem;
private static final KeyMapping reloadKeybind = new KeyMapping("iris.keybind.reload", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_R, "iris.keybinds");
private static final KeyMapping toggleShadersKeybind = new KeyMapping("iris.keybind.toggleShaders", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_K, "iris.keybinds");
private static final KeyMapping shaderpackScreenKeybind = new KeyMapping("iris.keybind.shaderPackSelection", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_O, "iris.keybinds");
private static final KeyMapping wireframeKeybind = new KeyMapping("iris.keybind.wireframe", InputConstants.Type.KEYSYM, InputConstants.UNKNOWN.getValue(), "iris.keybinds");

private static KeyMapping reloadKeybind;
private static KeyMapping toggleShadersKeybind;
private static KeyMapping shaderpackScreenKeybind;
private static KeyMapping wireframeKeybind;

private static final Map<String, String> shaderPackOptionQueue = new HashMap<>();
// Flag variable used when reloading
Expand Down Expand Up @@ -132,6 +133,11 @@ public Iris() {
* <p>This is called right before options are loaded, so we can add key bindings here.</p>
*/
public static void onEarlyInitialize() {
reloadKeybind = new KeyMapping("iris.keybind.reload", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_R, "iris.keybinds");
toggleShadersKeybind = new KeyMapping("iris.keybind.toggleShaders", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_K, "iris.keybinds");
shaderpackScreenKeybind = new KeyMapping("iris.keybind.shaderPackSelection", InputConstants.Type.KEYSYM, GLFW.GLFW_KEY_O, "iris.keybinds");
wireframeKeybind = new KeyMapping("iris.keybind.wireframe", InputConstants.Type.KEYSYM, InputConstants.UNKNOWN.getValue(), "iris.keybinds");

try {
if (!Files.exists(getShaderpacksDirectory())) {
Files.createDirectories(getShaderpacksDirectory());
Expand Down

0 comments on commit dd48ea4

Please sign in to comment.