I’m the author of DisplayMagician, and a Public API user.
DisplayMagician is designed to record your display layout and configuration, and to apply that same layout when you want it in the future. It is a display layout record/apply program. It is not designed to make any changes to the layout, simply to record the existing layout as a display profile, and it allows you to change your display layout to any of your saved display profiles.
DisplayMagician works with NVIDIA video cards like this, when it is swapping between display profiles:
- Disable any custom NVIDIA colour/HDR overrides (using NVAPI)
- Disable any Mosaic topology if it is not in the wanted layout, or create a new Mosaic topology if it is in the new layout (using NVAPI)
- Re-arrange the displays, enabling or disabling screens as needed (using Windows CCD API)
- Enable windows colour/HDR settings (using Windows CCD API)
- Enable any custom NVIDIA colour/HDR overrides for the new layout (using NVAPI)
My question is this: At the moment I programmatically create a new Mosaic topology each time that I want Mosaic to be enabled. Is this the best way to do it?
At the back of my head, I’m wondering if I should be doing it differently. Rather than dumping and storing the full Mosaic topology as I do now, should I simply be looking up the topology in the topology database, and just disabling/enabling it?
Does the NVIDIA Control Panel create a topology and store it in the driver database when a user enables a new surround layout? Does it create a display layout ID somewhere that I can store, so I can choose that same display layout later? If so, what should I how do I lookup what the display layout ID is? Should I be using the DRS APIS (NVAPI Reference Documentation)?
I really want to make sure that I’m doing it the recommended way so I avoid breaking changes when the NVIDIA driver is updated.