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

Ambilight - Display list not updating on display settings change #61

Closed
Cheerpipe opened this issue May 9, 2021 · 0 comments
Closed

Comments

@Cheerpipe
Copy link
Contributor

Cheerpipe commented May 9, 2021

UI (and CaptureScreen internal) display list don't update if windows settings changed.

Steps to reproduce:

  1. Set Windows to Primary display only.
  2. Start artemis.
  3. Create an Ambilight layer and go to their settings UI.
  4. It will show one display adapter and it is ok.
  5. Set Windows Display Settings to extended (with two or more screens).
  6. Go to the recently created Ambilight layer settings UI.
  7. It still will show only one screen and it is Not OK.
  8. Close ambilight settings UI.
  9. Set windows display settings to Secondary only.
  10. Go to the recently created Ambilight layer settings UI.
  11. It will still show one display. If the secondary display has different resolution than primary display, UI will still show primary display resolution.

The above problem happen becase the Factory object used by the ScreenCaptureService has to be created again in every display settings change, otherwise it will report a outdated display config if it changed.

References:

https://docs.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgifactory1-enumadapters1

When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the IDXGIFactory1 object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop.

Related to #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants