Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Toggle HDR mode in C#?

Toggle HDR mode in C#?

Scheduled Pinned Locked Moved C#
csharpgame-devquestion
4 Posts 3 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrCrane
    wrote on last edited by
    #1

    Hello Beautiful People, I do photography as a hobby and also play games. As such, I often use SDR mode for the desktop / photography side, but want to swap to HDR mode for playing some games. Being a bit forgetful, I’ll launch a game from Steam/GOG only realise that I forgot use Win + Alt + B to toggle HDR. Now I have to sit through all the opening movies before I can exit the game, manually turn on HDR then relaunch. I’d like to develop my own launcher that will allow me to toggle HDR mode prior to calling Steam/GOG to launch a game. Does anyone know if toggling HDR mode is possible in C# please? Thanks for your time, MrCrane.

    OriginalGriffO R 2 Replies Last reply
    0
    • M MrCrane

      Hello Beautiful People, I do photography as a hobby and also play games. As such, I often use SDR mode for the desktop / photography side, but want to swap to HDR mode for playing some games. Being a bit forgetful, I’ll launch a game from Steam/GOG only realise that I forgot use Win + Alt + B to toggle HDR. Now I have to sit through all the opening movies before I can exit the game, manually turn on HDR then relaunch. I’d like to develop my own launcher that will allow me to toggle HDR mode prior to calling Steam/GOG to launch a game. Does anyone know if toggling HDR mode is possible in C# please? Thanks for your time, MrCrane.

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      There is an MS API which might let you do it: XDisplayTryEnableHdrMode - Microsoft Game Development Kit | Microsoft Learn[^] but you'd have to work out the DLLImport signature for yourself - I've never wanted to use it!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      M 1 Reply Last reply
      0
      • M MrCrane

        Hello Beautiful People, I do photography as a hobby and also play games. As such, I often use SDR mode for the desktop / photography side, but want to swap to HDR mode for playing some games. Being a bit forgetful, I’ll launch a game from Steam/GOG only realise that I forgot use Win + Alt + B to toggle HDR. Now I have to sit through all the opening movies before I can exit the game, manually turn on HDR then relaunch. I’d like to develop my own launcher that will allow me to toggle HDR mode prior to calling Steam/GOG to launch a game. Does anyone know if toggling HDR mode is possible in C# please? Thanks for your time, MrCrane.

        R Offline
        R Offline
        Ron Nicholson
        wrote on last edited by
        #3

        For something completely different. You could try to create a shortcut or batch file to run an Autohotkey script to change the setting then start the game. GOG games should be easy, and you might be able to run the steam games from the desktop shortcut steam can create. Just a thought. Ron

        Jack of all trades, master of none, though often times better than master of one.

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          There is an MS API which might let you do it: XDisplayTryEnableHdrMode - Microsoft Game Development Kit | Microsoft Learn[^] but you'd have to work out the DLLImport signature for yourself - I've never wanted to use it!

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

          M Offline
          M Offline
          MrCrane
          wrote on last edited by
          #4

          Hello OriginalGriff, Thank you for taking the time to reply. Best regards, MC

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups