Closed zjoasan closed 3 months ago
Refactored Adapter.h, put in the working patch for storing install path in Regkey with fallback to "C:\IddSampleDriver" in loadsettings. Replaced the void loadoption with loadsettings. Loadsettings has xml, with .txt fallback, which in turn has sane defaults / bestgpu(vram based) depend on missing txt file.
I've compiled and run it here, multiple GPU simulated with "Microsoft Basic Render Driver".
copied from last commit msg:
Here is the whole bit working
Checks for Regkey: HKLM\SOFTWARE\MikeTheTech\VirtualDisplayDriver\VDDPATH which is a D-word containing the install path. (tested)
if not exist, fall back to install path = C:\IddSampleDriver (tested)
Next looks in install path for xml, grabs data and starts. If xml is missing, look for options.txt and adapter.txt, if any txt file is >missing sane defaults are added.
EDID has HDR data and 1600 nits, and newer names.
NOTE!!! Any installer should replace %fullpath% with install path: "reg add "HKLM\SOFTWARE\MikeTheTech\VirtualDisplayDriver" /v VDDPATH /t REG_SZ /d "%fullpath%" /f"
*String
not a dword. Dword is used for storing numerical values
True, I'm sorry for bogus descriptions ;)
Here is the changes I did to AdapterOptions.h and Driver.cpp, To read settings xml and insert it into AdapterOptions.H from xmlvalue. if xml is not found, search for adapter.txt.
if wrong GPU name in either, autoselect the best one (vram based)
loadsettings is meant to replace loadoptions, but is not complete in this PR, since you asked for this in this order. So no fallback for missing xml or options.txt in this pr, these are also in the new load settings, but I cut it out to limit the size of this commit.
Error handling might be to "grade school" or not enough, since don't trust my error handling in this environment. So alot of the includs in AdapterOptions.h might be unneeded, but since I program from example and it worked for me i didn't remove them.