Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[d3d8] Stub DebugSetMute to fix C&C:Generals performance #4342

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

WinterSnowfall
Copy link
Contributor

@WinterSnowfall WinterSnowfall commented Oct 10, 2024

This has to be like the dumbest thing ever, but C&C: Generals is spamming calls to DebugSetMute() every frame whenever the slowdowns occur. Stubbing it makes it not choke. Fixes #4112.

Copy link
Owner

@doitsujin doitsujin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is internal and not intended to be used by software developers.

Ah yeah, as if that has ever stopped anyone.

src/d3d8/d3d8_main.cpp Show resolved Hide resolved
@doitsujin doitsujin merged commit 44b6820 into doitsujin:master Oct 10, 2024
4 checks passed
@WinterSnowfall WinterSnowfall deleted the d3d8-generals branch October 10, 2024 11:09
@netborg-afps
Copy link

netborg-afps commented Oct 14, 2024

In case the game will break again in the future, it may be worth pointing out that the reason this patch works is actually that inserting this function made the code/data alignment properties fall more in line to what the game is expecting.

@misyltoad
Copy link
Collaborator

no it doesn't

@netborg-afps
Copy link

Well to my understanding it does, as running the game through a simple wrapper on the pre-patch dxvk was solving this issue too, where DebugSetMute() was not defined.

@misyltoad
Copy link
Collaborator

because that wrapper stubs the function.

@netborg-afps
Copy link

No, it was my own experimental wrapper only defining Direct3DCreate8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[d3d8] C&C: Generals/Zero Hour - menu slowdown
4 participants