feat(display)!: Add libdisplaydevice dependency and output name mapping (#2894)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <chrono>
|
||||
#include <mach/mach.h>
|
||||
|
||||
#include "src/display_device.h"
|
||||
#include "src/logging.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/utility.h"
|
||||
@@ -541,7 +542,7 @@ const KeyCodeMap kKeyCodesMap[] = {
|
||||
// Default to main display
|
||||
macos_input->display = CGMainDisplayID();
|
||||
|
||||
auto output_name = config::video.output_name;
|
||||
auto output_name = display_device::map_output_name(config::video.output_name);
|
||||
// If output_name is set, try to find the display with that display id
|
||||
if (!output_name.empty()) {
|
||||
uint32_t max_display = 32;
|
||||
|
||||
@@ -16,6 +16,7 @@ typedef long NTSTATUS;
|
||||
#include "display.h"
|
||||
#include "misc.h"
|
||||
#include "src/config.h"
|
||||
#include "src/display_device.h"
|
||||
#include "src/logging.h"
|
||||
#include "src/platform/common.h"
|
||||
#include "src/video.h"
|
||||
@@ -1101,7 +1102,8 @@ namespace platf {
|
||||
BOOST_LOG(debug) << "Detecting monitors..."sv;
|
||||
|
||||
// We must set the GPU preference before calling any DXGI APIs!
|
||||
if (!dxgi::probe_for_gpu_preference(config::video.output_name)) {
|
||||
const auto output_name { display_device::map_output_name(config::video.output_name) };
|
||||
if (!dxgi::probe_for_gpu_preference(output_name)) {
|
||||
BOOST_LOG(warning) << "Failed to set GPU preference. Capture may not work!"sv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user