Giter Club home page Giter Club logo

Comments (10)

nipkownix avatar nipkownix commented on July 25, 2024

Oh boy.
I'll see if I can create a virtual display to reproduce the crash. My actual monitor can't handle anything above 63Hz or so :/

But 144Hz did work when I first tried this. Not sure what could be wrong now.

from re4_tweaks.

emoose avatar emoose commented on July 25, 2024

Have you tried it with 63Hz in game? If your desktop is running at 63Hz maybe that's enough for it to trigger the crash, if it is an issue with desktop & D3D having a mismatch.

Looks like g_UserRefreshRate does get set to 90, so re4_tweaks is detecting desktop refresh rate fine at least, my guess is EnumAdapterModes might not being exposing any 90Hz modes though, so the D3D_FillDisplayModeVector func probably ends up leaving the vector empty.
(kinda strange for D3D not to show any 90Hz modes though, since I can use the 90Hz mode fine in other games... too bad dxdiag doesn't seem to report display modes, the one time that tool might have been useful...)

from re4_tweaks.

nipkownix avatar nipkownix commented on July 25, 2024

Hmm, weird. Tried both with 63Hz on my real monitor and with 90Hz on my fake monitor. No crashes here.

Edit: tried with 90Hz only and with both 60 + 90, never got a crash in any of those situations.
Really confusing.

from re4_tweaks.

emoose avatar emoose commented on July 25, 2024

Probably should have mentioned but I have two monitors connected - unplugged one of them, and the crash went away, plugged it back in and it started crashing again, weird.

Could it be using EnumDisplayModes on the wrong monitor maybe? Only one of them had 90Hz custom resolution added (both are same resolution besides that, also the one I unplugged wasn't the 90Hz one)

Looks like EnumDisplayModes is called with Adapter = 0, but D3D docs say that 0 means D3DADAPTER_DEFAULT, the "primary adapter" - when in fullscreen the game shows up on the 90Hz monitor too, so I'd guess that's the primary one.

from re4_tweaks.

nipkownix avatar nipkownix commented on July 25, 2024

Ah, two monitors? Time for me to create another virtual display then.

Edit: no dice. My settings:

Real monitor (60Hz only):
image

Fake monitor (60 + 90Hz):
image

Either this doesn't affect me because I'm not using a "real" monitor (which should make no difference as far as Windows/Applications are concerned), or maybe.. Because I'm using AMD instead of NV?

from re4_tweaks.

emoose avatar emoose commented on July 25, 2024

Wrote a quick app to run EnumAdapterModes, and seems 90Hz modes are missing for adapter 0...

#0 - 640x480@59
#1 - 640x480@60
#2 - 720x480@59
#3 - 720x480@60
#4 - 720x576@59
#5 - 720x576@60
#6 - 800x600@59
#7 - 800x600@60
#8 - 1024x768@59
#9 - 1024x768@60
#10 - 1152x864@59
#11 - 1152x864@60
#12 - 1280x720@59
#13 - 1280x720@60
#14 - 1280x768@59
#15 - 1280x768@60
#16 - 1280x800@59
#17 - 1280x800@60
#18 - 1280x960@59
#19 - 1280x960@60
#20 - 1280x1024@59
#21 - 1280x1024@60
#22 - 1360x768@59
#23 - 1360x768@60
#24 - 1366x768@59
#25 - 1366x768@60
#26 - 1600x900@59
#27 - 1600x900@60
#28 - 1600x1024@59
#29 - 1600x1024@60
#30 - 1600x1200@59
#31 - 1600x1200@60
#32 - 1680x1050@59
#33 - 1680x1050@60
#34 - 1920x1080@59
#35 - 1920x1080@60
#36 - 1920x1200@59
#37 - 1920x1200@60
#38 - 1920x1440@59
#39 - 1920x1440@60
#40 - 2560x1440@59
#41 - 2560x1440@60

Strangely it seems adapter 0 is actually my 90Hz display though, using adapter 1 it gives portrait resolutions since the non-90Hz screen is in portrait.

No idea why D3D isn't seeing the 90Hz display... I guess this shows there is a chance the desktop refresh rate & the d3d rates could be different though, maybe need to add something to handle that somehow.

E: hmm.. this doesn't explain why unplugging second monitor stopped it from crashing though, even with it unplugged I get the same modes from EnumAdapterModes... how does the game work with that though? strange.

E2: okay seems g_UserRefreshRate is being set to 59 when I have second monitor unplugged - seems NV was resetting it back to 59Hz. If I go back to 90Hz in NVCP and try options again then it also crashes, so seems dual monitors aren't related to it.

from re4_tweaks.

nipkownix avatar nipkownix commented on July 25, 2024

I see.

No idea why D3D isn't seeing the 90Hz display...

Could this be due to how nvidia is forcing the non-standard refresh rate? If so, no one with a "normal" setup should face this issue.

E: hmm.. this doesn't explain why unplugging second monitor stopped it from crashing though, even with it unplugged I get the same modes from EnumAdapterModes... how does the game work with that though? strange.

Could the game be trying to run EnumAdapterModes on the secondary monitor instead of the first one? If so, this would end up making the list empty since it is then looking for resolutions with g_UserRefreshRate, and those are only available in the first monitor.

Would explain why some people actually fix the black screen issue by simply plugging in a secondary 60Hz monitor. And we're just doing.. the inverse, I guess.

from re4_tweaks.

emoose avatar emoose commented on July 25, 2024

Yeah it seems to be an NV issue... using NV custom resolutions isn't a normal setup, but I know there's a bunch of guides around for using NVCP to overclock to higher refresh rates, so most likely will be others that run into this eventually.

Don't really think the second monitor is related with this, neither adapters seemed to include the 90Hz mode anyway, I guess NV just isn't setting D3D9 modes up properly for it (I do remember some other games having issues with this too).

Only way I can think of for getting around this would be to maybe ignore refresh rate in the func that populates the resolution list - I don't really think refresh rate is that important for that code anyway, seems like they might have only limited it to 60Hz there to prevent duplicates (since some people have both 59 & 60 modes for the same resolutions), could be wrong though.

Would probably need to reimplement that func so it could check for dupe width/height combinations instead though... luckily it's not too complex, maybe will try looking into it soon.

from re4_tweaks.

emoose avatar emoose commented on July 25, 2024

Oh wow, the game actually already has code for checking for dupes by width/height instead of refresh rate, but it's unused :o

The check at 0x953513 is checking if a2 == true, but none of the calls to that func set that to true, changing that jnz to jmp instead lets it check for dupes properly, with that it seems to work with 90Hz fine!

Options screen seems to be working fine, can change resolutions etc. Wonder why they left that unused.

from re4_tweaks.

nipkownix avatar nipkownix commented on July 25, 2024

Nice find!

Wonder why they left that unused.

I mean, why even force 60Hz in the first place? Makes no sense at all. I mean, Q-LOC isn't really incompetent, but I really don't understand what they were thinking here.

from re4_tweaks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.