mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 14:50:41 -07:00
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:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user