Reputation: 43
It actually only runs on one screen. But to my annoyance the other screen turns black, I would like to have it unaffected so that I can see stuff on it during development.
NOTE: My application is based on the libGDX framework.
DesktopLauncher
public static void main (String[] arg)
{
// Build Texture Atlases
if (rebuildAtlas) {
Settings settings = new Settings();
settings.maxWidth = 1024;
settings.maxHeight = 1024;
settings.combineSubdirectories = true;
// Pack images in "textures" folder
TexturePacker.process("assets/textures", "assets/atlas", "textures.atlas");
}
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = "LoA";
cfg.useGL30 = false;
cfg.width = Cn.RESOLUTION_WIDTH;
cfg.height = Cn.RESOLUTION_HEIGHT;
cfg.fullscreen = true;
new LwjglApplication(new LoA(), cfg);
}
Upvotes: 0
Views: 57
Reputation: 159086
Don't use fullscreen = true
.
Fullscreen means that the normal desktop is replaced by a new separate desktop dedicated to the program, and the desktop covers all screens.
You need to run in Windowed mode, with a window that is maximized to one screen, so the other screen still shows the original desktop.
Lots of games have the Fullscreen vs Windowed mode option, in case you want to see it in effect.
Upvotes: 2