Closed SRSaunders closed 1 month ago
Checking wether the console is open or not is wrong. You need the sRGB variant if viewDef->viewEntitys is NULL because then we render to the 8 bit ldrFBO and not the hdrFBO.
Dumb mistake on my part. I was using console as a proxy for 2D/3D, but not needed when you can test it directly. Fixed.
Heh you are definitely not dumb. Merged it.
Fixes a crash regression in Bink Decoder when the path is missing or not a bink file. This can be observed when using the testVideo console command and mistyping a file name. The regression comes my previous memory leak fixes that freed Bink bundles when closing playback. Unfortunately I did not properly check for unallocated bundles with NULL pointers caused by failed open requests. This PR fixes that oversight.
In addition, this adds a small change to testVideo playback that checks if
the console is open or closedthe view is 2D or 3D, and only skips sRGB to linear conversion if theconsole is open (i.e. a 2D surface)view is 2D. If the console is closed and a 3D game is running, then normal shaders are used for testVideo to get as close as possible to proper colors. However, this is not perfect since other 3D processing occurs afterwards - i.e. TAA, Tonemapping, etc. A minor improvement but I thought I would add it here.