File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
common/src/main/java/org/embeddedt/modernfix/common/mixin/perf/blast_search_trees Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 77import org .embeddedt .modernfix .annotation .ClientOnlyMixin ;
88import org .embeddedt .modernfix .searchtree .DummySearchTree ;
99import org .embeddedt .modernfix .searchtree .SearchTreeProviderRegistry ;
10+ import org .lwjgl .glfw .GLFW ;
11+ import org .lwjgl .glfw .GLFWErrorCallback ;
1012import org .spongepowered .asm .mixin .Final ;
1113import org .spongepowered .asm .mixin .Mixin ;
1214import org .spongepowered .asm .mixin .Shadow ;
@@ -30,9 +32,12 @@ private void replaceSearchTrees(CallbackInfo ci) {
3032 this .searchRegistry .register (SearchRegistry .RECIPE_COLLECTIONS , new DummySearchTree <>());
3133 // grab components for all key mappings in order to prevent them from being loaded off-thread later
3234 // this populates the LazyLoadedValues
35+ // we also need to suppress GLFW errors to prevent crashes if a key is missing
36+ GLFWErrorCallback oldCb = GLFW .glfwSetErrorCallback (null );
3337 for (KeyMapping mapping : KeyMapping .ALL .values ()) {
3438 mapping .getTranslatedKeyMessage ();
3539 }
40+ GLFW .glfwSetErrorCallback (oldCb );
3641 ci .cancel ();
3742 }
3843}
You can’t perform that action at this time.
0 commit comments