T-Troll / alienfx-tools

Alienware systems lights, fans, and power control tools and apps
MIT License
492 stars 45 forks source link

Ambient mode should match "Desktop resolution" not "Active resolution" #168

Closed icestraw closed 2 years ago

icestraw commented 2 years ago

Describe the bug As title In ambient mode, light zones can follow screen's color & lightness. However, sometimes resolutions of screenshots does not always match user's resolution, leading to "offsets" between keyboard light & screen zones. A technology named "Virtual super resolution" is available, and in this mode there're two resolutions: "Desktop resolution" (Logical) and "Active resolution" (Physical) This app use "Physical resolution" but in fact there should be a map between "Physical" and "Logical" resolutions.

To Reproduce Steps to reproduce the behavior:

  1. Set multiple ambient zones between "keyboard" and "screen"
  2. Set a higher resolution than physical (more different, more offsets)

Expected behavior Keybaord lights should follow screen exactly.

Screenshots My 4 zone keyboard doesn't have accurate bug representation on phone recording

System (please complete the following information):

Additional context Nope

T-Troll commented 2 years ago

It's not this.

I use data directly from active GPU screen buffer via DirectX. So, it always reflects current screen (not desktop) resolution. Desktop one can vary for multi-screens, but i have a switch to select one of them.

What CAN be broken - i monitor screen configuration changes and adopt buffer to it. Here can be a bug (mine or Windows) after resolution change. I'll check.

PS: Then this happened, try to push "Reset" button at Ambient tab. Did it help?

T-Troll commented 2 years ago

Yes, it was a bug, but the source is different. Windows report virtual resolution (divided by scale level) for non-DPI-Aware apps, even from DirectX! You can read this for details.

Quite strange, but easy to fix.

T-Troll commented 2 years ago

Try this one - alienfx-gui.zip

Warning: It can provide incorrect app UI scaling then moving app window between different scale monitors! Can you check this?

icestraw commented 2 years ago

image Hmm maybe yes? Plus, the ambient effect seems not watching monitor change

T-Troll commented 2 years ago

I see it a bit unstable now. I can share debug version with data trace, but you will need to have dbgview.

For now, just restart app (it's a result of how i fight incorrect window scaling).

T-Troll commented 2 years ago

Try this one - alienfx-gui.zip

This should always get resolution correctly.... Hope i not broke multi-monitor resolution, i can't check it now.