I have come across an issue when it comes to loading up a user-friendly setting for a game.
What I am trying to do:
I am trying to load the name of all the monitors in a distinguishable manner.
What I have tried:
wmic:
C:\Users\Matt>wmic
wmic:root\cli>DESKTOPMONITOR
Availability Bandwidth Caption ConfigManagerErrorCode ConfigManagerUserConfig CreationClassName Description DeviceID DisplayType ErrorCleared ErrorDescription InstallDate IsLocked LastErrorCode MonitorManufacturer MonitorType Name PixelsPerXLogicalInch PixelsPerYLogicalInch PNPDeviceID PowerManagementCapabilities PowerManagementSupported ScreenHeight ScreenWidth Status StatusInfo SystemCreationClassName SystemName
8 Generic PnP Monitor 0 FALSE Win32_DesktopMonitor Generic PnP Monitor DesktopMonitor1 (Standard monitor types) Generic PnP Monitor Generic PnP Monitor 96 96 DISPLAY\LGD02DA\4&265EFD6&0&UID67568640 OK Win32_ComputerSystem ALIENWARE
3 Generic PnP Monitor 0 FALSE Win32_DesktopMonitor Generic PnP Monitor DesktopMonitor2 (Standard monitor types) Generic PnP Monitor Generic PnP Monitor 96 96 DISPLAY\SAM08D6\5&14F3DA9&0&UID1078064 1080 1920 OK Win32_ComputerSystem ALIENWARE
wmic:root\cli>DESKTOP
BorderWidth Caption CoolSwitch CursorBlinkRate Description DragFullWindows GridGranularity IconSpacing IconTitleFaceName IconTitleSize IconTitleWrap Name Pattern ScreenSaverActive ScreenSaverExecutable ScreenSaverSecure ScreenSaverTimeout SettingID Wallpaper WallpaperStretched WallpaperTiled
1 500 TRUE Segoe UI 9 TRUE NT AUTHORITY\SYSTEM (None) FALSE FALSE
1 530 TRUE 43 Segoe UI 9 TRUE Alienware\Matt 0 FALSE 0 C:\Users\Matt\Pictures\Wall Papers\daftpunk3.png TRUE FALSE
1 500 TRUE Segoe UI 9 TRUE .DEFAULT (None) FALSE FALSE
GraphicsEnvironment(Java code):
final GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment();
for (GraphicsDevice device : environment.getScreenDevices()) {
System.out.println(device);
System.out.println("\t" + device.getIDstring());
System.out.println("\t" + device.getType());
}
Output:
D3DGraphicsDevice[screen=0]
\Display0
0
null
D3DGraphicsDevice[screen=1]
\Display1
0
null
D3DGraphicsDevice[screen=2]
\Display2
0
null
What I am expecting:
Screen[0]: S23C350
Screen[1]: Mobile PC Display
Screen[2]: S23B350
I have 3 monitors. Each one of these names are the names taken from the "Screen Resolution" control panel.
Additional:
Another thing I am trying to achieve with this is being able to tell the orientation of the screen. From what I've seen: it can be either Landscape, Portrait, Landscape (flipped) or Portrait (flipped). I would then only like to run the game on Landscape - flipped or not.
Being able to distinguish between the two main types would be the next step for me.
Thank you for taking the time to read this, I apologize if there is anything unclear about this question in advance.
I am prepared to use registry access and possible dll implementation, so I have decided to tag those in case it comes to that.