This repository has been archived by the owner on Jan 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Battlefield 2 → crash at launch #405
Comments
Trace works fine.. Can you try playing in windowed mode. Looks like a weird setup issue on your end. |
Yes, it doesn't crash in windowed mode. |
This is a very well known and long standing issue with BF2:
The game attempts to a display mode 800x600 85Hz, which very few displays support. This can be worked around by applying a patch to Wine to allow setting a fallback display frequency. |
I see. But it doesn't crash with d3d9, so why a patch for Wine? |
Can you try this patch? diff --git a/src/d3d9/d3d9_monitor.cpp b/src/d3d9/d3d9_monitor.cpp
index a1af87653..b6e0d6c5b 100644
--- a/src/d3d9/d3d9_monitor.cpp
+++ b/src/d3d9/d3d9_monitor.cpp
@@ -108,6 +108,14 @@ namespace dxvk {
LONG status = ::ChangeDisplaySettingsExW(
monInfo.szDevice, &devMode, nullptr, CDS_FULLSCREEN, nullptr);
+
+ if (status != DISP_CHANGE_SUCCESSFUL) {
+ // Try again but without setting the frequency.
+ devMode.dmFields &= ~DM_DISPLAYFREQUENCY;
+ devMode.dmDisplayFrequency = 0;
+ status = ::ChangeDisplaySettingsExW(
+ monInfo.szDevice, &devMode, nullptr, CDS_FULLSCREEN, nullptr);
+ }
return status == DISP_CHANGE_SUCCESSFUL ? D3D_OK : D3DERR_NOTAVAILABLE;
} |
Yes, the issue is solved with this patch :) |
misyltoad
added a commit
that referenced
this issue
Oct 8, 2019
misyltoad
added a commit
that referenced
this issue
Oct 13, 2019
misyltoad
added a commit
that referenced
this issue
Oct 16, 2019
misyltoad
added a commit
that referenced
this issue
Oct 28, 2019
misyltoad
added a commit
that referenced
this issue
Nov 9, 2019
misyltoad
added a commit
that referenced
this issue
Nov 17, 2019
misyltoad
added a commit
that referenced
this issue
Nov 20, 2019
misyltoad
added a commit
that referenced
this issue
Nov 26, 2019
misyltoad
added a commit
that referenced
this issue
Nov 27, 2019
misyltoad
added a commit
that referenced
this issue
Dec 6, 2019
misyltoad
added a commit
that referenced
this issue
Dec 13, 2019
misyltoad
added a commit
that referenced
this issue
Dec 16, 2019
misyltoad
added a commit
that referenced
this issue
Dec 16, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A black screen then it crashes.
System information
Apitrace file(s)
https://mega.nz/#!ynhWQQjK!8mC_JQrJhRguCAJ8RESqV3wJ-2vwshRntMq3nM2FTsE
Log files
battlefield-2-d9vk.log
The text was updated successfully, but these errors were encountered: