diff --git a/.gitmodules b/.gitmodules
index 95b89898..7ddc35c3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -22,6 +22,10 @@
path = third-party/inputtino
url = https://github.com/games-on-whales/inputtino.git
branch = stable
+[submodule "third-party/libdisplaydevice"]
+ path = third-party/libdisplaydevice
+ url = https://github.com/LizardByte/libdisplaydevice.git
+ branch = master
[submodule "third-party/nanors"]
path = third-party/nanors
url = https://github.com/sleepybishop/nanors.git
diff --git a/cmake/compile_definitions/common.cmake b/cmake/compile_definitions/common.cmake
index 02ec7224..0c576426 100644
--- a/cmake/compile_definitions/common.cmake
+++ b/cmake/compile_definitions/common.cmake
@@ -68,6 +68,8 @@ set(SUNSHINE_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/uuid.h"
"${CMAKE_SOURCE_DIR}/src/config.h"
"${CMAKE_SOURCE_DIR}/src/config.cpp"
+ "${CMAKE_SOURCE_DIR}/src/display_device.h"
+ "${CMAKE_SOURCE_DIR}/src/display_device.cpp"
"${CMAKE_SOURCE_DIR}/src/entry_handler.cpp"
"${CMAKE_SOURCE_DIR}/src/entry_handler.h"
"${CMAKE_SOURCE_DIR}/src/file_handler.cpp"
@@ -146,6 +148,7 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
${MINIUPNP_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
enet
+ libdisplaydevice::display_device
opus
${FFMPEG_LIBRARIES}
${Boost_LIBRARIES}
diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake
index 5a98a5fd..b6ca8447 100644
--- a/cmake/dependencies/common.cmake
+++ b/cmake/dependencies/common.cmake
@@ -12,6 +12,9 @@ add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet")
# web server
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/Simple-Web-Server")
+# libdisplaydevice
+add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/libdisplaydevice")
+
# common dependencies
find_package(OpenSSL REQUIRED)
find_package(PkgConfig REQUIRED)
diff --git a/docs/configuration.md b/docs/configuration.md
index d4e33540..659e3d29 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -865,10 +865,56 @@ editing the `conf` file in a text editor. Use the examples as reference.
**Windows:**
- Enter the following command in command prompt or PowerShell.
+ During Sunshine startup, you should see the list of detected displays:
@code{}
- %ProgramFiles%\Sunshine\tools\dxgi-info.exe
+ Info: Currently available display devices:
+ [
+ {
+ "device_id": "{64243705-4020-5895-b923-adc862c3457e}",
+ "display_name": "",
+ "friendly_name": "IDD HDR",
+ "info": null
+ },
+ {
+ "device_id": "{77f67f3e-754f-5d31-af64-ee037e18100a}",
+ "display_name": "",
+ "friendly_name": "SunshineHDR",
+ "info": null
+ },
+ {
+ "device_id": "{daeac860-f4db-5208-b1f5-cf59444fb768}",
+ "display_name": "\\\\.\\DISPLAY1",
+ "friendly_name": "ROG PG279Q",
+ "info": {
+ "hdr_state": null,
+ "origin_point": {
+ "x": 0,
+ "y": 0
+ },
+ "primary": true,
+ "refresh_rate": {
+ "type": "rational",
+ "value": {
+ "denominator": 1000,
+ "numerator": 119998
+ }
+ },
+ "resolution": {
+ "height": 1440,
+ "width": 2560
+ },
+ "resolution_scale": {
+ "type": "rational",
+ "value": {
+ "denominator": 100,
+ "numerator": 100
+ }
+ }
+ }
+ }
+ ]
@endcode
+ You need to use the `device_id` value.
}
@@ -891,7 +937,7 @@ editing the `conf` file in a text editor. Use the examples as reference.