graphics: option to change primary monitor before launching game (#608)

## Description of change

Adds `-mainmonitor` option which changes the monitor layout before
launching the game. This is much more reliable than the old `-monitor`
option which operated at DX9 level. This works for TDJ/UFC subscreens,
for example.

Rename `-monitor` option to `-dx9mainadapter` to discourage use.
`-monitor` will continue to work, of course.

Changing of primary monitor happens first before any orientation changes
/ refresh rate changes, which means those options will result in the
logically correct configuration.

Create a new option category for `Monitor` (rotate, refresh rate, etc).

Add a monitor selection widget for `-mainmonitor` option in the
configurator.

Improve how we log names of monitors in the log during boot - should be
less of "Generic PnP Monitor" after this.
This commit is contained in:
bicarus
2026-04-04 23:26:38 -07:00
committed by GitHub
parent a4c3eddc2f
commit ee3fa58bfa
9 changed files with 377 additions and 73 deletions
+9 -1
View File
@@ -1,10 +1,18 @@
#pragma once
#include <string>
#include <vector>
#include <cstdint>
namespace sysutils {
void print_smbios();
void print_gpus();
void print_os();
}
struct MonitorEntry {
std::string display_name; // \\.\DISPLAY1
std::wstring friendly_name; // Dell S2204T; wstring so that it can be converted to utf8 or string
};
const std::vector<MonitorEntry> &enumerate_monitors();
}