AppSettings settings = new AppSettings(true);
settings.setFullscreen(true);
TestMonkeyTaskBinder app = new TestMonkeyTaskBinder();
app.setSettings(settings);
app.start();
Then, the monitor resizes unexpectedly without showing up the application game and it keeps freezing in this state (even after shutting down the application process):
Note from memory: if you don’t give your app settings an app title then it will just load whatever settings you last used from your previous app settings without an app title. This can leave some weird stuff hanging around if you did one run where you set strange things from the settings dialog.
This is my typical pattern to make everything happy:
Main main = new Main();
AppSettings settings = new AppSettings(true);
// Set some defaults that will get overwritten if
// there were previously saved settings from the last time the user
// ran.
settings.setWidth(1280);
settings.setHeight(720);
settings.setVSync(true);
// Note: JME uses the title to save so these two must match.
settings.load("MyApp");
settings.setTitle("MyApp");
main.setSettings(settings);
main.start();
…and that’s with letting JME still popup the settings dialog but it will be preset with whatever was saved before.
AppSettings settings = new AppSettings(true);
settings.setTitle(TestMonkeyTaskBinder.class.getName());
settings.load(TestMonkeyTaskBinder.class.getName());
settings.setFullscreen(true);
TestMonkeyTaskBinder app = new TestMonkeyTaskBinder();
app.setSettings(settings);
app.start();
And, I am still getting the same issue.
Debugging shows the resolution for “full screen” defaults to Height x Width = 480 x 640.
The documentation says passing “true” to the AppSettings constructor will load the default settings (that should overwrite any previous cache values), so I shouldn’t be in need of manually defining which preferences to load.
Btw, another unexpected issue happens when passing “false” to the AppSettings(boolean) constructor, the “jME3 Main” thread defaults to “jME3 Headless Main” and JME runs in headless mode.
I suggest logging the AppSettings actions for debugging purposes (maybe in the next JME release) to be able to test issues easily, for example: {Which preferences have been loaded?}
EDIT:
This value is the same as the one with “fullscreen = false” (Window mode), if anyone could try to reproduce this issue, please let me know, and I will try to reproduce this issue when using the JME dialog.