├── .gitattributes
├── .github
├── FUNDING.yml
└── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ └── feature_request.yml
├── .gitignore
├── Common
└── Include
│ ├── AdapterOption.h
│ └── README.md
├── Community Installers
├── README.md
└── VDD Panel
│ ├── .editorconfig
│ ├── .vsconfig
│ ├── VDD Panel.Core
│ ├── Contracts
│ │ └── Services
│ │ │ └── IFileService.cs
│ ├── Helpers
│ │ └── Json.cs
│ ├── README.md
│ ├── Services
│ │ └── FileService.cs
│ └── VDD Panel.Core.csproj
│ ├── VDD Panel.sln
│ └── VDD Panel
│ ├── Activation
│ ├── ActivationHandler.cs
│ ├── AppNotificationActivationHandler.cs
│ ├── DefaultActivationHandler.cs
│ └── IActivationHandler.cs
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ ├── LockScreenLogo.scale-200.png
│ ├── SplashScreen.scale-200.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── StoreLogo.png
│ ├── Wide310x150Logo.scale-200.png
│ └── WindowIcon.ico
│ ├── Behaviors
│ ├── NavigationViewHeaderBehavior.cs
│ └── NavigationViewHeaderMode.cs
│ ├── Contracts
│ ├── Services
│ │ ├── IActivationService.cs
│ │ ├── IAppNotificationService.cs
│ │ ├── ILocalSettingsService.cs
│ │ ├── INavigationService.cs
│ │ ├── INavigationViewService.cs
│ │ ├── IPageService.cs
│ │ ├── IThemeSelectorService.cs
│ │ └── IWebViewService.cs
│ └── ViewModels
│ │ └── INavigationAware.cs
│ ├── Helpers
│ ├── EnumToBooleanConverter.cs
│ ├── FrameExtensions.cs
│ ├── NavigationHelper.cs
│ ├── ResourceExtensions.cs
│ ├── RuntimeHelper.cs
│ ├── SettingsStorageExtensions.cs
│ └── TitleBarHelper.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Models
│ └── LocalSettingsOptions.cs
│ ├── Package.appinstaller
│ ├── Package.appxmanifest
│ ├── Properties
│ ├── PublishProfiles
│ │ ├── win10-arm64.pubxml
│ │ ├── win10-x64.pubxml
│ │ └── win10-x86.pubxml
│ └── launchsettings.json
│ ├── README.md
│ ├── Services
│ ├── ActivationService.cs
│ ├── AppNotificationService.cs
│ ├── LocalSettingsService.cs
│ ├── NavigationService.cs
│ ├── NavigationViewService.cs
│ ├── PageService.cs
│ ├── ThemeSelectorService.cs
│ └── WebViewService.cs
│ ├── Strings
│ └── en-us
│ │ └── Resources.resw
│ ├── Styles
│ ├── FontSizes.xaml
│ ├── TextBlock.xaml
│ └── Thickness.xaml
│ ├── TemplateStudio.xml
│ ├── Usings.cs
│ ├── VDD Panel.csproj
│ ├── ViewModels
│ ├── ConfigureViewModel.cs
│ ├── GitHubViewModel.cs
│ ├── MainViewModel.cs
│ ├── SettingsViewModel.cs
│ └── ShellViewModel.cs
│ ├── Views
│ ├── ConfigurePage.xaml
│ ├── ConfigurePage.xaml.cs
│ ├── GitHubPage.xaml
│ ├── GitHubPage.xaml.cs
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── SettingsPage.xaml
│ ├── SettingsPage.xaml.cs
│ ├── ShellPage.xaml
│ └── ShellPage.xaml.cs
│ ├── app.manifest
│ └── appsettings.json
├── Community Scripts
├── HDRswitch-VDD.ps1
├── README.md
├── changeres-VDD.ps1
├── dep_fix.ps1
├── primary-VDD.ps1
├── refreshrate-VDD.ps1
├── rotate-VDD.ps1
├── scale-VDD.ps1
├── toggle-VDD.ps1
└── winp-VDD.ps1
├── LICENSE
├── README.md
├── Setup Installer
├── Universal Virtual Display Driver
│ ├── LICENSE_nefcon.txt
│ ├── NumberofMonitors.bat
│ ├── Setup.bat
│ ├── Setup.iss
│ └── Universal Virtual Display Driver.ico
├── Virtual Display Driver HDR v1.0.0
│ ├── LICENSE_nefcon.txt
│ ├── NumberofMonitors.bat
│ ├── Setup.bat
│ ├── Setup.iss
│ └── Virtual Display Driver HDR.ico
└── Virtual Display Driver v1.0.0
│ ├── LICENSE_nefcon.txt
│ ├── NumberofMonitors.bat
│ ├── Setup.bat
│ ├── Setup.iss
│ └── Virtual Display Driver.ico
└── Virtual Display Driver (HDR)
├── 8K240HzHDR.edid
├── CppProperties.json
├── MttVDD.sln
├── MttVDD
├── Driver.cpp
├── Driver.h
├── MttVDD.inf
├── MttVDD.sln
├── MttVDD.vcxproj
├── MttVDD.vcxproj.filters
├── Trace.h
└── readme.md
├── option.txt
└── vdd_settings.xml
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [itsmikethetech, zjoasan]
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: File a bug report.
3 | title: "[Bug]: "
4 | labels: ["bug", "triage"]
5 | assignees: ["zjoasan", "bud3699", "itsmikethetech"]
6 |
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: |
11 | Thanks for taking the time to fill out this bug report!
12 | - type: dropdown
13 | id: OS
14 | attributes:
15 | label: Which OS?
16 | description: What version of Windows are you running?
17 | options:
18 | - Win11 Pro
19 | - Win11 Home
20 | - Win10 Pro
21 | - Win10 Home
22 | - Other..
23 | default: 0
24 | validations:
25 | required: true
26 | - type: dropdown
27 | id: Version
28 | attributes:
29 | label: Which release?
30 | description: What version of Windows are you running?
31 | options:
32 | - 24H2
33 | - 23H2
34 | - 22H2
35 | - 21H2
36 | - 1809
37 | - 1607
38 | - 1507
39 | - Other..
40 | default: 0
41 | validations:
42 | required: true
43 | - type: markdown
44 | attributes:
45 | value: |
46 | If you struggle finding windows edition and version, Go to settings -> system -> about. Under windows specifications.
47 | - type: textarea
48 | id: bug-info
49 | attributes:
50 | label: Describe the bug
51 | description: Free text description.
52 | placeholder: |
53 | Tell us what you see!
54 | A clear and concise description of what the bug is.
55 | validations:
56 | required: true
57 | - type: textarea
58 | id: reproduce-info
59 | attributes:
60 | label: Steps to reproduce
61 | description: And if you can how to reproduce
62 | placeholder: |
63 | Tell us how to reproduce!
64 | Go to '...', 2. Click on '....', and so on.
65 | validations:
66 | required: false
67 | - type: textarea
68 | id: expected-info
69 | attributes:
70 | label: Expected behavior
71 | description: Please inform us about expected behavior.
72 | placeholder: |
73 | Description of behavior!
74 | When i Clicked...
75 | validations:
76 | required: false
77 | - type: textarea
78 | id: log-file
79 | attributes:
80 | label: Log File (Beta Only)
81 | description: Please attach the log file to help us diagnose the issue. You can drag and drop the file here or click to upload. The log can be retrieved by enabling the log file in the xml then restarting the driver.
82 | placeholder: Drag and drop the log file here or click to upload.
83 | validations:
84 | required: false
85 |
86 | - type: input
87 | id: contact
88 | attributes:
89 | label: Contact Details
90 | description: How can we get in touch with you if we need more info?
91 | placeholder: ex. email@example.com
92 | validations:
93 | required: false
94 |
95 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: Request a new Feature.
3 | title: "[Feature]: "
4 | labels: ["remove", "customize", "companion", "enhancement", "newcode"]
5 | assignees: ["zjoasan", "bud3699", "itsmikethetech"]
6 |
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: |
11 | Thanks for taking the time to fill out this feature request report!
12 | - type: textarea
13 | id: frprob
14 | attributes:
15 | label: Is the feature related to a "problem"?
16 | description: Describe the problem, in detail.
17 | placeholder: Tell us how to reproduce
18 | value: "When start X I wish to.."
19 | validations:
20 | required: true
21 | - type: textarea
22 | id: your-solution
23 | attributes:
24 | label: Your suggestion
25 | description: Describe what would solve your problem, as detailed as possible.
26 | placeholder: Tell us how to progress!
27 | value: "Disable a specific VD via hotkey"
28 | validations:
29 | required: true
30 | - type: input
31 | id: contact
32 | attributes:
33 | label: Contact Details
34 | description: How can we get in touch with you if we need more info?
35 | placeholder: ex. email@example.com
36 | validations:
37 | required: false
38 |
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | [Xx]64/
19 | [Xx]86/
20 | [Bb]uild/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opendb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 | *.VC.db
84 |
85 | # Visual Studio profiler
86 | *.psess
87 | *.vsp
88 | *.vspx
89 | *.sap
90 |
91 | # TFS 2012 Local Workspace
92 | $tf/
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 | *.DotSettings.user
101 |
102 | # JustCode is a .NET coding add-in
103 | .JustCode
104 |
105 | # TeamCity is a build add-in
106 | _TeamCity*
107 |
108 | # DotCover is a Code Coverage Tool
109 | *.dotCover
110 |
111 | # NCrunch
112 | _NCrunch_*
113 | .*crunch*.local.xml
114 | nCrunchTemp_*
115 |
116 | # MightyMoose
117 | *.mm.*
118 | AutoTest.Net/
119 |
120 | # Web workbench (sass)
121 | .sass-cache/
122 |
123 | # Installshield output folder
124 | [Ee]xpress/
125 |
126 | # DocProject is a documentation generator add-in
127 | DocProject/buildhelp/
128 | DocProject/Help/*.HxT
129 | DocProject/Help/*.HxC
130 | DocProject/Help/*.hhc
131 | DocProject/Help/*.hhk
132 | DocProject/Help/*.hhp
133 | DocProject/Help/Html2
134 | DocProject/Help/html
135 |
136 | # Click-Once directory
137 | publish/
138 |
139 | # Publish Web Output
140 | *.[Pp]ublish.xml
141 | *.azurePubxml
142 |
143 | # TODO: Un-comment the next line if you do not want to checkin
144 | # your web deploy settings because they may include unencrypted
145 | # passwords
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # NuGet Packages
150 | *.nupkg
151 | # The packages folder can be ignored because of Package Restore
152 | **/packages/*
153 | # except build/, which is used as an MSBuild target.
154 | !**/packages/build/
155 | # Uncomment if necessary however generally it will be regenerated when needed
156 | #!**/packages/repositories.config
157 | # NuGet v3's project.json files produces more ignoreable files
158 | *.nuget.props
159 | *.nuget.targets
160 |
161 | # Microsoft Azure Build Output
162 | csx/
163 | *.build.csdef
164 |
165 | # Microsoft Azure Emulator
166 | ecf/
167 | rcf/
168 |
169 | # Windows Store app package directory
170 | AppPackages/
171 | BundleArtifacts/
172 |
173 | # Visual Studio cache files
174 | # files ending in .cache can be ignored
175 | *.[Cc]ache
176 | # but keep track of directories ending in .cache
177 | !*.[Cc]ache/
178 |
179 | # Others
180 | ClientBin/
181 | [Ss]tyle[Cc]op.*
182 | ~$*
183 | *~
184 | *.dbmdl
185 | *.dbproj.schemaview
186 | *.pfx
187 | *.publishsettings
188 | node_modules/
189 | orleans.codegen.cs
190 |
191 | # RIA/Silverlight projects
192 | Generated_Code/
193 |
194 | # Backup & report files from converting an old project file
195 | # to a newer Visual Studio version. Backup files are not needed,
196 | # because we have git ;-)
197 | _UpgradeReport_Files/
198 | Backup*/
199 | UpgradeLog*.XML
200 | UpgradeLog*.htm
201 |
202 | # SQL Server files
203 | *.mdf
204 | *.ldf
205 |
206 | # Business Intelligence projects
207 | *.rdl.data
208 | *.bim.layout
209 | *.bim_*.settings
210 |
211 | # Microsoft Fakes
212 | FakesAssemblies/
213 |
214 | # GhostDoc plugin setting file
215 | *.GhostDoc.xml
216 |
217 | # Node.js Tools for Visual Studio
218 | .ntvs_analysis.dat
219 |
220 | # Visual Studio 6 build log
221 | *.plg
222 |
223 | # Visual Studio 6 workspace options file
224 | *.opt
225 |
226 | # Visual Studio LightSwitch build output
227 | **/*.HTMLClient/GeneratedArtifacts
228 | **/*.DesktopClient/GeneratedArtifacts
229 | **/*.DesktopClient/ModelManifest.xml
230 | **/*.Server/GeneratedArtifacts
231 | **/*.Server/ModelManifest.xml
232 | _Pvt_Extensions
233 |
234 | # LightSwitch generated files
235 | GeneratedArtifacts/
236 | ModelManifest.xml
237 |
238 | # Paket dependency manager
239 | .paket/paket.exe
240 |
241 | # FAKE - F# Make
242 | .fake/
243 |
--------------------------------------------------------------------------------
/Common/Include/AdapterOption.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include // For ComPtr
4 | #include // For IDXGIAdapter, IDXGIFactory1
5 | #include // For sort
6 |
7 | using namespace std;
8 | using namespace Microsoft::WRL;
9 |
10 | // Structure to vector gpus
11 | struct GPUInfo {
12 | wstring name; // GPU name
13 | ComPtr adapter;// COM pointer to the adapter
14 | DXGI_ADAPTER_DESC desc; // Adapter description
15 | };
16 |
17 | // Sort function for GPUs by dedicated video memory
18 | bool CompareGPUs(const GPUInfo& a, const GPUInfo& b) {
19 | return a.desc.DedicatedVideoMemory > b.desc.DedicatedVideoMemory;
20 | }
21 |
22 | // Get a enumerate list of available GPUs
23 | vector getAvailableGPUs() {
24 | vector gpus; // Vector to hold all GPU's information
25 |
26 | ComPtr factory;
27 | if (!SUCCEEDED(CreateDXGIFactory1(IID_PPV_ARGS(&factory)))) {
28 | return gpus;
29 | }
30 |
31 | // Enumerate all adapters (GPUs)
32 | for (UINT i = 0;; i++) {
33 | ComPtr adapter;
34 | if (!SUCCEEDED(factory->EnumAdapters(i, &adapter))) {
35 | break;
36 | }
37 |
38 | DXGI_ADAPTER_DESC desc;
39 |
40 | if (!SUCCEEDED(adapter->GetDesc(&desc))) {
41 | continue;
42 | }
43 |
44 | // Add the adapter information to the list
45 | GPUInfo info{ desc.Description, adapter, desc };
46 | gpus.push_back(info);
47 | }
48 |
49 | return gpus;
50 | }
51 |
52 | class AdapterOption {
53 | public:
54 | bool hasTargetAdapter{}; // Indicates if a target adapter is selected
55 | LUID adapterLuid{}; // Adapter's unique identifier (LUID)
56 | wstring target_name{}; // Target adapter name
57 |
58 | // Select the best GPU based on dedicated video memory
59 | wstring selectBestGPU() {
60 | auto gpus = getAvailableGPUs();
61 | if (gpus.empty()) {
62 | return L""; // Error check for headless / vm
63 | }
64 |
65 | // Sort GPUs by dedicated video memory in descending order
66 | sort(gpus.begin(), gpus.end(), CompareGPUs);
67 | auto bestGPU = gpus.front(); // Get the GPU with the most memory
68 |
69 | return bestGPU.name;
70 | }
71 |
72 | // Load friendlyname from a file OR select the best GPU
73 | void load(const wchar_t* path) {
74 | ifstream ifs{ path };
75 |
76 | if (!ifs.is_open()) {
77 | target_name = selectBestGPU();
78 | }
79 | else {
80 | string line;
81 | getline(ifs, line);
82 | target_name.assign(line.begin(), line.end());
83 | }
84 |
85 | // Find and set the adapter based on the target name
86 | if (!findAndSetAdapter(target_name)) {
87 | // If the adapter is not found, select the best GPU and retry
88 | target_name = selectBestGPU();
89 | findAndSetAdapter(target_name);
90 | }
91 | }
92 |
93 | // Set the target adapter from a given name and validate it
94 | void xmlprovide(const wstring& xtarg) {
95 | target_name = xtarg;
96 | if (!findAndSetAdapter(target_name)) {
97 | // If the adapter is not found, select the best GPU and retry
98 | target_name = selectBestGPU();
99 | findAndSetAdapter(target_name);
100 | }
101 | }
102 |
103 | // Apply the adapter settings to the specified adapter
104 | void apply(const IDDCX_ADAPTER& adapter) {
105 | if (hasTargetAdapter && IDD_IS_FUNCTION_AVAILABLE(IddCxAdapterSetRenderAdapter)) {
106 | IDARG_IN_ADAPTERSETRENDERADAPTER arg{};
107 | arg.PreferredRenderAdapter = adapterLuid;
108 | IddCxAdapterSetRenderAdapter(adapter, &arg);
109 | }
110 | }
111 |
112 | private:
113 | // Find and set the adapter by its name
114 | bool findAndSetAdapter(const wstring& adapterName) {
115 | auto gpus = getAvailableGPUs();
116 |
117 | // Iterate through all available GPUs
118 | for (const auto& gpu : gpus) {
119 | if (_wcsicmp(gpu.name.c_str(), adapterName.c_str()) == 0) {
120 | adapterLuid = gpu.desc.AdapterLuid; // Set the adapter LUID
121 | hasTargetAdapter = true; // Indicate that a target adapter is selected
122 | return true;
123 | }
124 | }
125 |
126 | hasTargetAdapter = false; // Indicate that no target adapter is selected
127 | return false;
128 | }
129 | };
130 |
--------------------------------------------------------------------------------
/Common/Include/README.md:
--------------------------------------------------------------------------------
1 | Required include(s). Plans to combine it into the driver to reduce includes.
2 |
--------------------------------------------------------------------------------
/Community Installers/README.md:
--------------------------------------------------------------------------------
1 | Note: Some of the files included with installer files may use code from outside sources and as such, would not be covered by the open source license. Only the virtual display driver itself is fully FOSS, while other terms may apply based on the installer packaging method used.
2 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/.editorconfig:
--------------------------------------------------------------------------------
1 | # Rules in this file were initially inferred by Visual Studio IntelliCode from the Template Studio codebase.
2 | # You can modify the rules from these initially generated values to suit your own policies.
3 | # You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference.
4 |
5 | [*.cs]
6 |
7 | #Core editorconfig formatting - indentation
8 |
9 | #use soft tabs (spaces) for indentation
10 | indent_style = space
11 |
12 | #Formatting - new line options
13 |
14 | #place else statements on a new line
15 | csharp_new_line_before_else = true
16 | #require braces to be on a new line for lambdas, methods, control_blocks, types, properties, and accessors (also known as "Allman" style)
17 | csharp_new_line_before_open_brace = all
18 |
19 | #Formatting - organize using options
20 |
21 | #sort System.* using directives alphabetically, and place them before other usings
22 | dotnet_sort_system_directives_first = true
23 |
24 | #Formatting - spacing options
25 |
26 | #require NO space between a cast and the value
27 | csharp_space_after_cast = false
28 | #require a space before the colon for bases or interfaces in a type declaration
29 | csharp_space_after_colon_in_inheritance_clause = true
30 | #require a space after a keyword in a control flow statement such as a for loop
31 | csharp_space_after_keywords_in_control_flow_statements = true
32 | #require a space before the colon for bases or interfaces in a type declaration
33 | csharp_space_before_colon_in_inheritance_clause = true
34 | #remove space within empty argument list parentheses
35 | csharp_space_between_method_call_empty_parameter_list_parentheses = false
36 | #remove space between method call name and opening parenthesis
37 | csharp_space_between_method_call_name_and_opening_parenthesis = false
38 | #do not place space characters after the opening parenthesis and before the closing parenthesis of a method call
39 | csharp_space_between_method_call_parameter_list_parentheses = false
40 | #remove space within empty parameter list parentheses for a method declaration
41 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
42 | #place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list.
43 | csharp_space_between_method_declaration_parameter_list_parentheses = false
44 |
45 | #Formatting - wrapping options
46 |
47 | #leave code block on separate lines
48 | csharp_preserve_single_line_blocks = false
49 |
50 | #Style - Code block preferences
51 |
52 | #prefer curly braces even for one line of code
53 | csharp_prefer_braces = true:suggestion
54 |
55 | #Style - expression bodied member options
56 |
57 | #prefer expression bodies for accessors
58 | csharp_style_expression_bodied_accessors = true:warning
59 | #prefer block bodies for constructors
60 | csharp_style_expression_bodied_constructors = false:suggestion
61 | #prefer expression bodies for methods
62 | csharp_style_expression_bodied_methods = when_on_single_line:silent
63 | #prefer expression-bodied members for properties
64 | csharp_style_expression_bodied_properties = true:warning
65 |
66 | #Style - expression level options
67 |
68 | #prefer out variables to be declared before the method call
69 | csharp_style_inlined_variable_declaration = false:suggestion
70 | #prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them
71 | dotnet_style_predefined_type_for_member_access = true:suggestion
72 |
73 | #Style - Expression-level preferences
74 |
75 | #prefer default over default(T)
76 | csharp_prefer_simple_default_expression = true:suggestion
77 | #prefer objects to be initialized using object initializers when possible
78 | dotnet_style_object_initializer = true:suggestion
79 |
80 | #Style - implicit and explicit types
81 |
82 | #prefer var over explicit type in all cases, unless overridden by another code style rule
83 | csharp_style_var_elsewhere = true:suggestion
84 | #prefer var is used to declare variables with built-in system types such as int
85 | csharp_style_var_for_built_in_types = true:suggestion
86 | #prefer var when the type is already mentioned on the right-hand side of a declaration expression
87 | csharp_style_var_when_type_is_apparent = true:suggestion
88 |
89 | #Style - language keyword and framework type options
90 |
91 | #prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them
92 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
93 |
94 | #Style - Language rules
95 | csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
96 | csharp_style_var_for_built_in_types = true:warning
97 |
98 | #Style - modifier options
99 |
100 | #prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods.
101 | dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
102 |
103 | #Style - Modifier preferences
104 |
105 | #when this rule is set to a list of modifiers, prefer the specified ordering.
106 | csharp_preferred_modifier_order = public,private,protected,internal,static,async,readonly,override,sealed,abstract,virtual:warning
107 | dotnet_style_readonly_field = true:warning
108 |
109 | #Style - Pattern matching
110 |
111 | #prefer pattern matching instead of is expression with type casts
112 | csharp_style_pattern_matching_over_as_with_null_check = true:warning
113 |
114 | #Style - qualification options
115 |
116 | #prefer events not to be prefaced with this. or Me. in Visual Basic
117 | dotnet_style_qualification_for_event = false:suggestion
118 | #prefer fields not to be prefaced with this. or Me. in Visual Basic
119 | dotnet_style_qualification_for_field = false:suggestion
120 | #prefer methods not to be prefaced with this. or Me. in Visual Basic
121 | dotnet_style_qualification_for_method = false:suggestion
122 | #prefer properties not to be prefaced with this. or Me. in Visual Basic
123 | dotnet_style_qualification_for_property = false:suggestion
124 | csharp_indent_labels = one_less_than_current
125 | csharp_using_directive_placement = outside_namespace:silent
126 | csharp_prefer_simple_using_statement = true:warning
127 | csharp_style_namespace_declarations = file_scoped:warning
128 | csharp_style_expression_bodied_operators = false:silent
129 | csharp_style_expression_bodied_indexers = true:silent
130 | csharp_style_expression_bodied_lambdas = true:silent
131 | csharp_style_expression_bodied_local_functions = false:silent
132 |
133 | [*.{cs,vb}]
134 | dotnet_style_operator_placement_when_wrapping = beginning_of_line
135 | tab_width = 4
136 | indent_size = 4
137 | end_of_line = crlf
138 | dotnet_style_coalesce_expression = true:suggestion
139 | dotnet_style_null_propagation = true:suggestion
140 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
141 | dotnet_style_prefer_auto_properties = true:silent
142 | dotnet_style_object_initializer = true:suggestion
143 | dotnet_style_collection_initializer = true:suggestion
144 | dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
145 | dotnet_style_prefer_conditional_expression_over_assignment = true:silent
146 | dotnet_style_prefer_conditional_expression_over_return = true:silent
147 | [*.{cs,vb}]
148 |
149 | #Style - Unnecessary code rules
150 | csharp_style_unused_value_assignment_preference = discard_variable:warning
151 |
152 | #### Naming styles ####
153 |
154 | # Naming rules
155 |
156 | dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
157 | dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
158 | dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
159 |
160 | dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
161 | dotnet_naming_rule.types_should_be_pascal_case.symbols = types
162 | dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
163 |
164 | dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
165 | dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
166 | dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
167 |
168 | # Symbol specifications
169 |
170 | dotnet_naming_symbols.interface.applicable_kinds = interface
171 | dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
172 | dotnet_naming_symbols.interface.required_modifiers =
173 |
174 | dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
175 | dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
176 | dotnet_naming_symbols.types.required_modifiers =
177 |
178 | dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
179 | dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
180 | dotnet_naming_symbols.non_field_members.required_modifiers =
181 |
182 | # Naming styles
183 |
184 | dotnet_naming_style.begins_with_i.required_prefix = I
185 | dotnet_naming_style.begins_with_i.required_suffix =
186 | dotnet_naming_style.begins_with_i.word_separator =
187 | dotnet_naming_style.begins_with_i.capitalization = pascal_case
188 |
189 | dotnet_naming_style.pascal_case.required_prefix =
190 | dotnet_naming_style.pascal_case.required_suffix =
191 | dotnet_naming_style.pascal_case.word_separator =
192 | dotnet_naming_style.pascal_case.capitalization = pascal_case
193 |
194 | dotnet_naming_style.pascal_case.required_prefix =
195 | dotnet_naming_style.pascal_case.required_suffix =
196 | dotnet_naming_style.pascal_case.word_separator =
197 | dotnet_naming_style.pascal_case.capitalization = pascal_case
198 | dotnet_style_explicit_tuple_names = true:suggestion
199 | dotnet_style_prefer_inferred_tuple_names = true:suggestion
200 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
201 | dotnet_style_prefer_compound_assignment = true:warning
202 | dotnet_style_prefer_simplified_interpolation = true:suggestion
203 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/.vsconfig:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "components": [
4 | "Microsoft.Component.MSBuild",
5 | "Microsoft.NetCore.Component.Runtime.7.0",
6 | "Microsoft.NetCore.Component.SDK",
7 | "Microsoft.VisualStudio.Component.ManagedDesktop.Core",
8 | "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
9 | "Microsoft.VisualStudio.Component.NuGet",
10 | "Microsoft.VisualStudio.Component.Windows10SDK.19041",
11 | "Microsoft.VisualStudio.Component.Windows10SDK",
12 | "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
13 | "Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cs",
14 | "Microsoft.VisualStudio.Workload.ManagedDesktop"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel.Core/Contracts/Services/IFileService.cs:
--------------------------------------------------------------------------------
1 | namespace VDD_Panel.Core.Contracts.Services;
2 |
3 | public interface IFileService
4 | {
5 | T Read(string folderPath, string fileName);
6 |
7 | void Save(string folderPath, string fileName, T content);
8 |
9 | void Delete(string folderPath, string fileName);
10 | }
11 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel.Core/Helpers/Json.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace VDD_Panel.Core.Helpers;
4 |
5 | public static class Json
6 | {
7 | public static async Task ToObjectAsync(string value)
8 | {
9 | return await Task.Run(() =>
10 | {
11 | return JsonConvert.DeserializeObject(value);
12 | });
13 | }
14 |
15 | public static async Task StringifyAsync(object value)
16 | {
17 | return await Task.Run(() =>
18 | {
19 | return JsonConvert.SerializeObject(value);
20 | });
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel.Core/README.md:
--------------------------------------------------------------------------------
1 | *Recommended Markdown Viewer: [Markdown Editor](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.MarkdownEditor2)*
2 |
3 | ## Getting Started
4 |
5 | The Core project contains code that can be [reused across multiple application projects](https://docs.microsoft.com/dotnet/standard/net-standard#net-5-and-net-standard).
6 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel.Core/Services/FileService.cs:
--------------------------------------------------------------------------------
1 | using System.Text;
2 |
3 | using Newtonsoft.Json;
4 |
5 | using VDD_Panel.Core.Contracts.Services;
6 |
7 | namespace VDD_Panel.Core.Services;
8 |
9 | public class FileService : IFileService
10 | {
11 | public T Read(string folderPath, string fileName)
12 | {
13 | var path = Path.Combine(folderPath, fileName);
14 | if (File.Exists(path))
15 | {
16 | var json = File.ReadAllText(path);
17 | return JsonConvert.DeserializeObject(json);
18 | }
19 |
20 | return default;
21 | }
22 |
23 | public void Save(string folderPath, string fileName, T content)
24 | {
25 | if (!Directory.Exists(folderPath))
26 | {
27 | Directory.CreateDirectory(folderPath);
28 | }
29 |
30 | var fileContent = JsonConvert.SerializeObject(content);
31 | File.WriteAllText(Path.Combine(folderPath, fileName), fileContent, Encoding.UTF8);
32 | }
33 |
34 | public void Delete(string folderPath, string fileName)
35 | {
36 | if (fileName != null && File.Exists(Path.Combine(folderPath, fileName)))
37 | {
38 | File.Delete(Path.Combine(folderPath, fileName));
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel.Core/VDD Panel.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net7.0
4 | VDD_Panel.Core
5 | AnyCPU;x64;x86
6 | x86;x64;arm64;AnyCPU
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.9.34622.214
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDD Panel", "VDD Panel\VDD Panel.csproj", "{5FA23A93-E3D0-46A3-89AA-A909685E2784}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDD Panel.Core", "VDD Panel.Core\VDD Panel.Core.csproj", "{29E3EAF5-65AE-4ACA-B550-983DBCE38E03}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Debug|arm64 = Debug|arm64
14 | Debug|x64 = Debug|x64
15 | Debug|x86 = Debug|x86
16 | Release|Any CPU = Release|Any CPU
17 | Release|arm64 = Release|arm64
18 | Release|x64 = Release|x64
19 | Release|x86 = Release|x86
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|Any CPU.ActiveCfg = Debug|x64
23 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|Any CPU.Build.0 = Debug|x64
24 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|Any CPU.Deploy.0 = Debug|x64
25 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|arm64.ActiveCfg = Debug|arm64
26 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|arm64.Build.0 = Debug|arm64
27 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|arm64.Deploy.0 = Debug|arm64
28 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|x64.ActiveCfg = Debug|x64
29 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|x64.Build.0 = Debug|x64
30 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|x64.Deploy.0 = Debug|x64
31 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|x86.ActiveCfg = Debug|x86
32 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|x86.Build.0 = Debug|x86
33 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Debug|x86.Deploy.0 = Debug|x86
34 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|Any CPU.ActiveCfg = Release|x64
35 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|Any CPU.Build.0 = Release|x64
36 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|Any CPU.Deploy.0 = Release|x64
37 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|arm64.ActiveCfg = Release|arm64
38 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|arm64.Build.0 = Release|arm64
39 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|arm64.Deploy.0 = Release|arm64
40 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|x64.ActiveCfg = Release|x64
41 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|x64.Build.0 = Release|x64
42 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|x64.Deploy.0 = Release|x64
43 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|x86.ActiveCfg = Release|x86
44 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|x86.Build.0 = Release|x86
45 | {5FA23A93-E3D0-46A3-89AA-A909685E2784}.Release|x86.Deploy.0 = Release|x86
46 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Debug|Any CPU.Build.0 = Debug|Any CPU
48 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Debug|arm64.ActiveCfg = Debug|arm64
49 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Debug|arm64.Build.0 = Debug|arm64
50 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Debug|x64.ActiveCfg = Debug|x64
51 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Debug|x64.Build.0 = Debug|x64
52 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Debug|x86.ActiveCfg = Debug|x86
53 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Debug|x86.Build.0 = Debug|x86
54 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Release|Any CPU.ActiveCfg = Release|Any CPU
55 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Release|Any CPU.Build.0 = Release|Any CPU
56 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Release|arm64.ActiveCfg = Release|arm64
57 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Release|arm64.Build.0 = Release|arm64
58 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Release|x64.ActiveCfg = Release|x64
59 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Release|x64.Build.0 = Release|x64
60 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Release|x86.ActiveCfg = Release|x86
61 | {29E3EAF5-65AE-4ACA-B550-983DBCE38E03}.Release|x86.Build.0 = Release|x86
62 | EndGlobalSection
63 | GlobalSection(SolutionProperties) = preSolution
64 | HideSolutionNode = FALSE
65 | EndGlobalSection
66 | GlobalSection(ExtensibilityGlobals) = postSolution
67 | SolutionGuid = {81C98471-4829-40B4-B60F-CEB2472667FC}
68 | EndGlobalSection
69 | EndGlobal
70 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Activation/ActivationHandler.cs:
--------------------------------------------------------------------------------
1 | namespace VDD_Panel.Activation;
2 |
3 | // Extend this class to implement new ActivationHandlers. See DefaultActivationHandler for an example.
4 | // https://github.com/microsoft/TemplateStudio/blob/main/docs/WinUI/activation.md
5 | public abstract class ActivationHandler : IActivationHandler
6 | where T : class
7 | {
8 | // Override this method to add the logic for whether to handle the activation.
9 | protected virtual bool CanHandleInternal(T args) => true;
10 |
11 | // Override this method to add the logic for your activation handler.
12 | protected abstract Task HandleInternalAsync(T args);
13 |
14 | public bool CanHandle(object args) => args is T && CanHandleInternal((args as T)!);
15 |
16 | public async Task HandleAsync(object args) => await HandleInternalAsync((args as T)!);
17 | }
18 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Activation/AppNotificationActivationHandler.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Dispatching;
2 | using Microsoft.UI.Xaml;
3 | using Microsoft.Windows.AppLifecycle;
4 | using Microsoft.Windows.AppNotifications;
5 |
6 | using VDD_Panel.Contracts.Services;
7 | using VDD_Panel.ViewModels;
8 |
9 | namespace VDD_Panel.Activation;
10 |
11 | public class AppNotificationActivationHandler : ActivationHandler
12 | {
13 | private readonly INavigationService _navigationService;
14 | private readonly IAppNotificationService _notificationService;
15 |
16 | public AppNotificationActivationHandler(INavigationService navigationService, IAppNotificationService notificationService)
17 | {
18 | _navigationService = navigationService;
19 | _notificationService = notificationService;
20 | }
21 |
22 | protected override bool CanHandleInternal(LaunchActivatedEventArgs args)
23 | {
24 | return AppInstance.GetCurrent().GetActivatedEventArgs()?.Kind == ExtendedActivationKind.AppNotification;
25 | }
26 |
27 | protected async override Task HandleInternalAsync(LaunchActivatedEventArgs args)
28 | {
29 | // TODO: Handle notification activations.
30 |
31 | //// // Access the AppNotificationActivatedEventArgs.
32 | //// var activatedEventArgs = (AppNotificationActivatedEventArgs)AppInstance.GetCurrent().GetActivatedEventArgs().Data;
33 |
34 | //// // Navigate to a specific page based on the notification arguments.
35 | //// if (_notificationService.ParseArguments(activatedEventArgs.Argument)["action"] == "Settings")
36 | //// {
37 | //// // Queue navigation with low priority to allow the UI to initialize.
38 | //// App.MainWindow.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
39 | //// {
40 | //// _navigationService.NavigateTo(typeof(SettingsViewModel).FullName!);
41 | //// });
42 | //// }
43 |
44 | App.MainWindow.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () =>
45 | {
46 | App.MainWindow.ShowMessageDialogAsync("TODO: Handle notification activations.", "Notification Activation");
47 | });
48 |
49 | await Task.CompletedTask;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Activation/DefaultActivationHandler.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 |
3 | using VDD_Panel.Contracts.Services;
4 | using VDD_Panel.ViewModels;
5 |
6 | namespace VDD_Panel.Activation;
7 |
8 | public class DefaultActivationHandler : ActivationHandler
9 | {
10 | private readonly INavigationService _navigationService;
11 |
12 | public DefaultActivationHandler(INavigationService navigationService)
13 | {
14 | _navigationService = navigationService;
15 | }
16 |
17 | protected override bool CanHandleInternal(LaunchActivatedEventArgs args)
18 | {
19 | // None of the ActivationHandlers has handled the activation.
20 | return _navigationService.Frame?.Content == null;
21 | }
22 |
23 | protected async override Task HandleInternalAsync(LaunchActivatedEventArgs args)
24 | {
25 | _navigationService.NavigateTo(typeof(MainViewModel).FullName!, args.Arguments);
26 |
27 | await Task.CompletedTask;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Activation/IActivationHandler.cs:
--------------------------------------------------------------------------------
1 | namespace VDD_Panel.Activation;
2 |
3 | public interface IActivationHandler
4 | {
5 | bool CanHandle(object args);
6 |
7 | Task HandleAsync(object args);
8 | }
9 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 | using Microsoft.Extensions.Hosting;
3 | using Microsoft.UI.Xaml;
4 |
5 | using VDD_Panel.Activation;
6 | using VDD_Panel.Contracts.Services;
7 | using VDD_Panel.Core.Contracts.Services;
8 | using VDD_Panel.Core.Services;
9 | using VDD_Panel.Helpers;
10 | using VDD_Panel.Models;
11 | using VDD_Panel.Notifications;
12 | using VDD_Panel.Services;
13 | using VDD_Panel.ViewModels;
14 | using VDD_Panel.Views;
15 |
16 | namespace VDD_Panel;
17 |
18 | // To learn more about WinUI 3, see https://docs.microsoft.com/windows/apps/winui/winui3/.
19 | public partial class App : Application
20 | {
21 | // The .NET Generic Host provides dependency injection, configuration, logging, and other services.
22 | // https://docs.microsoft.com/dotnet/core/extensions/generic-host
23 | // https://docs.microsoft.com/dotnet/core/extensions/dependency-injection
24 | // https://docs.microsoft.com/dotnet/core/extensions/configuration
25 | // https://docs.microsoft.com/dotnet/core/extensions/logging
26 | public IHost Host
27 | {
28 | get;
29 | }
30 |
31 | public static T GetService()
32 | where T : class
33 | {
34 | if ((App.Current as App)!.Host.Services.GetService(typeof(T)) is not T service)
35 | {
36 | throw new ArgumentException($"{typeof(T)} needs to be registered in ConfigureServices within App.xaml.cs.");
37 | }
38 |
39 | return service;
40 | }
41 |
42 | public static WindowEx MainWindow { get; } = new MainWindow();
43 |
44 | public static UIElement? AppTitlebar { get; set; }
45 |
46 | public App()
47 | {
48 | InitializeComponent();
49 |
50 | Host = Microsoft.Extensions.Hosting.Host.
51 | CreateDefaultBuilder().
52 | UseContentRoot(AppContext.BaseDirectory).
53 | ConfigureServices((context, services) =>
54 | {
55 | // Default Activation Handler
56 | services.AddTransient, DefaultActivationHandler>();
57 |
58 | // Other Activation Handlers
59 | services.AddTransient();
60 |
61 | // Services
62 | services.AddSingleton();
63 | services.AddSingleton();
64 | services.AddSingleton();
65 | services.AddTransient();
66 | services.AddTransient();
67 |
68 | services.AddSingleton();
69 | services.AddSingleton();
70 | services.AddSingleton();
71 |
72 | // Core Services
73 | services.AddSingleton();
74 |
75 | // Views and ViewModels
76 | services.AddTransient();
77 | services.AddTransient();
78 | services.AddTransient();
79 | services.AddTransient();
80 | services.AddTransient();
81 | services.AddTransient();
82 | services.AddTransient();
83 | services.AddTransient();
84 | services.AddTransient();
85 | services.AddTransient();
86 |
87 | // Configuration
88 | services.Configure(context.Configuration.GetSection(nameof(LocalSettingsOptions)));
89 | }).
90 | Build();
91 |
92 | App.GetService().Initialize();
93 |
94 | UnhandledException += App_UnhandledException;
95 | }
96 |
97 | private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
98 | {
99 | // TODO: Log and handle exceptions as appropriate.
100 | // https://docs.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.application.unhandledexception.
101 | }
102 |
103 | protected async override void OnLaunched(LaunchActivatedEventArgs args)
104 | {
105 | base.OnLaunched(args);
106 |
107 | App.GetService().Show(string.Format("AppNotificationSamplePayload".GetLocalized(), AppContext.BaseDirectory));
108 |
109 | await App.GetService().ActivateAsync(args);
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Community Installers/VDD Panel/VDD Panel/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Community Installers/VDD Panel/VDD Panel/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Community Installers/VDD Panel/VDD Panel/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Community Installers/VDD Panel/VDD Panel/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Community Installers/VDD Panel/VDD Panel/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Community Installers/VDD Panel/VDD Panel/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Community Installers/VDD Panel/VDD Panel/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Assets/WindowIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Community Installers/VDD Panel/VDD Panel/Assets/WindowIcon.ico
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Behaviors/NavigationViewHeaderBehavior.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 | using Microsoft.UI.Xaml.Controls;
3 | using Microsoft.UI.Xaml.Navigation;
4 | using Microsoft.Xaml.Interactivity;
5 |
6 | using VDD_Panel.Contracts.Services;
7 |
8 | namespace VDD_Panel.Behaviors;
9 |
10 | public class NavigationViewHeaderBehavior : Behavior
11 | {
12 | private static NavigationViewHeaderBehavior? _current;
13 |
14 | private Page? _currentPage;
15 |
16 | public DataTemplate? DefaultHeaderTemplate
17 | {
18 | get; set;
19 | }
20 |
21 | public object DefaultHeader
22 | {
23 | get => GetValue(DefaultHeaderProperty);
24 | set => SetValue(DefaultHeaderProperty, value);
25 | }
26 |
27 | public static readonly DependencyProperty DefaultHeaderProperty =
28 | DependencyProperty.Register("DefaultHeader", typeof(object), typeof(NavigationViewHeaderBehavior), new PropertyMetadata(null, (d, e) => _current!.UpdateHeader()));
29 |
30 | public static NavigationViewHeaderMode GetHeaderMode(Page item) => (NavigationViewHeaderMode)item.GetValue(HeaderModeProperty);
31 |
32 | public static void SetHeaderMode(Page item, NavigationViewHeaderMode value) => item.SetValue(HeaderModeProperty, value);
33 |
34 | public static readonly DependencyProperty HeaderModeProperty =
35 | DependencyProperty.RegisterAttached("HeaderMode", typeof(bool), typeof(NavigationViewHeaderBehavior), new PropertyMetadata(NavigationViewHeaderMode.Always, (d, e) => _current!.UpdateHeader()));
36 |
37 | public static object GetHeaderContext(Page item) => item.GetValue(HeaderContextProperty);
38 |
39 | public static void SetHeaderContext(Page item, object value) => item.SetValue(HeaderContextProperty, value);
40 |
41 | public static readonly DependencyProperty HeaderContextProperty =
42 | DependencyProperty.RegisterAttached("HeaderContext", typeof(object), typeof(NavigationViewHeaderBehavior), new PropertyMetadata(null, (d, e) => _current!.UpdateHeader()));
43 |
44 | public static DataTemplate GetHeaderTemplate(Page item) => (DataTemplate)item.GetValue(HeaderTemplateProperty);
45 |
46 | public static void SetHeaderTemplate(Page item, DataTemplate value) => item.SetValue(HeaderTemplateProperty, value);
47 |
48 | public static readonly DependencyProperty HeaderTemplateProperty =
49 | DependencyProperty.RegisterAttached("HeaderTemplate", typeof(DataTemplate), typeof(NavigationViewHeaderBehavior), new PropertyMetadata(null, (d, e) => _current!.UpdateHeaderTemplate()));
50 |
51 | protected override void OnAttached()
52 | {
53 | base.OnAttached();
54 |
55 | var navigationService = App.GetService();
56 | navigationService.Navigated += OnNavigated;
57 |
58 | _current = this;
59 | }
60 |
61 | protected override void OnDetaching()
62 | {
63 | base.OnDetaching();
64 |
65 | var navigationService = App.GetService();
66 | navigationService.Navigated -= OnNavigated;
67 | }
68 |
69 | private void OnNavigated(object sender, NavigationEventArgs e)
70 | {
71 | if (sender is Frame frame && frame.Content is Page page)
72 | {
73 | _currentPage = page;
74 |
75 | UpdateHeader();
76 | UpdateHeaderTemplate();
77 | }
78 | }
79 |
80 | private void UpdateHeader()
81 | {
82 | if (_currentPage != null)
83 | {
84 | var headerMode = GetHeaderMode(_currentPage);
85 | if (headerMode == NavigationViewHeaderMode.Never)
86 | {
87 | AssociatedObject.Header = null;
88 | AssociatedObject.AlwaysShowHeader = false;
89 | }
90 | else
91 | {
92 | var headerFromPage = GetHeaderContext(_currentPage);
93 | if (headerFromPage != null)
94 | {
95 | AssociatedObject.Header = headerFromPage;
96 | }
97 | else
98 | {
99 | AssociatedObject.Header = DefaultHeader;
100 | }
101 |
102 | if (headerMode == NavigationViewHeaderMode.Always)
103 | {
104 | AssociatedObject.AlwaysShowHeader = true;
105 | }
106 | else
107 | {
108 | AssociatedObject.AlwaysShowHeader = false;
109 | }
110 | }
111 | }
112 | }
113 |
114 | private void UpdateHeaderTemplate()
115 | {
116 | if (_currentPage != null)
117 | {
118 | var headerTemplate = GetHeaderTemplate(_currentPage);
119 | AssociatedObject.HeaderTemplate = headerTemplate ?? DefaultHeaderTemplate;
120 | }
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Behaviors/NavigationViewHeaderMode.cs:
--------------------------------------------------------------------------------
1 | namespace VDD_Panel.Behaviors;
2 |
3 | public enum NavigationViewHeaderMode
4 | {
5 | Always,
6 | Never,
7 | Minimal
8 | }
9 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Contracts/Services/IActivationService.cs:
--------------------------------------------------------------------------------
1 | namespace VDD_Panel.Contracts.Services;
2 |
3 | public interface IActivationService
4 | {
5 | Task ActivateAsync(object activationArgs);
6 | }
7 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Contracts/Services/IAppNotificationService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Specialized;
2 |
3 | namespace VDD_Panel.Contracts.Services;
4 |
5 | public interface IAppNotificationService
6 | {
7 | void Initialize();
8 |
9 | bool Show(string payload);
10 |
11 | NameValueCollection ParseArguments(string arguments);
12 |
13 | void Unregister();
14 | }
15 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Contracts/Services/ILocalSettingsService.cs:
--------------------------------------------------------------------------------
1 | namespace VDD_Panel.Contracts.Services;
2 |
3 | public interface ILocalSettingsService
4 | {
5 | Task ReadSettingAsync(string key);
6 |
7 | Task SaveSettingAsync(string key, T value);
8 | }
9 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Contracts/Services/INavigationService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml.Controls;
2 | using Microsoft.UI.Xaml.Navigation;
3 |
4 | namespace VDD_Panel.Contracts.Services;
5 |
6 | public interface INavigationService
7 | {
8 | event NavigatedEventHandler Navigated;
9 |
10 | bool CanGoBack
11 | {
12 | get;
13 | }
14 |
15 | Frame? Frame
16 | {
17 | get; set;
18 | }
19 |
20 | bool NavigateTo(string pageKey, object? parameter = null, bool clearNavigation = false);
21 |
22 | bool GoBack();
23 | }
24 |
--------------------------------------------------------------------------------
/Community Installers/VDD Panel/VDD Panel/Contracts/Services/INavigationViewService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml.Controls;
2 |
3 | namespace VDD_Panel.Contracts.Services;
4 |
5 | public interface INavigationViewService
6 | {
7 | IList
11 |
12 |
13 |
14 | ## ℹ About
15 |
16 | This project is based on the "Virtual Display Driver" project and tries to improve on it.
17 |
18 | > Based on Microsoft Indirect Display Driver Sample. This creates a virtual display in Windows that acts and functions just like a real one. It's useful for streaming, virtual reality applications, recording, headless servers, etc. The benefit over a physical display is the ability to adjust resolutions and refresh rates beyond the physical displays capabilities. For example, this would enable the ability to stream a game from your home PC using game streaming software at 240hz at 8K while owning a 60hz 1080p monitor (unrealistic, but explains the abilities well). For servers without displays, this enabled remote desktop and screen streaming to other systems as if there were a display installed.
19 |
20 | > Supports emulating resolutions from 640 x 480 to 7680 x 4320 (8K), and refresh rates including 60hz, 75hz, 90hz, 120hz, 144hz, 165hz, 240hz, 480hz, and 500hz.
21 |
22 | > This project uses the official Windows Indirect Display Driver combined with the IddCx class extension driver.
23 |
24 | This project adds an easy to follow setup wizard and installer to install your Virtual Display. The setup wizard also lets you specify how many displays you want to add to your system without having to change any config file yourself.
25 |
26 | I hope you enjoy this project and if you do i would appreciate a star rating :-)
27 |
28 | ## Download Stable Version
29 |
30 | > [!IMPORTANT]
31 | > Please make sure you download the correct version for your operating system!
32 |
33 | - [Windows 10 and 11 (no HDR)](https://github.com/timminator/Virtual-Display-Driver/releases/tag/v1.0.1)
34 | - [Windows 11 23H2+ (HDR)](https://github.com/timminator/Virtual-Display-Driver/releases/tag/v1.0.1)
35 |
36 | ## Download Beta
37 | - [Universal Driver - 24.10.27 (Windows 10/11)](https://github.com/timminator/Virtual-Display-Driver/releases/tag/24.11.01)
38 |
39 | ## Steps to get it running:
40 |
41 | 1. Download the latest release and follow the instructions of the Setup Wizard.
42 |
43 | That's all you have to do! A Virtual Display should be added to your system!
44 |
45 | ## Notes:
46 |
47 | - If you receive a Windows Defender Smartscreen prompt when executing the setup, click on "More info" and then on "Run anyway".
48 |
49 | ## Acknowledgements
50 |
51 | - Huge shootout to the project [nefcon](https://github.com/nefarius/nefcon) by [nefarius](https://github.com/nefarius) and his contributors.
52 | Without this project this unattended installer would not have been possible!
53 | Please check it out aswell.
54 |
55 | ## Further notes for building the installer yourself
56 |
57 | - The installer does not use the latest version of the nefconw.exe because the Virtual Display Driver was not uninstalled correctly using version v1.11.0. Instead version v1.10.0 is used while building the installer using Inno Setup.
58 |
59 |
60 | ## Acknowledgements of the original repo:
61 |
62 | Shoutout to **[Bud](https://github.com/bud3699)** and **[zjoasan](https://github.com/zjoasan)** for jumping on the team and helping with not just support, but lots of great new features!
63 |
64 | Shoutout to **[Roshkins](https://github.com/roshkins/IddSampleDriver)** for the original repo.
65 |
66 | Shoutout to **[Baloukj](https://github.com/baloukj/IddSampleDriver)** for the 8-bit / 10-bit support. (Also, first to push the new Microsoft Driver public!)
67 |
68 | Shoutout to **[Anakngtokwa](https://github.com/Anakngtokwa)** for assisting with finding driver sources.
69 |
70 | **[Microsoft](https://github.com/microsoft/Windows-driver-samples/tree/master/video/IndirectDisplay)** Indirect Display Driver/Sample (Driver code)
71 |
72 | Thanks to **[AKATrevorJay](https://github.com/akatrevorjay/edid-generator)** for the hi-res EDID.
--------------------------------------------------------------------------------
/Setup Installer/Universal Virtual Display Driver/LICENSE_nefcon.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018-2021 Nefarius Software Solutions e.U.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/Setup Installer/Universal Virtual Display Driver/NumberofMonitors.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM Check if the user has provided an argument
3 | if "%~1"=="" (
4 | echo Usage: %0 [number between 1 and 9]
5 | exit /b 1
6 | )
7 |
8 | REM Get the new number from the command line argument
9 | set newNumber=%~1
10 |
11 | REM Validate the new number (must be between 1 and 9)
12 | if "%newNumber%" lss "1" (
13 | echo Error: The number must be between 1 and 9.
14 | exit /b 1
15 | )
16 | if "%newNumber%" gtr "9" (
17 | echo Error: The number must be between 1 and 9.
18 | exit /b 1
19 | )
20 |
21 | REM Paths to the XML input and temporary output files
22 | set inputFile=vdd_settings.xml
23 | set tempFile=temp.xml
24 |
25 | REM Counter for line number
26 | set lineNumber=0
27 |
28 | REM Read the file and replace the fourth line if it contains only "1"
29 | (
30 | for /f "delims=" %%a in ('type "%inputFile%"') do (
31 | set /a lineNumber+=1
32 | set "line=%%a"
33 | setlocal enabledelayedexpansion
34 |
35 | if !lineNumber! equ 4 (
36 | if "!line!"==" 1" (
37 | echo ^%newNumber%^
38 | ) else (
39 | echo:!line!
40 | )
41 | ) else (
42 | echo:!line!
43 | )
44 |
45 | endlocal
46 | )
47 | ) > "%tempFile%"
48 |
49 | REM Replace the original file with the modified version and suppress output
50 | move /Y "%tempFile%" "%inputFile%" >nul 2>&1
--------------------------------------------------------------------------------
/Setup Installer/Universal Virtual Display Driver/Setup.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal
3 |
4 | set CERTIFICATE="%~dp0Virtual_Display_Driver.cer"
5 |
6 | IF "%1"=="install" (
7 | rem Run install
8 | C:\VirtualDisplayDriver\nefconw.exe --remove-device-node --hardware-id Root\MttVDD --class-guid 4d36e968-e325-11ce-bfc1-08002be10318
9 | certutil -addstore -f root %CERTIFICATE%
10 | certutil -addstore -f TrustedPublisher %CERTIFICATE%
11 | C:\VirtualDisplayDriver\nefconw.exe --create-device-node --hardware-id Root\MttVDD --class-name Display --class-guid 4D36E968-E325-11CE-BFC1-08002BE10318
12 | C:\VirtualDisplayDriver\nefconw.exe --install-driver --inf-path C:\VirtualDisplayDriver\MttVDD.inf
13 | )
14 |
15 | IF "%1"=="uninstall" (
16 | rem Run uninstall commands
17 | C:\VirtualDisplayDriver\nefconw.exe --remove-device-node --hardware-id Root\MttVDD --class-guid 4d36e968-e325-11ce-bfc1-08002be10318
18 | )
19 |
20 | IF "%1"=="" (
21 | echo Missing argument! Valid arguments are "install" or "uninstall".
22 | )
23 |
24 | endlocal
--------------------------------------------------------------------------------
/Setup Installer/Universal Virtual Display Driver/Setup.iss:
--------------------------------------------------------------------------------
1 | #define MyAppName "Universal Virtual Display Driver"
2 | #define MyAppPublisher "MikeTheTech"
3 | #define MyAppVersion "1.0.0"
4 | #define MyAppURL "https://github.com/timminator/Virtual-Display-Driver"
5 | #define InstallPath "C:\VirtualDisplayDriver"
6 |
7 | [Setup]
8 | SignTool=signtool $f
9 | AppId={{85ECF661-C369-443D-846B-285CFB698447}
10 | AppName={#MyAppName}
11 | AppVersion={#MyAppVersion}
12 | AppPublisher={#MyAppPublisher}
13 | AppPublisherURL={#MyAppURL}
14 | AppSupportURL={#MyAppURL}
15 | AppUpdatesURL={#MyAppURL}
16 | DefaultDirName={#InstallPath}
17 | DisableDirPage=yes
18 | UsePreviousAppDir=yes
19 | LicenseFile=..\LICENSE
20 | DisableProgramGroupPage=yes
21 | PrivilegesRequired=admin
22 | OutputBaseFilename={#MyAppName}-v{#MyAppVersion}-setup-x64
23 | SetupIconFile=..\{#MyAppName}.ico
24 | Compression=lzma
25 | SolidCompression=yes
26 | WizardStyle=classic
27 | UninstallDisplayName={#MyAppName}
28 | UninstallDisplayIcon={uninstallexe}
29 |
30 | [Languages]
31 | Name: "english"; MessagesFile: "compiler:Default.isl"
32 |
33 | [Dirs]
34 | Name: "{app}"; Permissions: everyone-full
35 |
36 | [Files]
37 | Source: "..\mttvdd.cat"; DestDir: "{app}"; Flags: ignoreversion
38 | Source: "..\MttVDD.dll"; DestDir: "{app}"; Flags: ignoreversion
39 | Source: "..\Virtual_Display_Driver.cer"; DestDir: "{app}"; Flags: ignoreversion
40 | Source: "..\MttVDD.inf"; DestDir: "{app}"; Flags: ignoreversion
41 | Source: "..\Setup.bat"; DestDir: "{app}"; Flags: ignoreversion
42 | Source: "..\vdd_settings.xml"; DestDir: "{app}"; Flags: ignoreversion
43 | Source: "..\NumberofMonitors.bat"; DestDir: "{app}"; Flags: ignoreversion; AfterInstall: AfterInstall
44 | Source: "..\nefconw.exe"; DestDir: "{app}"; Flags: ignoreversion
45 | Source: "..\LICENSE_nefcon.txt"; Flags: dontcopy
46 |
47 | [Code]
48 | var
49 | LicenseAcceptedRadioButtons: array of TRadioButton;
50 |
51 | procedure CheckLicenseAccepted(Sender: TObject);
52 | begin
53 | // Update Next button when user (un)accepts the license
54 | WizardForm.NextButton.Enabled :=
55 | LicenseAcceptedRadioButtons[TComponent(Sender).Tag].Checked;
56 | end;
57 |
58 | procedure LicensePageActivate(Sender: TWizardPage);
59 | begin
60 | // Update Next button when user gets to second license page
61 | CheckLicenseAccepted(LicenseAcceptedRadioButtons[Sender.Tag]);
62 | end;
63 |
64 | function CloneLicenseRadioButton(
65 | Page: TWizardPage; Source: TRadioButton): TRadioButton;
66 | begin
67 | Result := TRadioButton.Create(WizardForm);
68 | Result.Parent := Page.Surface;
69 | Result.Caption := Source.Caption;
70 | Result.Left := Source.Left;
71 | Result.Top := Source.Top;
72 | Result.Width := Source.Width;
73 | Result.Height := Source.Height;
74 | // Needed for WizardStyle=modern / WizardResizable=yes
75 | Result.Anchors := Source.Anchors;
76 | Result.OnClick := @CheckLicenseAccepted;
77 | Result.Tag := Page.Tag;
78 | end;
79 |
80 | var
81 | LicenseAfterPage: Integer;
82 |
83 | procedure AddLicensePage(LicenseFileName: string);
84 | var
85 | Idx: Integer;
86 | Page: TOutputMsgMemoWizardPage;
87 | LicenseFilePath: string;
88 | RadioButton: TRadioButton;
89 | begin
90 | Idx := GetArrayLength(LicenseAcceptedRadioButtons);
91 | SetArrayLength(LicenseAcceptedRadioButtons, Idx + 1);
92 |
93 | Page :=
94 | CreateOutputMsgMemoPage(
95 | LicenseAfterPage, SetupMessage(msgWizardLicense),
96 | SetupMessage(msgLicenseLabel), SetupMessage(msgLicenseLabel3), '');
97 | Page.Tag := Idx;
98 |
99 | // Shrink license box to make space for radio buttons
100 | Page.RichEditViewer.Height := WizardForm.LicenseMemo.Height;
101 | Page.OnActivate := @LicensePageActivate;
102 |
103 | // Load license
104 | // Loading ex-post, as Lines.LoadFromFile supports UTF-8,
105 | // contrary to LoadStringFromFile.
106 | ExtractTemporaryFile(LicenseFileName);
107 | LicenseFilePath := ExpandConstant('{tmp}\' + LicenseFileName);
108 | Page.RichEditViewer.Lines.LoadFromFile(LicenseFilePath);
109 | DeleteFile(LicenseFilePath);
110 |
111 | // Clone accept/do not accept radio buttons
112 | RadioButton :=
113 | CloneLicenseRadioButton(Page, WizardForm.LicenseAcceptedRadio);
114 | LicenseAcceptedRadioButtons[Idx] := RadioButton;
115 |
116 | RadioButton :=
117 | CloneLicenseRadioButton(Page, WizardForm.LicenseNotAcceptedRadio);
118 | // Initially not accepted
119 | RadioButton.Checked := True;
120 |
121 | LicenseAfterPage := Page.ID;
122 | end;
123 |
124 | var
125 | Page: TWizardPage;
126 | MonitorsEdit: TEdit;
127 | MonitorsLabel: TLabel;
128 |
129 | procedure InitializeWizard();
130 | begin
131 | LicenseAfterPage := wpLicense;
132 | AddLicensePage('LICENSE_nefcon.txt');
133 | // Create a custom page
134 | Page := CreateCustomPage(LicenseAfterPage, 'Virtual Display Configuration',
135 | 'Choose how many virtual displays you want to add to your system.');
136 |
137 | // Create a label for the message
138 | MonitorsLabel := TLabel.Create(Page);
139 | MonitorsLabel.Parent := Page.Surface;
140 | MonitorsLabel.Caption := 'Choose how many virtual displays you want to add to your system.'#13#10'A maximum of 4 displays is recommended.';
141 | MonitorsLabel.Left := 10;
142 | MonitorsLabel.Top := 10;
143 | MonitorsLabel.Width := Page.SurfaceWidth - 20;
144 | MonitorsLabel.AutoSize := True;
145 | MonitorsLabel.WordWrap := True;
146 |
147 | // Create an edit box for user input
148 | MonitorsEdit := TEdit.Create(Page);
149 | MonitorsEdit.Parent := Page.Surface;
150 | MonitorsEdit.Left := 10;
151 | MonitorsEdit.Top := MonitorsLabel.Top + MonitorsLabel.Height + 10;
152 | MonitorsEdit.Width := Page.SurfaceWidth - 20;
153 | MonitorsEdit.Text := '1'; // Default value
154 | end;
155 |
156 | procedure RunBatchFile(FileName: String; Params: String);
157 | var
158 | ResultCode: Integer;
159 | begin
160 | Exec(ExpandConstant(FileName), Params, '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
161 | end;
162 |
163 | procedure AfterInstall;
164 | var
165 | NumberOfMonitors: String;
166 | begin
167 | // Get the number of monitors from the user input
168 | NumberOfMonitors := MonitorsEdit.Text;
169 |
170 | // Run the batch file with the user input as an argument
171 | RunBatchFile(ExpandConstant('{app}\NumberofMonitors.bat'), NumberOfMonitors);
172 | end;
173 |
174 | var
175 | isSilent: Boolean;
176 |
177 | function InitializeSetup(): Boolean;
178 | var
179 | j: Integer;
180 | begin
181 | Result := True;
182 | IsSilent := False;
183 | for j := 1 to ParamCount do
184 | begin
185 | if (CompareText(ParamStr(j), '/verysilent') = 0) or
186 | (CompareText(ParamStr(j), '/silent') = 0) then
187 | begin
188 | IsSilent := True;
189 | Break;
190 | end;
191 | end;
192 | end;
193 |
194 | procedure CurPageChanged(CurPageID: Integer);
195 | var
196 | I: Integer;
197 | begin
198 | // Automatically accept licenses if running in silent mode
199 | if IsSilent then
200 | begin
201 | for I := 0 to GetArrayLength(LicenseAcceptedRadioButtons) - 1 do
202 | begin
203 | LicenseAcceptedRadioButtons[I].Checked := True;
204 | end;
205 | end;
206 | end;
207 |
208 | [Run]
209 | Filename: "{app}\Setup.bat"; Parameters: "install"; Flags: runhidden
210 |
211 | [UninstallRun]
212 | Filename: "{app}\Setup.bat"; Parameters: "uninstall"; Flags: runhidden
--------------------------------------------------------------------------------
/Setup Installer/Universal Virtual Display Driver/Universal Virtual Display Driver.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Setup Installer/Universal Virtual Display Driver/Universal Virtual Display Driver.ico
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver HDR v1.0.0/LICENSE_nefcon.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018-2021 Nefarius Software Solutions e.U.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver HDR v1.0.0/NumberofMonitors.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM Check if the user has provided an argument
3 | if "%~1"=="" (
4 | echo Usage: %0 [number between 1 and 9]
5 | exit /b 1
6 | )
7 |
8 | REM Get the new number from the command line argument
9 | set newNumber=%~1
10 |
11 | REM Validate the new number (must be between 1 and 9)
12 | if "%newNumber%" lss "1" (
13 | echo Error: The number must be between 1 and 9.
14 | exit /b 1
15 | )
16 | if "%newNumber%" gtr "9" (
17 | echo Error: The number must be between 1 and 9.
18 | exit /b 1
19 | )
20 |
21 | REM Path to the input and temporary files
22 | set inputFile=option.txt
23 | set tempFile=temp.txt
24 |
25 | REM Read the first line and replace it with the new number
26 | > %tempFile% (
27 | echo %newNumber%
28 | more +1 %inputFile%
29 | )
30 |
31 | REM Replace the original file with the updated file and suppress output
32 | move /Y %tempFile% %inputFile% >nul 2>&1
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver HDR v1.0.0/Setup.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal
3 |
4 | set CERTIFICATE="%~dp0Virtual_Display_Driver.cer"
5 |
6 | IF "%1"=="install" (
7 | rem Run install
8 | C:\IddSampleDriver\nefconw.exe --remove-device-node --hardware-id ROOT\iddsampledriver --class-guid 4d36e968-e325-11ce-bfc1-08002be10318
9 | certutil -addstore -f root %CERTIFICATE%
10 | certutil -addstore -f TrustedPublisher %CERTIFICATE%
11 | C:\IddSampleDriver\nefconw.exe --create-device-node --hardware-id ROOT\iddsampledriver --class-name Display --class-guid 4D36E968-E325-11CE-BFC1-08002BE10318
12 | C:\IddSampleDriver\nefconw.exe --install-driver --inf-path C:\IddSampleDriver\IddSampleDriver.inf
13 | )
14 |
15 | IF "%1"=="uninstall" (
16 | rem Run uninstall commands
17 | C:\IddSampleDriver\nefconw.exe --remove-device-node --hardware-id ROOT\iddsampledriver --class-guid 4d36e968-e325-11ce-bfc1-08002be10318
18 | del "%~dp0option.txt"
19 | )
20 |
21 | IF "%1"=="" (
22 | echo Missing argument! Valid arguments are "install" or "uninstall".
23 | )
24 |
25 | endlocal
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver HDR v1.0.0/Setup.iss:
--------------------------------------------------------------------------------
1 | #define MyAppName "Virtual Display Driver HDR"
2 | #define MyAppVersion "1.0.1"
3 | #define MyAppURL "https://github.com/timminator/Virtual-Display-Driver"
4 | #define InstallPath "C:\IddSampleDriver"
5 |
6 | [Setup]
7 | SignTool=signtool $f
8 | AppId={{3A1D1EE3-1A2D-4EA2-AA99-58D631C25263}
9 | AppName={#MyAppName}
10 | AppVersion={#MyAppVersion}
11 | AppPublisherURL={#MyAppURL}
12 | AppSupportURL={#MyAppURL}
13 | AppUpdatesURL={#MyAppURL}
14 | DefaultDirName={#InstallPath}
15 | MinVersion=10.0.22621
16 | DisableDirPage=yes
17 | UsePreviousAppDir=yes
18 | LicenseFile=..\..\LICENSE
19 | DisableProgramGroupPage=yes
20 | PrivilegesRequired=admin
21 | OutputBaseFilename={#MyAppName}-v{#MyAppVersion}-setup-x64
22 | SetupIconFile=..\{#MyAppName}.ico
23 | Compression=lzma
24 | SolidCompression=yes
25 | WizardStyle=classic
26 | UninstallDisplayName={#MyAppName}
27 | UninstallDisplayIcon={uninstallexe}
28 |
29 | [Languages]
30 | Name: "english"; MessagesFile: "compiler:Default.isl"
31 |
32 | [Dirs]
33 | Name: "{app}"; Permissions: everyone-full
34 |
35 | [Files]
36 | Source: ".\iddsampledriver.cat"; DestDir: "{app}"; Flags: ignoreversion
37 | Source: ".\IddSampleDriver.dll"; DestDir: "{app}"; Flags: ignoreversion
38 | Source: ".\Virtual_Display_Driver.cer"; DestDir: "{app}"; Flags: ignoreversion
39 | Source: ".\IddSampleDriver.inf"; DestDir: "{app}"; Flags: ignoreversion
40 | Source: ".\Setup.bat"; DestDir: "{app}"; Flags: ignoreversion
41 | Source: ".\option.txt"; DestDir: "{app}"; Flags: ignoreversion
42 | Source: ".\NumberofMonitors.bat"; DestDir: "{app}"; Flags: ignoreversion; AfterInstall: AfterInstall
43 | Source: ".\nefconw.exe"; DestDir: "{app}"; Flags: ignoreversion
44 | Source: ".\LICENSE_nefcon.txt"; Flags: dontcopy
45 |
46 | [Code]
47 | var
48 | LicenseAcceptedRadioButtons: array of TRadioButton;
49 |
50 | procedure CheckLicenseAccepted(Sender: TObject);
51 | begin
52 | // Update Next button when user (un)accepts the license
53 | WizardForm.NextButton.Enabled :=
54 | LicenseAcceptedRadioButtons[TComponent(Sender).Tag].Checked;
55 | end;
56 |
57 | procedure LicensePageActivate(Sender: TWizardPage);
58 | begin
59 | // Update Next button when user gets to second license page
60 | CheckLicenseAccepted(LicenseAcceptedRadioButtons[Sender.Tag]);
61 | end;
62 |
63 | function CloneLicenseRadioButton(
64 | Page: TWizardPage; Source: TRadioButton): TRadioButton;
65 | begin
66 | Result := TRadioButton.Create(WizardForm);
67 | Result.Parent := Page.Surface;
68 | Result.Caption := Source.Caption;
69 | Result.Left := Source.Left;
70 | Result.Top := Source.Top;
71 | Result.Width := Source.Width;
72 | Result.Height := Source.Height;
73 | // Needed for WizardStyle=modern / WizardResizable=yes
74 | Result.Anchors := Source.Anchors;
75 | Result.OnClick := @CheckLicenseAccepted;
76 | Result.Tag := Page.Tag;
77 | end;
78 |
79 | var
80 | LicenseAfterPage: Integer;
81 |
82 | procedure AddLicensePage(LicenseFileName: string);
83 | var
84 | Idx: Integer;
85 | Page: TOutputMsgMemoWizardPage;
86 | LicenseFilePath: string;
87 | RadioButton: TRadioButton;
88 | begin
89 | Idx := GetArrayLength(LicenseAcceptedRadioButtons);
90 | SetArrayLength(LicenseAcceptedRadioButtons, Idx + 1);
91 |
92 | Page :=
93 | CreateOutputMsgMemoPage(
94 | LicenseAfterPage, SetupMessage(msgWizardLicense),
95 | SetupMessage(msgLicenseLabel), SetupMessage(msgLicenseLabel3), '');
96 | Page.Tag := Idx;
97 |
98 | // Shrink license box to make space for radio buttons
99 | Page.RichEditViewer.Height := WizardForm.LicenseMemo.Height;
100 | Page.OnActivate := @LicensePageActivate;
101 |
102 | // Load license
103 | // Loading ex-post, as Lines.LoadFromFile supports UTF-8,
104 | // contrary to LoadStringFromFile.
105 | ExtractTemporaryFile(LicenseFileName);
106 | LicenseFilePath := ExpandConstant('{tmp}\' + LicenseFileName);
107 | Page.RichEditViewer.Lines.LoadFromFile(LicenseFilePath);
108 | DeleteFile(LicenseFilePath);
109 |
110 | // Clone accept/do not accept radio buttons
111 | RadioButton :=
112 | CloneLicenseRadioButton(Page, WizardForm.LicenseAcceptedRadio);
113 | LicenseAcceptedRadioButtons[Idx] := RadioButton;
114 |
115 | RadioButton :=
116 | CloneLicenseRadioButton(Page, WizardForm.LicenseNotAcceptedRadio);
117 | // Initially not accepted
118 | RadioButton.Checked := True;
119 |
120 | LicenseAfterPage := Page.ID;
121 | end;
122 |
123 | var
124 | Page: TWizardPage;
125 | MonitorsEdit: TEdit;
126 | MonitorsLabel: TLabel;
127 |
128 | procedure InitializeWizard();
129 | begin
130 | LicenseAfterPage := wpLicense;
131 | AddLicensePage('LICENSE_nefcon.txt');
132 | // Create a custom page
133 | Page := CreateCustomPage(LicenseAfterPage, 'Virtual Display Configuration',
134 | 'Choose how many virtual displays you want to add to your system.');
135 |
136 | // Create a label for the message
137 | MonitorsLabel := TLabel.Create(Page);
138 | MonitorsLabel.Parent := Page.Surface;
139 | MonitorsLabel.Caption := 'Choose how many virtual displays you want to add to your system.'#13#10'A maximum of 4 displays is recommended.';
140 | MonitorsLabel.Left := 10;
141 | MonitorsLabel.Top := 10;
142 | MonitorsLabel.Width := Page.SurfaceWidth - 20;
143 | MonitorsLabel.AutoSize := True;
144 | MonitorsLabel.WordWrap := True;
145 |
146 | // Create an edit box for user input
147 | MonitorsEdit := TEdit.Create(Page);
148 | MonitorsEdit.Parent := Page.Surface;
149 | MonitorsEdit.Left := 10;
150 | MonitorsEdit.Top := MonitorsLabel.Top + MonitorsLabel.Height + 10;
151 | MonitorsEdit.Width := Page.SurfaceWidth - 20;
152 | MonitorsEdit.Text := '1'; // Default value
153 | end;
154 |
155 | procedure RunBatchFile(FileName: String; Params: String);
156 | var
157 | ResultCode: Integer;
158 | begin
159 | Exec(ExpandConstant(FileName), Params, '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
160 | end;
161 |
162 | procedure AfterInstall;
163 | var
164 | NumberOfMonitors: String;
165 | begin
166 | // Get the number of monitors from the user input
167 | NumberOfMonitors := MonitorsEdit.Text;
168 |
169 | // Run the batch file with the user input as an argument
170 | RunBatchFile(ExpandConstant('{app}\NumberofMonitors.bat'), NumberOfMonitors);
171 | end;
172 |
173 | var
174 | isSilent: Boolean;
175 |
176 | function InitializeSetup(): Boolean;
177 | var
178 | j: Integer;
179 | begin
180 | Result := True;
181 | IsSilent := False;
182 | for j := 1 to ParamCount do
183 | begin
184 | if (CompareText(ParamStr(j), '/verysilent') = 0) or
185 | (CompareText(ParamStr(j), '/silent') = 0) then
186 | begin
187 | IsSilent := True;
188 | Break;
189 | end;
190 | end;
191 | end;
192 |
193 | procedure CurPageChanged(CurPageID: Integer);
194 | var
195 | I: Integer;
196 | begin
197 | // Automatically accept licenses if running in silent mode
198 | if IsSilent then
199 | begin
200 | for I := 0 to GetArrayLength(LicenseAcceptedRadioButtons) - 1 do
201 | begin
202 | LicenseAcceptedRadioButtons[I].Checked := True;
203 | end;
204 | end;
205 | end;
206 |
207 | [Run]
208 | Filename: "{app}\Setup.bat"; Parameters: "install"; Flags: runhidden
209 |
210 | [UninstallRun]
211 | Filename: "{app}\Setup.bat"; Parameters: "uninstall"; Flags: runhidden
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver HDR v1.0.0/Virtual Display Driver HDR.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Setup Installer/Virtual Display Driver HDR v1.0.0/Virtual Display Driver HDR.ico
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver v1.0.0/LICENSE_nefcon.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018-2021 Nefarius Software Solutions e.U.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver v1.0.0/NumberofMonitors.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM Check if the user has provided an argument
3 | if "%~1"=="" (
4 | echo Usage: %0 [number between 1 and 9]
5 | exit /b 1
6 | )
7 |
8 | REM Get the new number from the command line argument
9 | set newNumber=%~1
10 |
11 | REM Validate the new number (must be between 1 and 9)
12 | if "%newNumber%" lss "1" (
13 | echo Error: The number must be between 1 and 9.
14 | exit /b 1
15 | )
16 | if "%newNumber%" gtr "9" (
17 | echo Error: The number must be between 1 and 9.
18 | exit /b 1
19 | )
20 |
21 | REM Path to the input and temporary files
22 | set inputFile=option.txt
23 | set tempFile=temp.txt
24 |
25 | REM Read the first line and replace it with the new number
26 | > %tempFile% (
27 | echo %newNumber%
28 | more +1 %inputFile%
29 | )
30 |
31 | REM Replace the original file with the updated file and suppress output
32 | move /Y %tempFile% %inputFile% >nul 2>&1
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver v1.0.0/Setup.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | setlocal
3 |
4 | set CERTIFICATE="%~dp0Virtual_Display_Driver.cer"
5 |
6 | IF "%1"=="install" (
7 | rem Run install
8 | C:\IddSampleDriver\nefconw.exe --remove-device-node --hardware-id ROOT\iddsampledriver --class-guid 4d36e968-e325-11ce-bfc1-08002be10318
9 | certutil -addstore -f root %CERTIFICATE%
10 | certutil -addstore -f TrustedPublisher %CERTIFICATE%
11 | C:\IddSampleDriver\nefconw.exe --create-device-node --hardware-id ROOT\iddsampledriver --class-name Display --class-guid 4D36E968-E325-11CE-BFC1-08002BE10318
12 | C:\IddSampleDriver\nefconw.exe --install-driver --inf-path C:\IddSampleDriver\IddSampleDriver.inf
13 | )
14 |
15 | IF "%1"=="uninstall" (
16 | rem Run uninstall commands
17 | C:\IddSampleDriver\nefconw.exe --remove-device-node --hardware-id ROOT\iddsampledriver --class-guid 4d36e968-e325-11ce-bfc1-08002be10318
18 | del "%~dp0option.txt"
19 | )
20 |
21 | IF "%1"=="" (
22 | echo Missing argument! Valid arguments are "install" or "uninstall".
23 | )
24 |
25 | endlocal
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver v1.0.0/Setup.iss:
--------------------------------------------------------------------------------
1 | #define MyAppName "Virtual Display Driver"
2 | #define MyAppVersion "1.0.1"
3 | #define MyAppURL "https://github.com/timminator/Virtual-Display-Driver"
4 | #define InstallPath "C:\IddSampleDriver"
5 |
6 | [Setup]
7 | SignTool=signtool $f
8 | AppId={{3A1D1EE3-1A2D-4EA2-AA99-58D631C25263}
9 | AppName={#MyAppName}
10 | AppVersion={#MyAppVersion}
11 | AppPublisherURL={#MyAppURL}
12 | AppSupportURL={#MyAppURL}
13 | AppUpdatesURL={#MyAppURL}
14 | DefaultDirName={#InstallPath}
15 | MinVersion=10.0.14393
16 | DisableDirPage=yes
17 | UsePreviousAppDir=yes
18 | LicenseFile=..\..\LICENSE
19 | DisableProgramGroupPage=yes
20 | PrivilegesRequired=admin
21 | OutputBaseFilename={#MyAppName}-v{#MyAppVersion}-setup-x64
22 | SetupIconFile=..\{#MyAppName}.ico
23 | Compression=lzma
24 | SolidCompression=yes
25 | WizardStyle=classic
26 | UninstallDisplayName={#MyAppName}
27 | UninstallDisplayIcon={uninstallexe}
28 |
29 | [Languages]
30 | Name: "english"; MessagesFile: "compiler:Default.isl"
31 |
32 | [Dirs]
33 | Name: "{app}"; Permissions: everyone-full
34 |
35 | [Files]
36 | Source: ".\iddsampledriver.cat"; DestDir: "{app}"; Flags: ignoreversion
37 | Source: ".\IddSampleDriver.dll"; DestDir: "{app}"; Flags: ignoreversion
38 | Source: ".\Virtual_Display_Driver.cer"; DestDir: "{app}"; Flags: ignoreversion
39 | Source: ".\IddSampleDriver.inf"; DestDir: "{app}"; Flags: ignoreversion
40 | Source: ".\Setup.bat"; DestDir: "{app}"; Flags: ignoreversion
41 | Source: ".\option.txt"; DestDir: "{app}"; Flags: ignoreversion
42 | Source: ".\NumberofMonitors.bat"; DestDir: "{app}"; Flags: ignoreversion; AfterInstall: AfterInstall
43 | Source: ".\nefconw.exe"; DestDir: "{app}"; Flags: ignoreversion
44 | Source: ".\LICENSE_nefcon.txt"; Flags: dontcopy
45 |
46 | [Code]
47 | var
48 | LicenseAcceptedRadioButtons: array of TRadioButton;
49 |
50 | procedure CheckLicenseAccepted(Sender: TObject);
51 | begin
52 | // Update Next button when user (un)accepts the license
53 | WizardForm.NextButton.Enabled :=
54 | LicenseAcceptedRadioButtons[TComponent(Sender).Tag].Checked;
55 | end;
56 |
57 | procedure LicensePageActivate(Sender: TWizardPage);
58 | begin
59 | // Update Next button when user gets to second license page
60 | CheckLicenseAccepted(LicenseAcceptedRadioButtons[Sender.Tag]);
61 | end;
62 |
63 | function CloneLicenseRadioButton(
64 | Page: TWizardPage; Source: TRadioButton): TRadioButton;
65 | begin
66 | Result := TRadioButton.Create(WizardForm);
67 | Result.Parent := Page.Surface;
68 | Result.Caption := Source.Caption;
69 | Result.Left := Source.Left;
70 | Result.Top := Source.Top;
71 | Result.Width := Source.Width;
72 | Result.Height := Source.Height;
73 | // Needed for WizardStyle=modern / WizardResizable=yes
74 | Result.Anchors := Source.Anchors;
75 | Result.OnClick := @CheckLicenseAccepted;
76 | Result.Tag := Page.Tag;
77 | end;
78 |
79 | var
80 | LicenseAfterPage: Integer;
81 |
82 | procedure AddLicensePage(LicenseFileName: string);
83 | var
84 | Idx: Integer;
85 | Page: TOutputMsgMemoWizardPage;
86 | LicenseFilePath: string;
87 | RadioButton: TRadioButton;
88 | begin
89 | Idx := GetArrayLength(LicenseAcceptedRadioButtons);
90 | SetArrayLength(LicenseAcceptedRadioButtons, Idx + 1);
91 |
92 | Page :=
93 | CreateOutputMsgMemoPage(
94 | LicenseAfterPage, SetupMessage(msgWizardLicense),
95 | SetupMessage(msgLicenseLabel), SetupMessage(msgLicenseLabel3), '');
96 | Page.Tag := Idx;
97 |
98 | // Shrink license box to make space for radio buttons
99 | Page.RichEditViewer.Height := WizardForm.LicenseMemo.Height;
100 | Page.OnActivate := @LicensePageActivate;
101 |
102 | // Load license
103 | // Loading ex-post, as Lines.LoadFromFile supports UTF-8,
104 | // contrary to LoadStringFromFile.
105 | ExtractTemporaryFile(LicenseFileName);
106 | LicenseFilePath := ExpandConstant('{tmp}\' + LicenseFileName);
107 | Page.RichEditViewer.Lines.LoadFromFile(LicenseFilePath);
108 | DeleteFile(LicenseFilePath);
109 |
110 | // Clone accept/do not accept radio buttons
111 | RadioButton :=
112 | CloneLicenseRadioButton(Page, WizardForm.LicenseAcceptedRadio);
113 | LicenseAcceptedRadioButtons[Idx] := RadioButton;
114 |
115 | RadioButton :=
116 | CloneLicenseRadioButton(Page, WizardForm.LicenseNotAcceptedRadio);
117 | // Initially not accepted
118 | RadioButton.Checked := True;
119 |
120 | LicenseAfterPage := Page.ID;
121 | end;
122 |
123 | var
124 | Page: TWizardPage;
125 | MonitorsEdit: TEdit;
126 | MonitorsLabel: TLabel;
127 |
128 | procedure InitializeWizard();
129 | begin
130 | LicenseAfterPage := wpLicense;
131 | AddLicensePage('LICENSE_nefcon.txt');
132 | // Create a custom page
133 | Page := CreateCustomPage(LicenseAfterPage, 'Virtual Display Configuration',
134 | 'Choose how many virtual displays you want to add to your system.');
135 |
136 | // Create a label for the message
137 | MonitorsLabel := TLabel.Create(Page);
138 | MonitorsLabel.Parent := Page.Surface;
139 | MonitorsLabel.Caption := 'Choose how many virtual displays you want to add to your system.'#13#10'A maximum of 4 displays is recommended.';
140 | MonitorsLabel.Left := 10;
141 | MonitorsLabel.Top := 10;
142 | MonitorsLabel.Width := Page.SurfaceWidth - 20;
143 | MonitorsLabel.AutoSize := True;
144 | MonitorsLabel.WordWrap := True;
145 |
146 | // Create an edit box for user input
147 | MonitorsEdit := TEdit.Create(Page);
148 | MonitorsEdit.Parent := Page.Surface;
149 | MonitorsEdit.Left := 10;
150 | MonitorsEdit.Top := MonitorsLabel.Top + MonitorsLabel.Height + 10;
151 | MonitorsEdit.Width := Page.SurfaceWidth - 20;
152 | MonitorsEdit.Text := '1'; // Default value
153 | end;
154 |
155 | procedure RunBatchFile(FileName: String; Params: String);
156 | var
157 | ResultCode: Integer;
158 | begin
159 | Exec(ExpandConstant(FileName), Params, '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
160 | end;
161 |
162 | procedure AfterInstall;
163 | var
164 | NumberOfMonitors: String;
165 | begin
166 | // Get the number of monitors from the user input
167 | NumberOfMonitors := MonitorsEdit.Text;
168 |
169 | // Run the batch file with the user input as an argument
170 | RunBatchFile(ExpandConstant('{app}\NumberofMonitors.bat'), NumberOfMonitors);
171 | end;
172 |
173 | var
174 | isSilent: Boolean;
175 |
176 | function InitializeSetup(): Boolean;
177 | var
178 | j: Integer;
179 | begin
180 | Result := True;
181 | IsSilent := False;
182 | for j := 1 to ParamCount do
183 | begin
184 | if (CompareText(ParamStr(j), '/verysilent') = 0) or
185 | (CompareText(ParamStr(j), '/silent') = 0) then
186 | begin
187 | IsSilent := True;
188 | Break;
189 | end;
190 | end;
191 | end;
192 |
193 | procedure CurPageChanged(CurPageID: Integer);
194 | var
195 | I: Integer;
196 | begin
197 | // Automatically accept licenses if running in silent mode
198 | if IsSilent then
199 | begin
200 | for I := 0 to GetArrayLength(LicenseAcceptedRadioButtons) - 1 do
201 | begin
202 | LicenseAcceptedRadioButtons[I].Checked := True;
203 | end;
204 | end;
205 | end;
206 |
207 | [Run]
208 | Filename: "{app}\Setup.bat"; Parameters: "install"; Flags: runhidden
209 |
210 | [UninstallRun]
211 | Filename: "{app}\Setup.bat"; Parameters: "uninstall"; Flags: runhidden
--------------------------------------------------------------------------------
/Setup Installer/Virtual Display Driver v1.0.0/Virtual Display Driver.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Setup Installer/Virtual Display Driver v1.0.0/Virtual Display Driver.ico
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/8K240HzHDR.edid:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Virtual Display Driver (HDR)/8K240HzHDR.edid
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/CppProperties.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "inheritEnvironments": [
5 | "msvc_x64"
6 | ],
7 | "name": "x64-Debug",
8 | "includePath": [
9 | "${env.INCLUDE}",
10 | "${workspaceRoot}\\**"
11 | ],
12 | "defines": [
13 | "WIN32",
14 | "_DEBUG",
15 | "UNICODE",
16 | "_UNICODE"
17 | ],
18 | "intelliSenseMode": "windows-msvc-x64"
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/MttVDD.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31129.286
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MttVDD", "MttVDD\MttVDD.vcxproj", "{2D54CB75-8B17-4F11-97DC-847B0244CD46}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|ARM = Debug|ARM
11 | Debug|ARM64 = Debug|ARM64
12 | Debug|x64 = Debug|x64
13 | Debug|x86 = Debug|x86
14 | Release|ARM = Release|ARM
15 | Release|ARM64 = Release|ARM64
16 | Release|x64 = Release|x64
17 | Release|x86 = Release|x86
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM.ActiveCfg = Debug|x64
21 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM.Build.0 = Debug|x64
22 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM.Deploy.0 = Debug|x64
23 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM64.ActiveCfg = Debug|ARM64
24 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM64.Build.0 = Debug|ARM64
25 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM64.Deploy.0 = Debug|ARM64
26 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.ActiveCfg = Debug|x64
27 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.Build.0 = Debug|x64
28 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.Deploy.0 = Debug|x64
29 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.ActiveCfg = Debug|Win32
30 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.Build.0 = Debug|Win32
31 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.Deploy.0 = Debug|Win32
32 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM.ActiveCfg = Release|ARM
33 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM.Build.0 = Release|ARM
34 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM.Deploy.0 = Release|ARM
35 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.ActiveCfg = Release|ARM64
36 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.Build.0 = Release|ARM64
37 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.Deploy.0 = Release|ARM64
38 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.ActiveCfg = Release|x64
39 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Build.0 = Release|x64
40 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Deploy.0 = Release|x64
41 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.ActiveCfg = Release|Win32
42 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Build.0 = Release|Win32
43 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Deploy.0 = Release|Win32
44 | EndGlobalSection
45 | GlobalSection(SolutionProperties) = preSolution
46 | HideSolutionNode = FALSE
47 | EndGlobalSection
48 | GlobalSection(ExtensibilityGlobals) = postSolution
49 | SolutionGuid = {DE75497E-BE4F-4215-8345-84C5F8358E3B}
50 | EndGlobalSection
51 | EndGlobal
52 |
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/MttVDD/Driver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define NOMINMAX
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #include
11 | #include
12 | #include
13 | #include
14 |
15 | #include
16 | #include
17 |
18 | #include "Trace.h"
19 |
20 | namespace Microsoft
21 | {
22 | namespace WRL
23 | {
24 | namespace Wrappers
25 | {
26 | // Adds a wrapper for thread handles to the existing set of WRL handle wrapper classes
27 | typedef HandleT Thread;
28 | }
29 | }
30 | }
31 |
32 | namespace Microsoft
33 | {
34 | namespace IndirectDisp
35 | {
36 | ///
37 | /// Manages the creation and lifetime of a Direct3D render device.
38 | ///
39 | struct Direct3DDevice
40 | {
41 | Direct3DDevice(LUID AdapterLuid);
42 | Direct3DDevice();
43 | HRESULT Init();
44 |
45 | LUID AdapterLuid;
46 | Microsoft::WRL::ComPtr DxgiFactory;
47 | Microsoft::WRL::ComPtr Adapter;
48 | Microsoft::WRL::ComPtr Device;
49 | Microsoft::WRL::ComPtr DeviceContext;
50 | };
51 |
52 | ///
53 | /// Manages a thread that consumes buffers from an indirect display swap-chain object.
54 | ///
55 | class SwapChainProcessor
56 | {
57 | public:
58 | SwapChainProcessor(IDDCX_SWAPCHAIN hSwapChain, std::shared_ptr Device, HANDLE NewFrameEvent);
59 | ~SwapChainProcessor();
60 |
61 | private:
62 | static DWORD CALLBACK RunThread(LPVOID Argument);
63 |
64 | void Run();
65 | void RunCore();
66 |
67 | public:
68 | IDDCX_SWAPCHAIN m_hSwapChain;
69 | std::shared_ptr m_Device;
70 | HANDLE m_hAvailableBufferEvent;
71 | Microsoft::WRL::Wrappers::Thread m_hThread;
72 | Microsoft::WRL::Wrappers::Event m_hTerminateEvent;
73 | };
74 |
75 | ///
76 | /// Provides a sample implementation of an indirect display driver.
77 | ///
78 | class IndirectDeviceContext
79 | {
80 | public:
81 | IndirectDeviceContext(_In_ WDFDEVICE WdfDevice);
82 | virtual ~IndirectDeviceContext();
83 |
84 | void InitAdapter();
85 | void FinishInit();
86 |
87 | void CreateMonitor(unsigned int index);
88 |
89 | void AssignSwapChain(IDDCX_MONITOR& Monitor, IDDCX_SWAPCHAIN SwapChain, LUID RenderAdapter, HANDLE NewFrameEvent);
90 | void UnassignSwapChain();
91 |
92 | protected:
93 |
94 | WDFDEVICE m_WdfDevice;
95 | IDDCX_ADAPTER m_Adapter;
96 | IDDCX_MONITOR m_Monitor;
97 | IDDCX_MONITOR m_Monitor2;
98 |
99 | std::unique_ptr m_ProcessingThread;
100 |
101 | public:
102 | static const DISPLAYCONFIG_VIDEO_SIGNAL_INFO s_KnownMonitorModes[];
103 | static std::vector s_KnownMonitorEdid;
104 | };
105 | }
106 | }
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/MttVDD/MttVDD.inf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/timminator/Virtual-Display-Driver/f9087c5d74fa6307f9b93d98528cdce361da29a7/Virtual Display Driver (HDR)/MttVDD/MttVDD.inf
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/MttVDD/MttVDD.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.9.34622.214
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IddSampleDriver", "IddSampleDriver.vcxproj", "{2D54CB75-8B17-4F11-97DC-847B0244CD46}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|ARM = Debug|ARM
11 | Debug|ARM64 = Debug|ARM64
12 | Debug|x64 = Debug|x64
13 | Debug|x86 = Debug|x86
14 | Release|ARM = Release|ARM
15 | Release|ARM64 = Release|ARM64
16 | Release|x64 = Release|x64
17 | Release|x86 = Release|x86
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM.ActiveCfg = Debug|ARM
21 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM.Build.0 = Debug|ARM
22 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM.Deploy.0 = Debug|ARM
23 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM64.ActiveCfg = Debug|ARM64
24 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM64.Build.0 = Debug|ARM64
25 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|ARM64.Deploy.0 = Debug|ARM64
26 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.ActiveCfg = Debug|x64
27 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.Build.0 = Debug|x64
28 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x64.Deploy.0 = Debug|x64
29 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.ActiveCfg = Debug|Win32
30 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.Build.0 = Debug|Win32
31 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Debug|x86.Deploy.0 = Debug|Win32
32 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM.ActiveCfg = Release|ARM
33 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM.Build.0 = Release|ARM
34 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM.Deploy.0 = Release|ARM
35 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.ActiveCfg = Release|ARM64
36 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.Build.0 = Release|ARM64
37 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|ARM64.Deploy.0 = Release|ARM64
38 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.ActiveCfg = Release|x64
39 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x64.Build.0 = Release|x64
40 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.ActiveCfg = Release|Win32
41 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Build.0 = Release|Win32
42 | {2D54CB75-8B17-4F11-97DC-847B0244CD46}.Release|x86.Deploy.0 = Release|Win32
43 | EndGlobalSection
44 | GlobalSection(SolutionProperties) = preSolution
45 | HideSolutionNode = FALSE
46 | EndGlobalSection
47 | GlobalSection(ExtensibilityGlobals) = postSolution
48 | SolutionGuid = {9A8BE7D9-9F0F-40A2-BA2D-8AE9E35890DB}
49 | EndGlobalSection
50 | EndGlobal
51 |
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/MttVDD/MttVDD.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {8E41214B-6785-4CFE-B992-037D68949A14}
18 | inf;inv;inx;mof;mc;
19 |
20 |
21 |
22 |
23 | Driver Files
24 |
25 |
26 |
27 |
28 | Header Files
29 |
30 |
31 | Header Files
32 |
33 |
34 | Header Files
35 |
36 |
37 |
38 |
39 | Source Files
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | Resource Files
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/MttVDD/Trace.h:
--------------------------------------------------------------------------------
1 | /*++
2 |
3 | Module Name:
4 |
5 | Internal.h
6 |
7 | Abstract:
8 |
9 | This module contains the local type definitions for the
10 | driver.
11 |
12 | Environment:
13 |
14 | Windows User-Mode Driver Framework 2
15 |
16 | --*/
17 |
18 | //
19 | // Define the tracing flags.
20 | //
21 | // Tracing GUID - b254994f-46e6-4718-80a0-0a3aa50d6ce4
22 | //
23 |
24 | #define WPP_CONTROL_GUIDS \
25 | WPP_DEFINE_CONTROL_GUID( \
26 | MyDriver1TraceGuid, (b254994f,46e6,4718,80a0,0a3aa50d6ce4), \
27 | \
28 | WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \
29 | WPP_DEFINE_BIT(TRACE_DRIVER) \
30 | WPP_DEFINE_BIT(TRACE_DEVICE) \
31 | WPP_DEFINE_BIT(TRACE_QUEUE) \
32 | )
33 |
34 | #define WPP_FLAG_LEVEL_LOGGER(flag, level) \
35 | WPP_LEVEL_LOGGER(flag)
36 |
37 | #define WPP_FLAG_LEVEL_ENABLED(flag, level) \
38 | (WPP_LEVEL_ENABLED(flag) && \
39 | WPP_CONTROL(WPP_BIT_ ## flag).Level >= level)
40 |
41 | #define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) \
42 | WPP_LEVEL_LOGGER(flags)
43 |
44 | #define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) \
45 | (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)
46 |
47 | //
48 | // This comment block is scanned by the trace preprocessor to define our
49 | // Trace function.
50 | //
51 | // begin_wpp config
52 | // FUNC Trace{FLAG=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...);
53 | // FUNC TraceEvents(LEVEL, FLAGS, MSG, ...);
54 | // end_wpp
55 |
56 | //
57 | //
58 | // Driver specific #defines
59 | //
60 | #if UMDF_VERSION_MAJOR == 2 && UMDF_VERSION_MINOR == 0
61 | // TODO: Update the name of the tracing provider
62 | #define MYDRIVER_TRACING_ID L"Microsoft\\UMDF2.0\\IddSampleDriver V1.0"
63 | #endif
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/MttVDD/readme.md:
--------------------------------------------------------------------------------
1 | # Get 5 virtual monitors for the price of zero!
2 |
3 | # Steps (for experienced pros only!!!)
4 | 1. Download the latest release as a zip file.
5 |
6 | 2. As an administrator, Run the *.bat file to add the driver certificate as a trusted root certificate.
7 |
8 | 3. Don't install the inf. Open device manager, click on any device, then click on the "Action" menu and click "Add Legacy Hardware"
9 |
10 | 4. Select "Add hardware from a list (Advanced)" and then select Display adapters
11 |
12 | 5. Click "Have Disk..." and click the "Browse..." button. Navigate to the extracted files and select the inf file.
13 |
14 | 6. You are done! Go to display settings to customize the resolution of the additional displays. These displays show up in Oculus and should be able to be streamed from.
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/option.txt:
--------------------------------------------------------------------------------
1 | 1
2 | 1920, 1080, 60
3 | 1920, 1080, 75
4 | 1920, 1080, 90
5 | 1920, 1080, 120
6 | 1920, 1080, 144
7 | 1920, 1080, 165
8 | 1920, 1080, 240
9 | 1920, 1080, 480
10 | 640, 480, 60
11 | 800, 600, 60
12 | 1024, 768, 60
13 | 1152, 864, 60
14 | 1280, 600, 60
15 | 1280, 720, 60
16 | 1280, 768, 60
17 | 1280, 800, 60
18 | 1280, 960, 60
19 | 1280, 1024, 60
20 | 1360, 768, 60
21 | 1366, 768, 60
22 | 1400, 1050, 60
23 | 1440, 900, 60
24 | 1600, 900, 60
25 | 1680, 1050, 60
26 | 1600, 1024, 60
27 | 1920, 1200, 60
28 | 1920, 1440, 60
29 | 2560, 1440, 60
30 | 2560, 1440, 120
31 | 2560, 1440, 144
32 | 2560, 1440, 165
33 | 2560, 1440, 240
34 | 2560, 1600, 60
35 | 2732, 2048, 60
36 | 2880, 1620, 60
37 | 2880, 1800, 60
38 | 3008, 1692, 60
39 | 3200, 1800, 60
40 | 3200, 2400, 60
41 | 3840, 2160, 60
42 | 3840, 2160, 120
43 | 3840, 2160, 144
44 | 3840, 2160, 165
45 | 3840, 2160, 240
46 | 3840, 2400, 60
47 | 4096, 2304, 60
48 | 4096, 2560, 60
49 | 5120, 2880, 60
50 | 6016, 3384, 60
51 | 7680, 4320, 60
52 | 2560, 1080, 60
53 | 2880, 1200, 60
54 | 3440, 1440, 60
55 | 3440, 1440, 120
56 | 3840, 1600, 60
57 | 4320, 1800, 60
58 | 5120, 2160, 60
59 | 5760, 2400, 60
60 | 6880, 2880, 60
61 | 7680, 3200, 60
62 | 8640, 3600, 60
63 | 3840, 1080, 60
64 | 3840, 1200, 60
65 | 4320, 1200, 60
66 | 5120, 1440, 60
67 | 5120, 1600, 60
68 | 5760, 1600, 60
69 | 5760, 1800, 60
70 | 6400, 1800, 60
71 | 6480, 1800, 60
72 | 7680, 2160, 60
73 | 7680, 2400, 60
74 | 8640, 2400, 60
75 | 2388, 1668, 60
76 | 2400, 1080, 60
77 | 3456, 2234, 60
78 |
--------------------------------------------------------------------------------
/Virtual Display Driver (HDR)/vdd_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 |
6 |
7 | default
8 |
9 |
10 |
11 | 800
12 | 600
13 | 30
14 | 60
15 | 90
16 | 120
17 | 144
18 | 165
19 |
20 |
21 | 1366
22 | 768
23 | 30
24 | 60
25 | 90
26 | 120
27 | 144
28 | 165
29 |
30 |
31 | 1920
32 | 1080
33 | 30
34 | 60
35 | 90
36 | 120
37 | 144
38 | 165
39 |
40 |
41 | 2560
42 | 1440
43 | 30
44 | 60
45 | 90
46 | 120
47 | 144
48 | 165
49 |
50 |
51 | 3840
52 | 2160
53 | 30
54 | 60
55 | 90
56 | 120
57 | 144
58 | 165
59 |
60 |
61 |
62 |
63 |
64 | false
65 | false
66 | false
67 | true
68 | false
69 | false
70 | false
71 |
72 | false
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------