Fix macOS rendering issues#393
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to resolve macOS-specific rendering failures (black/unrendered window) by adjusting the desktop renderer backend selection and simplifying how the macOS renderer subprocess is launched.
Changes:
- Add
jme3-lwjglto the Gradle version catalog. - Select
jme3-lwjglon macOS andjme3-lwjgl3on other platforms in desktop dependencies. - Remove
-XstartOnFirstThreadfrom the macOS renderer subprocess command.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
gradle/libs.versions.toml |
Adds a version-catalog entry for the LWJGL2-based jME backend (jme3-lwjgl). |
app/build.gradle.kts |
Chooses LWJGL2 vs LWJGL3 backend based on OS during dependency resolution. |
app/src/desktopMain/kotlin/org/wysko/midis2jam2/domain/ApplicationService.desktop.kt |
Updates the renderer subprocess command-line arguments used on macOS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| val os = System.getProperty("os.name").lowercase() | ||
| if (os.contains("mac")) { | ||
| implementation(libs.jme3.lwjgl) | ||
| } else { | ||
| implementation(libs.jme3.lwjgl3) | ||
| } |
There was a problem hiding this comment.
This uses System.getProperty("os.name") during configuration to choose dependencies. With org.gradle.configuration-cache=true, reading system properties directly in build scripts can make the configuration cache non-reusable or trigger configuration-cache warnings. Prefer Gradle's Provider API (e.g., providers.systemProperty("os.name")) or an OS-detection helper that is configuration-cache friendly, then base the dependency selection on that value.
Resolves #358, #391