dxwrapper icon indicating copy to clipboard operation
dxwrapper copied to clipboard

[Call of Cthulhu: Dark Corners of the Earth] - Windowed Mode brightness issues

Open deanff opened this issue 1 year ago • 9 comments
trafficstars

Enabling windowed mode is a god-send as it prevents the game from crashing when alt-tabbing. Unfortunately, it sets the brightness to 200%, and the in-game brightness menu ceases to function.

FULLSCREEN: https://i.imgur.com/gzowi2P.jpeg WINDOWED: https://i.imgur.com/qevv4Rh.png

Tested with the latest stable release of dxwrapper on retail edition (same as Steam, I believe) and GOG version. Let me know if there's anything I can do to help out - and thank you for your efforts on this project.

deanff avatar Sep 12 '24 18:09 deanff

That is probably a Gamma issue. Gamma in Direct3D9 and older does not work in Windowed mode, even fullscreen windowed mode.

elishacloud avatar Sep 12 '24 18:09 elishacloud

I could use either a shader or Windows gamma. A shader will take longer. Using Windows gamma will affect the whole screen not just the game window.

elishacloud avatar Sep 12 '24 18:09 elishacloud

It looks like just the game world is affected. https://i.imgur.com/69LIBPD.png https://i.imgur.com/D2fLQDl.png

deanff avatar Sep 12 '24 19:09 deanff

Ok, try this update. I recommend using the FullscreenWindowMode: dxwrapper.zip

elishacloud avatar Sep 12 '24 19:09 elishacloud

No luck, unfortunately.

Below is what I tested: FIles copied as is: alt-tab crash +FullscreenWindowMode: alt-tab crash +EnableWindowMode: alt-tab crash -Dd7to9: alt-tab crash renamed ddraw.dll to d3d9.dll: alt-tab crash +EnableD3d9Wrapper: same gamma as before. brightness menu has no effect.

Let me know if I've made a mistake somewhere here.

deanff avatar Sep 12 '24 20:09 deanff

It is weird that it crashing in Alt+Tab when using windowed mode. That should not be because in windowed mode the device is never lost. Maybe the game uses a combination of DirectDraw and Direct3D9? In that case you need to disable dd7to9.

Here is an updated one where I moved the gamma feature to the Direct3D9 wrapper. Try this one: dxwrapper.zip

elishacloud avatar Sep 13 '24 04:09 elishacloud

Hi Elisha, Gamma is the same as before, but now the brightness menu works. :) It crashed when alt-tabbing, so I turned on EnableWindowMode.

deanff avatar Sep 13 '24 04:09 deanff

Gamma is the same as before, but now the brightness menu works. :)

Which gamma are you referring to that does not work?

It crashed when alt-tabbing, so I turned on EnableWindowMode.

Is this a bug in the game? Does it crash without dxwrapper when you do alt+tab? My Direct3D9 wrapper just returns the calls directly from Direct3D9, so it should not have any issues here.

elishacloud avatar Sep 23 '24 03:09 elishacloud

Hi Elisha, Yeah, the alt-tab crash is a known bug with this game. Your wrapper's Windowed Mode resolves it. Only problem is gamma for the game world is twice as bright as it should be.

deanff avatar Sep 23 '24 19:09 deanff

Hi Elisha, Just tried the latest dxwrapper release and the D3D9 Windowed Mode gamma issue seems to be fixed. Great work! That said, the in-game brightness menu no longer works when in windowed mode. Any chance you can have a look at it? (You fixed this pretty quickly last time).

deanff avatar Dec 20 '24 11:12 deanff

That said, the in-game brightness menu no longer works when in windowed mode.

Yes, this is a known issue with Direct3D9. Supporting Gamma with Direct3D9 in windowed mode requires either a swapchain or a pixel shader. I don't want to use swapchains as this can cause other issues (example with Nvidia's RTX Remix). At some point I will add a pixel shader for this. But that won't happen for a while.

Edit: I can also do this by using Windows Gamma controls. But that causes other issues with certain games as well as causing the whole screen to go bright or dark rather than just the game window.

elishacloud avatar Dec 20 '24 19:12 elishacloud

At some point I will add a pixel shader for this. But that won't happen for a while.

No worries. Happy to test when it's ready.

deanff avatar Dec 21 '24 07:12 deanff

I added a shader for the gamma control. Here is the new build: dxwrapper.zip

elishacloud avatar Jan 14 '25 03:01 elishacloud

Experienced a lot of rendering issues (walls not showing, blinding lights, etc.) 1

Previous dxwrapper (Dec 14 Release): 2

From what I could tell, the in-game brightness menu did seem to be working at least.

deanff avatar Jan 14 '25 06:01 deanff

Ok, try this one. Looks like I made a stupid mistake in the last one: dxwrapper.zip

elishacloud avatar Jan 14 '25 06:01 elishacloud

Yep. That did the trick. Windowed Mode brightness is as expected, and the in-game brightness menu works. Thank you for looking into this :)

deanff avatar Jan 14 '25 07:01 deanff