Thanks for that. I asked over in the privacy/security section of the forums and the verdict seems to be that these types of properties don't get inherited because that's not how it works. However I was given the suggestion to possibly change the Java executable's Info.plist instead, although trying this didn't seem to successfully get Game Mode to activate (tested on macOS 15.5 (24F74)), unfortunately. (Is that expected behavior?)
So looks like this won't work, as you thought.
Though it is strange that Game Mode does work with apps like the Minecraft official launcher which use this architecture, which seems to imply there is some way this is done. I can't find a code-level way to implement this, but I do see that:
If the "launcher" app is opened from Steam and then the launcher app opens the Java game, then fullscreening the Java game does activate Game Mode. So seems like children of Steam have some kind of special handling, though I'm not sure if that's the doing of Steam or the OS.
If you change an app's bundle ID to that of the Minecraft launcher (com.mojang.minecraftlauncher) it also causes Game Mode to enable when the Java window is fullscreened. Since the code in a sample app I'm using to test this doesn't change, only the bundle identifier, it seems like this is done at the OS level. Although obviously pretending to be the official Minecraft launcher is not a possible solution in the real app.
It seems like the system has special handling for at least the second case somehow since the behavior only changes based on the bundle identifier of the app. Is this type of behavior (inheriting the Game Mode support for the child process) accessible to other developers?
Topic:
Graphics & Games
SubTopic:
General
Tags: