-
Notifications
You must be signed in to change notification settings - Fork 203
Fix lwjgl3ify 3.0 compatibility in the exit confirmation code #1545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I've tested this locally both in a java 25 and java 8 run to make sure nothing from lwjgl3 tries to classload in lwjgl2 |
wlhlm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
SDL supports UTF-8 natively, you should just have to switch the encoding from ASCII. |
Co-authored-by: Wilhelm Schuster <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
🎉 Looks good now from my POV. I'll let someone with access to a mac give final approval (I've asked @danyadev). |
|
Can't check in dev env with Java 25 in both master and this branch because the window doesn't show up (here's a thread dump), so I'm using Java 17. The fix works, but it has a quirk: when the box is shown, the window is not in the window list anymore, though it's still accessible from the Dock
Also it has a folder icon instead of GTNH's Not related to this PR, but I noticed that this feature prevents minecraft from closing even when it's still loading, but the confirmation only appears after loading. Maybe it'll be better to close the game immediately if we're on the splash screen. Another thought: when the game crashes during the splash screen, it also doesn't close, maybe it's a related problem? Additionally tested in daily 322 with Java 25, works the same way |
| } | ||
| this.dreamcraft$waitingDialogQuit = false; | ||
|
|
||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a ci.cancel(); call before the other return, is that not necessary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code is inside the new Thread(() -> ...) so ci.cancel(); will still be called
| "Are you sure you want to exit the game?"); | ||
|
|
||
| box.flags(SDL_MESSAGEBOX_WARNING); | ||
| box.window(Display.getWindow()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing this line fixes my problem with MC window being missing in Mission Control




Uses SDL message box code instead of Swing then lwjgl3ify 3+ is loaded into the game, this avoids a macOS crash on exit and prevents Swing from loading unnecessarily.