Implement frontend part for Double refreshrate. Resolves #299

This commit is contained in:
Yukino Song
2025-02-05 07:35:42 +08:00
parent bf78a33831
commit 1c8bd0cdb5
7 changed files with 25 additions and 9 deletions

View File

@@ -418,7 +418,7 @@ namespace config {
video_t video { video_t video {
false, // headless_mode false, // headless_mode
true, // limit_framerate true, // limit_framerate
false, // double_framerate false, // double_refreshrate
28, // qp 28, // qp
0, // hevc_mode 0, // hevc_mode
@@ -1093,7 +1093,7 @@ namespace config {
bool_f(vars, "headless_mode", video.headless_mode); bool_f(vars, "headless_mode", video.headless_mode);
bool_f(vars, "limit_framerate", video.limit_framerate); bool_f(vars, "limit_framerate", video.limit_framerate);
bool_f(vars, "double_framerate", video.double_framerate); bool_f(vars, "double_refreshrate", video.double_refreshrate);
int_f(vars, "qp", video.qp); int_f(vars, "qp", video.qp);
int_between_f(vars, "hevc_mode", video.hevc_mode, { 0, 3 }); int_between_f(vars, "hevc_mode", video.hevc_mode, { 0, 3 });
int_between_f(vars, "av1_mode", video.av1_mode, { 0, 3 }); int_between_f(vars, "av1_mode", video.av1_mode, { 0, 3 });

View File

@@ -17,7 +17,7 @@ namespace config {
struct video_t { struct video_t {
bool headless_mode; bool headless_mode;
bool limit_framerate; bool limit_framerate;
bool double_framerate; bool double_refreshrate;
// ffmpeg params // ffmpeg params
int qp; // higher == more compression and less quality int qp; // higher == more compression and less quality

View File

@@ -256,7 +256,7 @@ namespace proc {
int target_fps = launch_session->fps ? launch_session->fps : 60; int target_fps = launch_session->fps ? launch_session->fps : 60;
if (config::video.double_framerate) { if (config::video.double_refreshrate) {
target_fps *= 2; target_fps *= 2;
} }

View File

@@ -196,6 +196,7 @@
"dd_wa_hdr_toggle": "disabled", "dd_wa_hdr_toggle": "disabled",
"fallback_mode": "", "fallback_mode": "",
"headless_mode": "disabled", "headless_mode": "disabled",
"double_refreshrate": "disabled",
"min_fps_factor": 1, "min_fps_factor": 1,
}, },
}, },

View File

@@ -137,11 +137,22 @@ const validateFallbackMode = (event) => {
</div> </div>
<!-- Headless Mode --> <!-- Headless Mode -->
<div class="mb-3 form-check" v-if="platform === 'windows'"> <Checkbox class="mb-3"
<input type="checkbox" class="form-check-input" id="headless_mode" v-model="config.headless_mode" true-value="enabled" false-value="disabled"/> id="headless_mode"
<label for="headless_mode" class="form-check-label">{{ $t('config.headless_mode') }}</label> locale-prefix="config"
<div class="form-text">{{ $t('config.headless_mode_desc') }}</div> v-model="config.headless_mode"
</div> default="false"
v-if="platform === 'windows'"
></Checkbox>
<!-- Double Refreshrate -->
<Checkbox class="mb-3"
id="double_refreshrate"
locale-prefix="config"
v-model="config.double_refreshrate"
default="false"
v-if="platform === 'windows'"
></Checkbox>
<!-- SudoVDA Driver Status --> <!-- SudoVDA Driver Status -->
<div class="alert" :class="[vdisplay === '0' ? 'alert-success' : 'alert-warning']" v-if="platform === 'windows'"> <div class="alert" :class="[vdisplay === '0' ? 'alert-success' : 'alert-warning']" v-if="platform === 'windows'">

View File

@@ -224,6 +224,8 @@
"dd_resolution_option_multi_instance_desc": "When using multiple instance of Apollo, make sure you have disabled this option in all instances, or it'll end up messing things up. It's still recommended to disable this part if you don't want your physical monitor's resolution to change or you only stream with virtual display.", "dd_resolution_option_multi_instance_desc": "When using multiple instance of Apollo, make sure you have disabled this option in all instances, or it'll end up messing things up. It's still recommended to disable this part if you don't want your physical monitor's resolution to change or you only stream with virtual display.",
"dd_wa_hdr_toggle_desc": "When using virtual display device as for streaming, it might display incorrect HDR color. With this option enabled, Apollo will try to mitigate this issue.", "dd_wa_hdr_toggle_desc": "When using virtual display device as for streaming, it might display incorrect HDR color. With this option enabled, Apollo will try to mitigate this issue.",
"dd_wa_hdr_toggle": "Enable high-contrast workaround for HDR", "dd_wa_hdr_toggle": "Enable high-contrast workaround for HDR",
"double_refreshrate": "Double refresh rate for Virtual Display",
"double_refreshrate_desc": "Double the requested fresh rate when creating virtual displays, streamed refresh rate still remain the same. Can potentially improve stutter problem on some systems.",
"ds4_back_as_touchpad_click": "Map Back/Select to Touchpad Click", "ds4_back_as_touchpad_click": "Map Back/Select to Touchpad Click",
"ds4_back_as_touchpad_click_desc": "When forcing DS4 emulation, map Back/Select to Touchpad Click", "ds4_back_as_touchpad_click_desc": "When forcing DS4 emulation, map Back/Select to Touchpad Click",
"enable_input_only_mode": "Enable Input Only Mode", "enable_input_only_mode": "Enable Input Only Mode",

View File

@@ -219,6 +219,8 @@
"dd_resolution_option_multi_instance_desc": "当同时启动多个 Apollo 实例时,请确保每个实例都已禁用此选项,否则显示器组合可能会被搞乱。当你不希望物理显示器的分辨率被改变或只需要串流虚拟显示器时,依旧推荐完全禁用此选项。", "dd_resolution_option_multi_instance_desc": "当同时启动多个 Apollo 实例时,请确保每个实例都已禁用此选项,否则显示器组合可能会被搞乱。当你不希望物理显示器的分辨率被改变或只需要串流虚拟显示器时,依旧推荐完全禁用此选项。",
"dd_wa_hdr_toggle_desc": "当使用虚拟显示设备作为串流时,它可能会显示不正确的 HDR 颜色。启用此选项Apollo 将尝试缓解这个问题。", "dd_wa_hdr_toggle_desc": "当使用虚拟显示设备作为串流时,它可能会显示不正确的 HDR 颜色。启用此选项Apollo 将尝试缓解这个问题。",
"dd_wa_hdr_toggle": "为 HDR 启用高对比度临时修复", "dd_wa_hdr_toggle": "为 HDR 启用高对比度临时修复",
"double_refreshrate": "虚拟显示器刷新率翻倍",
"double_refreshrate_desc": "创建虚拟显示器时刷新率翻倍,串流的视频刷新率不受影响。可能可以缓解某些电脑上出现的画面卡顿现象。",
"ds4_back_as_touchpad_click": "映射回/选择触摸板点击", "ds4_back_as_touchpad_click": "映射回/选择触摸板点击",
"ds4_back_as_touchpad_click_desc": "强制使用 DS4 模拟时,将“返回”/“选择”映射到触摸板点击", "ds4_back_as_touchpad_click_desc": "强制使用 DS4 模拟时,将“返回”/“选择”映射到触摸板点击",
"enable_input_only_mode": "启用仅输入模式", "enable_input_only_mode": "启用仅输入模式",