Skip to content

Conversation

@eigenraven
Copy link
Member

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.

@eigenraven eigenraven self-assigned this Jan 5, 2026
@eigenraven
Copy link
Member Author

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

#1546

Co-authored-by: GitHub GTNH Actions <>
@Dream-Master Dream-Master added the 🚧 Testing on Zeta Do not merge yet, testing this PR on Zeta label Jan 5, 2026
Copy link
Member

@wlhlm wlhlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to break when switching to a locale with non-ASCII text, for example zh_CN:
Screenshot 2026-01-07 123814

@Nikolay-Sitnikov
Copy link
Contributor

SDL supports UTF-8 natively, you should just have to switch the encoding from ASCII.

@Dream-Master Dream-Master requested a review from wlhlm January 11, 2026 11:02
wlhlm
wlhlm previously requested changes Jan 11, 2026
@github-actions

This comment was marked as outdated.

@wlhlm
Copy link
Member

wlhlm commented Jan 12, 2026

Screenshot 2026-01-12 224130

🎉

Looks good now from my POV. I'll let someone with access to a mac give final approval (I've asked @danyadev).

@wlhlm wlhlm requested a review from danyadev January 12, 2026 22:02
@wlhlm wlhlm dismissed their stale review January 12, 2026 22:12

deferring to tester with access to macos

@danyadev
Copy link
Member

danyadev commented Jan 13, 2026

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

Window list Screen
image image

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;
Copy link
Contributor

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?

Copy link
Member

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());
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 Testing on Zeta Do not merge yet, testing this PR on Zeta

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants