exch-bms2 / beatoraja

Cross-platform rhythm game based on Java and libGDX.
GNU General Public License v3.0
655 stars 148 forks source link

Support second monitor + larger resolutions #528

Open wcko87 opened 4 years ago

wcko87 commented 4 years ago

This may be related to issue #49

Some people use 2 monitors with different screen resolutions. But there are 2 issues:

Issue A. beatoraja takes resolution information from the first monitor, which may be small.

So if the first monitor is 1366x768, but the second monitor is 1920x1080, it is not possible to run beatoraja at 1920x1080.

I think there are 2 solutions for this:

  1. Detect all monitors for resolution settings OR
  2. Allow all resolution settings, independent of detected monitor. (or allow custom resolutions like #49)

I think solution 2 is better.

Issue B. There is no option to select which monitor to use for full screen mode.

So beatoraja will always run full screen on the first (smaller) monitor.

SackMagiclight commented 4 years ago

beatoraja is implemented using libGDX (backend: LWJGL2).

LWJGL2 does not support multiple monitors. LWJGL3 can be used as a backend, but it is in development and unstable. (Also, backend changes make a big change to the program.)

  1. Allow all resolution settings, independent of detected monitor. (or allow custom resolutions like #49)

solution 2 is better.

Yeah. I think so, too. I think that's the only way to do it.

asesidaa commented 3 years ago

Now that LWJGL3 has become the default for libgdx and LWJGL2 has become legacy, I think it's time to migrate to LWJGL3. I have experimented a little bit, and there are not much to change.

Aside from change the configuration and application type and some setter usage, the only real change is that in the main controller we need to change the Mouse.setGrabbed to some glfw alternative. You can check my experiment result in my fork.

Pr0pHesyer commented 7 months ago

Same issue. Beatoraja always play in the main monitor set in Windows 11 setting.I need it play in hte 2nd monitor.