Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmake/compile_definitions/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ set(SUNSHINE_TARGET_FILES
"${CMAKE_SOURCE_DIR}/src/network.cpp"
"${CMAKE_SOURCE_DIR}/src/network.h"
"${CMAKE_SOURCE_DIR}/src/move_by_copy.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/vdd_control.h"
"${CMAKE_SOURCE_DIR}/src/platform/windows/vdd_control.cpp"
"${CMAKE_SOURCE_DIR}/src/system_tray.cpp"
"${CMAKE_SOURCE_DIR}/src/system_tray.h"
"${CMAKE_SOURCE_DIR}/src/task_pool.h"
Expand Down Expand Up @@ -136,6 +138,7 @@ include_directories(
BEFORE
SYSTEM
"${CMAKE_SOURCE_DIR}/third-party"
"${CMAKE_SOURCE_DIR}/third-party/parsec-vdd"
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/enet/include"
"${CMAKE_SOURCE_DIR}/third-party/nanors"
"${CMAKE_SOURCE_DIR}/third-party/nanors/deps/obl"
Expand Down
65 changes: 65 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,71 @@ editing the `conf` file in a text editor. Use the examples as reference.
</tr>
</table>

### vdd_enabled

<table>
<tr>
<td>Description</td>
<td colspan="2">Automatically create a virtual display when no physical display is detected.</td>
</tr>
<tr>
<td>Default</td>
<td colspan="2">@code{}disabled@endcode</td>
</tr>
</table>

### vdd_width

<table>
<tr>
<td>Description</td>
<td colspan="2">Width of the virtual display in pixels.</td>
</tr>
<tr>
<td>Default</td>
<td colspan="2">@code{}1920@endcode</td>
</tr>
</table>

### vdd_height

<table>
<tr>
<td>Description</td>
<td colspan="2">Height of the virtual display in pixels.</td>
</tr>
<tr>
<td>Default</td>
<td colspan="2">@code{}1080@endcode</td>
</tr>
</table>

### vdd_refresh_rate

<table>
<tr>
<td>Description</td>
<td colspan="2">Refresh rate of the virtual display in Hz.</td>
</tr>
<tr>
<td>Default</td>
<td colspan="2">@code{}144@endcode</td>
</tr>
</table>

### vdd_display_count

<table>
<tr>
<td>Description</td>
<td colspan="2">Number of virtual displays to restore on startup. This value is set automatically when adding or removing displays via the tray or web UI.</td>
</tr>
<tr>
<td>Default</td>
<td colspan="2">@code{}0@endcode</td>
</tr>
</table>

### max_bitrate

<table>
Expand Down
14 changes: 14 additions & 0 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,14 @@ namespace config {
{} // wa
}, // display_device

{
false, // virtual_display_enabled
1920, // virtual_display_width
1080, // virtual_display_height
144, // virtual_display_refresh_rate
0, // virtual_display_count
Comment thread
fatebugs marked this conversation as resolved.
}, // vdd

0, // max_bitrate
0 // minimum_fps_target (0 = framerate)
};
Expand Down Expand Up @@ -1191,6 +1199,12 @@ namespace config {
}
bool_f(vars, "dd_config_revert_on_disconnect", video.dd.config_revert_on_disconnect);
generic_f(vars, "dd_mode_remapping", video.dd.mode_remapping, dd::mode_remapping_from_view);

bool_f(vars, "vdd_enabled", video.vdd.virtual_display_enabled);
int_f(vars, "vdd_width", video.vdd.virtual_display_width);
int_f(vars, "vdd_height", video.vdd.virtual_display_height);
int_f(vars, "vdd_refresh_rate", video.vdd.virtual_display_refresh_rate);
int_f(vars, "vdd_display_count", video.vdd.virtual_display_count);
{
int value = 0;
int_between_f(vars, "dd_wa_hdr_toggle_delay", value, {0, 3000});
Expand Down
8 changes: 8 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ namespace config {
workarounds_t wa;
} dd;

struct {
bool virtual_display_enabled; ///< Enable virtual display creation when no display detected
int virtual_display_width; ///< Virtual display width
int virtual_display_height; ///< Virtual display height
int virtual_display_refresh_rate; ///< Virtual display refresh rate
int virtual_display_count; ///< Number of persisted virtual displays to restore on startup
} vdd;

int max_bitrate; // Maximum bitrate, sets ceiling in kbps for bitrate requested from client
double minimum_fps_target; ///< Lowest framerate that will be used when streaming. Range 0-1000, 0 = half of client's requested framerate.
};
Expand Down
Loading