Open N0exp opened 3 weeks ago
RustDeskIddDriver will not change the settings of other monitors.
The system remembers the relative positions of different monitors.
For example, if there are two monitors, A+B, and their positions and resolutions are adjusted the first time, then when there are two monitors for the second time, for example, A first and then B, the previous settings will be restored.
You can find the system settings in the register HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration
For example, adding two virtual monitors A+B, according to your code, when adding monitors, it will change the new resolution through the MonitorModesUpdate function, but in fact, only A has changed, and in any case, it can not change the resolution of B. The first parameter of IddCxMonitorUpdateModes has no actual effect. The resolution of A is changed regardless of whether IDDCX_MONITOR of A or B is passed
Ok, I get it. I'll test later.
Is there a way to change the default display of the first virtual screen? Can I directly change how the second screen is displayed?
Please explain more details. I cannot understand clearly.
For example, if I add virtual monitors A and B, and B is the virtual monitor that is added later, how can I update the display mode of only monitor B, while the display mode of A remains unchanged
I don't know, but I'll test it later.
Okay, can you tell me the results after you finish testing? I'm not sure if I had a problem using the IddCxMonitorUpdateModes function, but the function returned success.Thanks
I've tested. MonitorModesUpdate()
works as expected.
I've made a simple change in the sample code.
Then the added monitors resolutions are:
I modified it according to you. After I tried it, it didn't work. The virtual monitor on the first connection is always updated, and the virtual monitor on the second connection is not updated. The display mode of the second virtual display is the same as when it was created. I tried it on windows1909
Hi, my OS is Win11 22H2
, build version is 22621.3737
.
You can sync the main branch to test. I've added a command to update monitor modes of the specified monitor.
When entering a, except for the first increased display resolution, the other display resolutions are not changed, and all resolutions are the default resolution at the time of creation