Skip to content

Releases: Nonary/AutoHDRSwitch

v2.0.1

13 Aug 05:53
Compare
Choose a tag to compare

Requirements:

  • Host must be Windows
  • HDR Capable Display
  • Sunshine 0.21.0 or higher

Caveats:

  • If using Windows 11, you'll need to set the default terminal to Windows Console Host as there is currently a bug in Windows Terminal that prevents hidden consoles from working properly.
    • That can be changed at Settings > Privacy & security > Security > For developers > Terminal [Let Windows decide] >> (change to) >> Terminal [Windows Console Host]
  • Due to Windows API restrictions, this script does not work on cold reboots (hard crashes or shutdowns of your computer).
    • Fortunately recent changes to Sunshine makes this issue much easier to workaround.
    • Simply sign into the computer using the "Desktop" app on Moonlight, then end the stream, then start it again to resolve issue in this scenario.
  • The script will stop working if you move the folder, simply reinstall it to resolve that issue.

What it Does:

Checks to see if the last connected Moonlight client asked for HDR, if so, it will enable HDR. Otherwise, it will disable it.
Once the stream ends, it will configure the last HDR setting prior to starting the stream.

(Optionally) If enabled, will toggle HDR on and off automatically to fix issues with the IDDSampleDriver on overblown colors when streaming in HDR.

Credits:

The HDR toggling code is from the following repositories:

Installation:

  1. Store this folder in a location you intend to keep. If you delete this folder or move it, the automation will stop working.
  2. If you intend on using IDDSampleDriver, which has known issues with HDR you should enable the "IDDSampleFix" setting located in the settings.json file.
  3. To install, double click the Install.bat file. You may get a smart screen warning, this is normal.
  4. To uninstall, do the same thing with Uninstall.bat.

Recent Changes

v2.0.0

12 Aug 18:49
6985b42
Compare
Choose a tag to compare

Requirements:

  • Host must be Windows
  • HDR Capable Display
  • Sunshine 0.21.0 or higher

Caveats:

  • If using Windows 11, you'll need to set the default terminal to Windows Console Host as there is currently a bug in Windows Terminal that prevents hidden consoles from working properly.
    • That can be changed at Settings > Privacy & security > Security > For developers > Terminal [Let Windows decide] >> (change to) >> Terminal [Windows Console Host]
  • Due to Windows API restrictions, this script does not work on cold reboots (hard crashes or shutdowns of your computer).
    • Fortunately recent changes to Sunshine makes this issue much easier to workaround.
    • Simply sign into the computer using the "Desktop" app on Moonlight, then end the stream, then start it again to resolve issue in this scenario.
  • The script will stop working if you move the folder, simply reinstall it to resolve that issue.

What it Does:

Checks to see if the last connected Moonlight client asked for HDR, if so, it will enable HDR. Otherwise, it will disable it.
Once the stream ends, it will configure the last HDR setting prior to starting the stream.

(Optionally) If enabled, will toggle HDR on and off automatically to fix issues with the IDDSampleDriver on overblown colors when streaming in HDR.

Credits:

The HDR toggling code is from the following repositories:

Installation:

  1. Store this folder in a location you intend to keep. If you delete this folder or move it, the automation will stop working.
  2. If you intend on using IDDSampleDriver, which has known issues with HDR you should enable the "IDDSampleFix" setting located in the settings.json file.
  3. To install, double click the Install.bat file. You may get a smart screen warning, this is normal.
  4. To uninstall, do the same thing with Uninstall.bat.

Recent Changes

v1.2.0

16 Oct 15:37
e45fce1
Compare
Choose a tag to compare

The pre-command version of this script is more "reactive", meaning it only runs when necessary. It also has a longer grace peroid during the suspension of a stream, 120 seconds, before reverting back. When ending a stream in Moonlight, it will revert back instantly.

Requirements:

  • Host must be Windows
  • HDR Capable Display
  • Sunshine 0.21.0 or greater

Caveats:

  • If using Windows 11, you'll need to set the default terminal to Windows Console Host as there is currently a bug in Windows Terminal that prevents hidden consoles from working properly.
    • That can be changed at Settings > Privacy & security > Security > For developers > Terminal [Let Windows decide] >> (change to) >> Terminal [Windows Console Host]
  • Due to Windows API restrictions, this script does not work on cold reboots (hard crashes or shutdowns of your computer).
    • Fortunately recent changes to Sunshine makes this issue much easier to workaround.
    • Simply sign into the computer using the "Desktop" app on Moonlight, then end the stream, then start it again to resolve issue in this scenario.
  • The script will stop working if you move the folder, simply reinstall it to resolve that issue.

What it Does:

Checks to see if the last connected Moonlight client asked for HDR, if so, it will enable HDR. Otherwise, it will disable it.
Once the stream ends, it will configure the last HDR setting prior to starting the stream.

Credits:

The HDR toggling code is from the following repositories:

Installation:

  1. Store this folder in a location you intend to keep. If you delete this folder or move it, the automation will stop working.
  2. To install, double click the Install.bat file. You may get a smart screen warning, this is normal.
  3. To uninstall, do the same thing with Uninstall.bat.

