Problem with lighting in the game Call of Cthulhu: Dark Corners of the Earth
Window hooker to run fullscreen programs in window and much more...
Status: Beta
Brought to you by:
ghotik
The lighting seems to have all kinds of issues when trying to run this game through DXWND. I'm by no means an expert on these matters but I've tried to use the manual and alter all kinds of settings with no luck, no matter what I do it comes out looking the same.
What the game ought to look like: http://i.imgur.com/gzowi2P.jpg
What it looks like running through DXWND: http://i.imgur.com/6KaRySA.jpg
No alterations to the in-game settings have been made between the above images.
Thank you for any help you can provide.
Last edit: Anonymous 2014-07-11
Interesting. It looks as if you set the "Disable setting gamma ramp" flag, but I doubt you did.
I'm going to grab the game and see by myself.
update
Yes, I replicated the problem, that is pretty evident.
Now I got to find a reason and a cure ....
update 2
I tried the video brightness option. That works both in the normal game (no DxWnd!) and with DxWnd in non windowized mode, and is not working in Windowed mode. But the type of effect you get adjusting the brightness DOES NOT look like the original game colors. The problem must lay somewhere else ....
Last edit: gho 2014-07-13
Uh, it seems that I fixed it.
There's some test to be made, but the fix seems to work perfectly for Call of Cthulhu, both in windowed and fullscreen mode.
Grab the dll in attach and enjoy ....
Oh, I almost forgot: and thank you very much for helping to find another nasty and sneaky small DxWnd bug!
Last edit: gho 2014-07-13
Hey, just gave this a shot and it seems to work perfectly for me as well. Glad I could help you find the bug and thank you for continuing to work on and support this great program.
Hello, I have the exact same problem for Elder Scrolls - Morrowind. The old .dll file dont work anymore, do you have any solution to this? I use v.2.04.50.
Thank you in advance.
Please, clarify: v2.04.50 is the latest release, what do you mean by "the old .dll" ?
If you mean the dll in attach in the post above, that should work with the coupled DxWnd.exe GUI (every now and then the GUI-dll interface changes, so that you can't mix different versions). I didn't take note of the old dll release version, but looking at the post date I believe you could find fixed DxWnd files here: https://sourceforge.net/projects/dxwnd/files/Latest%20build/v2_04_42_build.rar/download
If you can try that version and tell me whether it works or not, that would greately help and speed operations, otherwise I'll have to install Morrowind and it will take a while.
I have tried with the version you sent me and it didnt work, and in case you read the wrong year on the original post I tried a couple other versions as well, and with the attached .dll file, but i couldnt make it work.
The ones that I tried was: v2.02.90, 85, 83 and your suggestion v2.04.42.
Is there something else I can try myself?
maybe later, I'll try to test it by myself... can't talk much now by phone...
Last edit: gho 2017-10-31
Ah, back again behind my trustworthy laptop. But now come the problems: I installed TES3 Morrowind GOTY edition (I say that not to brag but in case the game version could matter) but the colors in the normal and windowed modes seems identical. I tried to capture some screenshots, but the game intercepts the command (I'll find later a way to overcome the problem) but for the moment just trust me.
A question: is there a particular situation where the problem happens (for instance, during movies, 3D gameplay, particular situations)? If not, the problem could depend on your configuration, there could be need to capture some logs from your pc and compare them with mine. You may read the short tutorial here https://sourceforge.net/p/dxwnd/discussion/general/thread/6e4aa579/ and post your logs?
Wait, I got something: activating the game options / video screen and moving the gamma correction slider, in window mode the gamma correction doesn't work.
But this is intentional: the gamma correction works on the whole screen surface, so if I restore the functionality, the rest of the desktop would be changed.
Could you verify if this is the cause of your problem? Placing the slider in the middle position there should be no difference between windowed and fullscreen luminosity.
This is exactly the problem, is there some way we can bypass this? its really dark right now and would be wounderfull if it would be some way to make it lighter.
Update: while making tests I found a bug in gamma ramp handling and I fixed it fr next DxWnd release.
In current release, if you set the "Libs / Disable set gamma ramp" flag Morrowind will crash.
I found that as well, will that fix my problem?
Sadly, no: it's the exact contrary. In case the gamma ramp would work, the fix would make the gamma ramp blocking mechanism work and you could stop the light variation.
In your case, you would like the gamma ramp to work, but that doesn't happen probably because of a video capability problem. From MSDN ( https://technet.microsoft.com/en-us/ms889716 )
So, maybe our video cards don't have the capability to do the operation in the same way it is performed in fullscreen mode. But a workaround should be possible somehow. I need to find a way ...
Last edit: gho 2017-11-01
Okay thats too bad. Dont put too much energy on that, its not the en of the world for me.
Thanks anyway for really good and quick answers!
Here is a quick and dirty solution that didn't require too much energy:
I confirm, reading more stuff on the web you learn that setting gamma ramp was expressly disabled in D3D window mode to avoid alterations of the desktop around the window. But MS didn't disable the GDI SetDeviceGammaRamp call that, by the way, has the identical gamma ramp input format.
So, it is pretty simple to add to DxWnd configuration panels a Direct3D "Force setting gamma ramp" flag that redirects the IDirect3dSurface8::SetGammaRamp method to SetDeviceGammaRamp, of course with the nasty side effect of canging the luminosity of the whole desktop screen.
This can be more or less annoying depending also on the window size: in ordinary conditions you may easily not want it, but for instance in fake-fullscreen modes where the window is stretched to almost the whole screen, this flag could become handy.
Here in attach a pre-release of DxWnd with this flag to be checked. Let me know if it pleases you. Of course, a better solution would implement gamma ramp only on the window surface: this would be relatively easy on 2D ddraw games by using the surface emulation and making the color transformation between the virtual and real surfaces, but unfortunately on D3D8/9 games this is not so easy.
Last edit: gho 2017-11-01
This is a good solution, the biggest problem is when I close the game the gamma settings on the desktop is still there, so its kind of anoying to change the gamma settings in the game before closing. Is it possible to add some return to default on close?
Good idea ...
Try this dll in attach. I pushed your idea a little further: the original gamma ramp is restored not only at game termination, but also whenever the game lose focus. This way you will be able to switch (typically Alt-Tab-bing) to other windows and get the original desktop luminosity.
Of course, the trick may not work if the game doesn't terminate gracefully but crashes. Later I'll place a gamma ramp recover also on the DxWnd GUI, pretty much like what happens if the game shanges screen resolution or color depth.
this is a super solution! alt+tab works great, but it dosent work when exiting the game, do I need some settings for that, or should I wait for the DxWnd GUI solution, I anyway use the /R:1 shortcut thing when starting the game so that will solve this problem I think?
Uhm, /R option could require some slightly different solution. This one in attach probably doesn't work with /R yet, but it should be a little more robust and, in case of troubles, you can use the (expert mode only) "Tools->Recover gamma ramp" menu command.
Beware: the recover function sets the gamma ramp values detected at DxWnd GUI activation, so if you terminate the GUI with wrong settings, starting DxWnd and calling this command will be of no use.
Later I'll try to make a /R recovery too.
Last edit: gho 2017-11-02
I never get it to work automatically, I always need to use the manually reset gamma ramp. If you could get it to work automatically with the /R, I would be very greatefull.
This should do.
If you don't like being prompted for a gamma ramp recovery every time the game ends, just add a /Q (quiet mode) flag to DxWnd command line and the recovery will take place silently.
You are awsome, this works great, thank you very much :)
Hei, guess what?
Next DxWnd release will add the capability to set gamma ramp correction to D3D8/9 light sources.
Look at what that can do on Morrowind, in almost real time (changes take place after you suspend & resume the game) and without affecting your desktop gamma settings!!!
I bet you'll love it.