BramTeurlings / 3DGameBridge

Wrapper Project for easy implementation of function in any 3D Game Bridge project
GNU General Public License v3.0
0 stars 0 forks source link

[GB-213] Weaving is not possible, window is occluded DirectX9 fullscreen #38

Closed BramTeurlings closed 4 months ago

BramTeurlings commented 5 months ago

For some reason, the window logic of the SR Platform fails when playing a game in DirectX9 in fullscreen mode.

This happens in:

I think this has to be solved within the SR Platform, either by changing the window logic or making a weaving endpoint that overrides the window logic behavior.


Originally reported by , imported from: Weaving is not possible, window is occluded DirectX9 fullscreen
  • assignee:
  • status: Closed
  • priority: Medium
  • resolution: Fixed
  • resolved: 2024-02-22T06:23:38-08:00
  • imported: 2024-04-04
BramTeurlings commented 5 months ago

Subtask of parent task GB-190

BramTeurlings commented 4 months ago

712020:c26664a4-c3de-4473-a0b4-5a76804d5628:

I’ve found the problem and solved it.

Turns out the function in the weaver we use to determine if a window is occluded doesn’t account for windows that are spawned as children of the parent window handle we supply to the weaver.

In directX9, a new window called “D3DProxyWindow” was drawn overtop of the main window which was the same size as the parent. This caused the weaver logic to fail as it incorrectly assumed the window was fully occluded.

The fix is to use GetParent(hWnd) on the child window and check if the resulting hWnd is the same as the one we provided to the weaver before we call parameters->potentialOccluders.push_back(hWnd);

BramTeurlings commented 4 months ago

712020:c26664a4-c3de-4473-a0b4-5a76804d5628:

I was able to reproduce this hypothesis with Tales of Symphonia and Trackmania Nations Forever. Both games use this “D3DProxyWindow” window.

BramTeurlings commented 4 months ago

712020:c26664a4-c3de-4473-a0b4-5a76804d5628:

Merge request: https://10.2.100.100/simulatedreality/srDisplays/merge_requests/165

BramTeurlings commented 4 months ago

712020:c26664a4-c3de-4473-a0b4-5a76804d5628:

Merge request made, message sent to Mike from the platform team for review.

BramTeurlings commented 4 months ago

712020:c26664a4-c3de-4473-a0b4-5a76804d5628:

Blocked until the SR Platform team looks at it.

BramTeurlings commented 4 months ago

712020:c26664a4-c3de-4473-a0b4-5a76804d5628:

This was merged in the 1.30 experimental release. Moving to test.

BramTeurlings commented 4 months ago

712020:f91dd24e-5296-4a9d-90d9-b287c639e252:

Tested in Split second and Dragons Dogma

BramTeurlings commented 3 months ago

[Epic: srReshade addon]