Recent Changes

  • Script no longer requires Sunshine logging level to be set to debug, instead it utilizes the new feature introduced in Sunshine 0.21
  • Improved performance by removing unnecessary sleeps in the code since it no longer has to rely on log parsing.

v1.1.0 (Sunshine Nightly Prelease)

15 Aug 00:08
Compare
Choose a tag to compare
Pre-release

The pre-command version of this script is more "reactive", meaning it only runs when necessary. It also has a longer grace peroid during the suspension of a stream, 120 seconds, before reverting back. When ending a stream in Moonlight, it will revert back instantly.

Requirements:

  • Host must be Windows
  • HDR Capable Display
  • Sunshine Nightly or 0.21.0 and greater.

Caveats:

  • If using Windows 11, you'll need to set the default terminal to Windows Console Host as there is currently a bug in Windows Terminal that prevents hidden consoles from working properly.
    • That can be changed at Settings > Privacy & security > Security > For developers > Terminal [Let Windows decide] >> (change to) >> Terminal [Windows Console Host]
  • Prepcommands do not work from cold reboots, and will prevent Sunshine from working until you logon locally.
    • You should add a new application (with any name you'd like) in the WebUI and leave both the command and detached command empty.
    • When adding this new application, make sure global prep command option is disabled.
    • That will serve as a fallback option when you have to remote into your computer from a cold start.
    • Normal reboots issued from start menu, will still work without the workaround above as long as Settings > Accounts > Sign-in options and "Use my sign-in info to automatically finish setting up after an update" is enabled which is default in Windows 10 & 11.
  • The script will stop working if you move the folder, simply reinstall it to resolve that issue.

What it Does:

Checks to see if the last connected Moonlight client asked for HDR, if so, it will enable HDR. Otherwise, it will disable it.
Once the stream ends, it will configure the last HDR setting prior to starting the stream.

Credits:

The HDR toggling code is from the following repositories:

Installation:

  1. Store this folder in a location you intend to keep. If you delete this folder or move it, the automation will stop working.
  2. To install, double click the Install.bat file. You may get a smart screen warning, this is normal.
  3. To uninstall, do the same thing with Uninstall.bat.

Recent Changes

  • Script no longer requires Sunshine logging level to be set to debug, instead it utilizes the new feature introduced in Sunshine Nightly.
  • Improved performance by removing unnecessary sleeps in the code since it no longer has to rely on log parsing.

1.0.5

15 Jun 03:30
Compare
Choose a tag to compare

The pre-command version of this script is more "reactive", meaning it only runs when necessary. It also has a longer grace peroid during the suspension of a stream, 120 seconds, before reverting back. When ending a stream in Moonlight, it will revert back instantly.

PREREQUISITES

If using Windows 11, make sure to set your default terminal to Windows Console Host, otherwise you will notice a PowerShell window minimized on your PC at all times.

Requirements:

  • Host must be Windows
  • Sunshine must be installed as a service (it does not work with the zip version of Sunshine)
  • Sunshine logging level must be set to Debug
  • Users must have read permissions to %WINDIR%/Temp/Sunshine.log (do not change other permissions, just make sure Users have at least read permissions)
  • HDR Capable Display

Caveats:

  • If using Windows 11, you'll need to set the default terminal to Windows Console Host as there is currently a bug in Windows Terminal that prevents hidden consoles from working properly.
    • That can be changed at Settings > Privacy & security > Security > For developers > Terminal [Let Windows decide] >> (change to) >> Terminal [Windows Console Host]
  • Prepcommands do not work from cold reboots, and will prevent Sunshine from working until you logon locally.
    • You should add a new application (with any name you'd like) in the WebUI and leave both the command and detached command empty.
    • When adding this new application, make sure global prep command option is disabled.
    • That will serve as a fallback option when you have to remote into your computer from a cold start.
    • Normal reboots issued from start menu, will still work without the workaround above as long as Settings > Accounts > Sign-in options and "Use my sign-in info to automatically finish setting up after an update" is enabled which is default in Windows 10 & 11.
  • The script will stop working if you move the folder, simply reinstall it to resolve that issue.

What it Does:

Checks to see if the last connected Moonlight client asked for HDR, if so, it will enable HDR. Otherwise, it will disable it.
Once the stream ends, it will configure the last HDR setting prior to starting the stream.

Credits:

The HDR toggling code is from the following repositories:

Installation:

  1. Store this folder in a location you intend to keep. If you delete this folder or move it, the automation will stop working.
  2. To install, double click the Install.bat file. You may get a smart screen warning, this is normal.
  3. To uninstall, do the same thing with Uninstall.bat.

Changes

  • Fixed a bug that caused Sunshine to fail executing applications until you restarted the service, due to the commands stalling out in Sunshine itself.

Pre-Command Version for Sunshine 0.19.1+ Users

23 Apr 03:54
Compare
Choose a tag to compare

AutoHDRSwitch

12 Mar 22:44
Compare
Choose a tag to compare

Superseded by https://github.com/Nonary/AutoHDRSwitch/releases/latest

Please click the link above to download the script.