d3xMachina / BetterJoy

Allows the Nintendo Switch Pro Controller, Joycons and SNES controller to be used with CEMU, Citra, Dolphin, Yuzu and as generic XInput
Other
72 stars 5 forks source link

[ENHANCEMENT]After switching desktop resolution several times, the tray icon becomes increasingly blurry #23

Closed zhr305 closed 2 months ago

zhr305 commented 2 months ago

2024-07-06_03-01-44

I use Windows 10. After switching the desktop resolution several times (4K→1080p→4K→1080p→4K→1080p), the Betterjoy tray icon becomes more and more blurred. I had to restart Betterjoy to fix the blurry icons.

Is there a way to fix the blurry icons? Or hopefully there is an option to hide the tray icon.

Thank you very much!!!😊

d3xMachina commented 2 months ago

Does this fix the issue for you : BetterJoy.zip

zhr305 commented 2 months ago

Does this fix the issue for you : BetterJoy.zip

After switching the resolution several times, the icon is still blurry. It may be due to my current Win10 22H2 system. 2024-07-06_13-58-25

But on another Win11 computer the icon works perfectly fine, neither this Betterjoy version nor the previous older Betterjoy version is blurry. 2024-07-06_13-40-10

d3xMachina commented 2 months ago

I think it's probably an OS bug then. In the build above I made a change to load the icon again when the resolution or dpi is changed. Since it's still blurry it means the OS loads it from cache anyway and rescale it from the cache. I also don't have the issue on Windows 11.

You can try to rebuild the icon cache maybe :

  1. https://www.tenforums.com/tutorials/5645-rebuild-icon-cache-windows-10-a.html
  2. https://www.tenforums.com/tutorials/5655-clear-reset-thumbnail-cache-windows-10-a.html
d3xMachina commented 2 months ago

I made a mistake in the above build, I wasn't refreshing the taskbar icon, but the one from the form... Try this build, hopefully it does the trick : BetterJoy.zip

zhr305 commented 2 months ago

I made a mistake in the above build, I wasn't refreshing the taskbar icon, but the one from the form...我在上面的构建中犯了一个错误,我没有刷新任务栏图标,而是刷新表单中的图标...... Try this build, hopefully it does the trick : 尝试这个构建,希望它能解决问题: BetterJoy.zip 2024-07-06_17-51-17

This works! Thank you! When the resolution is switched for the first time (4k → 1080p → 4k), the Betterjoy icon becomes a little blurry. 2024-07-06_17-51-43

But after switching resolutions multiple times(4k → 1080p → 4k → 1080p → 4k → 1080p → 4k ... ...), the Betterjoy icons will no longer gradually become blurry! 2024-07-06_17-52-20

zhr305 commented 2 months ago

I think it's probably an OS bug then. In the build above I made a change to load the icon again when the resolution or dpi is changed. Since it's still blurry it means the OS loads it from cache anyway and rescale it from the cache. I also don't have the issue on Windows 11.我认为这可能是操作系统错误。在上面的构建中,我进行了更改,以便在更改分辨率或 dpi 时再次加载图标。由于它仍然模糊,这意味着操作系统无论如何都会从缓存加载它并从缓存重新调整它。我在 Windows 11 上也没有这个问题。

You can try to rebuild the icon cache maybe :您可以尝试重建图标缓存:

  1. https://www.tenforums.com/tutorials/5645-rebuild-icon-cache-windows-10-a.html
  2. https://www.tenforums.com/tutorials/5655-clear-reset-thumbnail-cache-windows-10-a.html

Thank you! This method is very useful and makes all my tray icons clear and 4k sharp again!