Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to choose graphics card [Windows] #61

Open
aggregate1166877 opened this issue Oct 28, 2021 · 0 comments
Open

Add option to choose graphics card [Windows] #61

aggregate1166877 opened this issue Oct 28, 2021 · 0 comments
Labels
detailed concept pre-alpha grind Pre-alpha MVP task: tasks used as rough indication of what needs to be done to get out of pre-alpha

Comments

@aggregate1166877
Copy link
Collaborator

aggregate1166877 commented Oct 28, 2021

Note:
This appears to be highly platform specific, so each platform would need its own issue. This issue is for Windows, specifically.

Details:
Took me a huge amount of research and luck, but I finally figured out how to make the game use a discrete instead of integrated graphics:

  • From Windows start menu, go to Settings. Click System.
  • Scroll down to "Graphics Settings".
  • Select "Classic app", then click "Browse".
  • Navigate to Cosmosis.exe (or node_modules\nw\nwjs\nw.exe in dev mode) and select it.
  • Once it's been added to the list click "Options" then select "High
    Performance".

What you'll note from the above is that Windows gives you the names of the cards it believes to be high / low performance.

Chances are, the above is simply a registry setting. So the task would be as follows:

  • Find a method of querying available graphics cards (whether by registry, Windows API, whatever).
  • Add option to the Graphics menu that allows choosing a graphics card. Default option is "Default" and technically means we let Windows choose. If the code detects OS isn't Windows, then for now at least, the only option is "Default" and greyed out.
  • After the user selects a graphics card and presses 'Save', write a registry entry specifying this.
  • This will likely need an application restart (test if this is actually the case). Inform the user a restart is required. Try invoke an NW.js function to do the restart, and use Task Manager to confirm the new graphics card is being used. If an automatic restart does not make the new card take effect, the 'restart' message should inform the user they should manually restart the game.
@aggregate1166877 aggregate1166877 added pre-alpha grind Pre-alpha MVP task: tasks used as rough indication of what needs to be done to get out of pre-alpha detailed concept labels Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detailed concept pre-alpha grind Pre-alpha MVP task: tasks used as rough indication of what needs to be done to get out of pre-alpha
Projects
None yet
Development

No branches or pull requests

1 participant