Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the Windows “VDD mode” flow by unifying display preparation options (VDD + physical) under display_device_prep, adding a new ensure_secondary mode, and introducing a grace-period mechanism to keep VDD alive briefly for same-client reuse. It also updates the web UI + translations accordingly and adds/updates bundled Windows VDD driver assets.
Changes:
- Unify VDD/physical display preparation into
display_device_prep(removevdd_prepandcustom_vdd_screen_modeplumbing). - Add VDD deferred-restore (“grace period”) logic and mapping helpers between unified prep and internal VDD/physical behaviors.
- Update web UI (Setup Wizard + Display Device Options) and i18n strings; add driver catalog/INF assets.
Reviewed changes
Copilot reviewed 32 out of 36 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src_assets/windows/misc/vdd/driver/zakovdd.cat | Adds driver catalog asset for ZakoVDD package. |
| src_assets/windows/misc/vdd/driver/ZakoVDD.inf | Adds driver INF describing UMDF display adapter install. |
| src_assets/common/assets/web/public/assets/locale/zh_TW.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/zh.json | Update display prep strings and VDD reuse description; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/uk.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/tr.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/sv.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/ru.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/pt_BR.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/pt.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/pl.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/ko.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/ja.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/it.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/fr.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/es.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/en_US.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/en_GB.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/en.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/de.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/cs.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/public/assets/locale/bg.json | Update display prep strings; remove legacy VDD layout strings. |
| src_assets/common/assets/web/configs/tabs/audiovideo/DisplayDeviceOptions.vue | Remove VDD-specific UI split; add unified prep + ensure_secondary and dynamic descriptions. |
| src_assets/common/assets/web/composables/useConfig.js | Remove default vdd_prep from web config defaults. |
| src_assets/common/assets/web/components/SetupWizard.vue | Reorder steps and unify display prep selection UI (add ensure_secondary). |
| src/rtsp.h | Remove custom_vdd_screen_mode from launch session struct. |
| src/process.cpp | Remove SUNSHINE_CLIENT_CUSTOM_VDD_SCREEN_MODE env propagation. |
| src/nvhttp.cpp | Remove parsing/export of customVddScreenMode and related env. |
| src/display_device/session.h | Add deferred restore state and new execute_deferred_restore() declaration. |
| src/display_device/session.cpp | Implement grace-period deferred restore + unified prep mapping in restore flow; add shutdown VDD cleanup. |
| src/display_device/parsed_config.h | Add ensure_secondary and mapping helpers declarations. |
| src/display_device/parsed_config.cpp | Implement unified prep → VDD/physical mapping; remove vdd_prep config usage. |
| src/config.h | Remove vdd_prep from video config struct. |
| src/config.cpp | Remove vdd_prep default + parsing from config loader. |
| .gitignore | Remove _dev_notes/ ignore entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+135
to
+142
| // 兜底:退出时如果 VDD 仍存在且 vdd_keep_enabled=false,直接销毁 | ||
| // 不调用完整的 restore_state(),因为析构时 boost::log/timer 可能已被销毁 | ||
| // 仅执行 VDD 销毁(写管道命令,不依赖日志和定时器) | ||
| if (!config::video.vdd_keep_enabled) { | ||
| auto vdd_id = display_device::find_device_by_friendlyname(ZAKO_NAME); | ||
| if (!vdd_id.empty()) { | ||
| vdd_utils::destroy_vdd_monitor(); | ||
| } |
Comment on lines
54
to
58
| <div | ||
| id="panelsStayOpen-collapseOne" | ||
| class="accordion-collapse collapse" | ||
| class="accordion-collapse collapse show" | ||
| aria-labelledby="panelsStayOpen-headingOne" | ||
| > |
| @@ -400,7 +400,6 @@ namespace nvhttp { | |||
| launch_session->enable_hdr = util::from_view(get_arg(args, "hdrMode", "0")); | |||
| launch_session->use_vdd = util::from_view(get_arg(args, "useVdd", "0")); | |||
| launch_session->custom_screen_mode = util::from_view(get_arg(args, "customScreenMode", "-1")); | |||
src/display_device/session.cpp
Outdated
Comment on lines
+339
to
+341
| if (vdd_already_exists) { | ||
| execute_deferred_restore(deferred_restore_reason_); | ||
| } |
src/display_device/session.cpp
Outdated
Comment on lines
+702
to
+716
| if (!vdd_id.empty() && !is_keep_enabled && is_vdd_mode && has_persistent) { | ||
| BOOST_LOG(info) << "VDD 延迟恢复:启动 grace period,等待可能的同客户端新串流复用 VDD"; | ||
| deferred_restore_ = true; | ||
| deferred_restore_reason_ = reason; | ||
| deferred_client_id_ = current_vdd_client_id; | ||
|
|
||
| timer->setup_timer([this]() { | ||
| // Grace period 到期,没有新的 configure_display 到来,执行真正的 restore | ||
| BOOST_LOG(info) << "VDD grace period 到期,执行延迟恢复"; | ||
| deferred_restore_ = false; | ||
| deferred_client_id_.clear(); | ||
| execute_deferred_restore(deferred_restore_reason_); | ||
| return true; // 一次性执行,不重试 | ||
| }); | ||
| return; |
| @@ -1195,7 +1194,6 @@ namespace config { | |||
| } | |||
| #endif | |||
| @@ -188,7 +188,6 @@ namespace proc { | |||
| _env["SUNSHINE_CLIENT_ENABLE_SOPS"] = launch_session->enable_sops ? "true" : "false"; | |||
| _env["SUNSHINE_CLIENT_ENABLE_MIC"] = launch_session->enable_mic ? "true" : "false"; | |||
| _env["SUNSHINE_CLIENT_CUSTOM_SCREEN_MODE"] = std::to_string(launch_session->custom_screen_mode); | |||
Comment on lines
+574
to
+579
| switch (unified) { | ||
| case device_prep_e::ensure_secondary: | ||
| return device_prep_e::ensure_active; // In physical mode, activate as secondary | ||
| default: | ||
| return unified; // All other values map 1:1 | ||
| } |
| } else if (this.currentStep === 2) { | ||
| return this.selectedDisplay !== null | ||
| } else if (this.currentStep === 3) { | ||
| return this.selectedAdapter !== null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.