Git Product home page Git Product logo

Comments (2)

falahati avatar falahati commented on May 27, 2024

Hey Steven,

First, you need to create an array of PathInfo instances for the configurations you want. Keep in mind that each PathInfo represents a logical display and each contains one or more physical displays that are configured and recognized by a PathTargetInfo instance (accessible from the PathInfo.TargetsInfo property as an array) - these physical displays are cloned and all going to show the same output as they all representations of one logical display.

After creating a PathInfo for each logical display and configured its properties including all physical displays represented by PathTargetInfo instances, you need to ask NVidia Driver to try to apply this configuration by calling PathInfo.SetDisplaysConfig() static method. This is because if every change happens instantly, you can't apply major changes to the display profile unless you manually take each display out and then in again which is not convenient; so, instead, you change all settings and apply it once.

You can also take the currently active configuration using the PathInfo.GetDisplaysConfig() static method and change it to your likings and then apply it.

To change the display profile, however, I don't actually recommend using this library as it is limited to NVidia GPUs, following repo contains the code that allows you to easily change display settings for any brand of GPU using Windows API:

https://github.com/falahati/WindowsDisplayAPI/

API is very similar to this, you are still going to have the PathInfo class (with the same name) and the PathTargetInfo class (named PathTargetDisplay), the only significant difference is a specific class for logical displays named PathSourceDisplay and therefore PathInfo acts as of a connection between one PathSourceDisplay and multiple PathTargetDisplays.

One of the goodies provided by the WindowsDisplayAPI library is the fact that it can give you supported resolutions for a display device. As far as I remember this isn't the case with this library and to get this information you need to extract them from the Display EDID. If you want to follow this path tho, you can use the following library:

https://github.com/falahati/EDIDParser

You can also check the source code of the following program as a better and more complete sample (comparing to the sample project included in this repo) for all mentioned libraries above as well as this one (in fact all these project are created so I can make this app):

https://github.com/falahati/HeliosDisplayManagement

from nvapiwrapper.

agentblythe avatar agentblythe commented on May 27, 2024

Wow thanks for the detailed reply. I will try those suggestions asap. You have a great set of tools here. 👍

from nvapiwrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.