Skip to content

Fix CPU affinity during startup#4733

Merged
FileEX merged 1 commit intomultitheftauto:masterfrom
FileEX:bugfix/cpu_affinity
Feb 28, 2026
Merged

Fix CPU affinity during startup#4733
FileEX merged 1 commit intomultitheftauto:masterfrom
FileEX:bugfix/cpu_affinity

Conversation

@FileEX
Copy link
Member

@FileEX FileEX commented Feb 28, 2026

Summary

Previously, CPU affinity was set during early process initialization (Core constructor / startup hook). At that point, GTA had not yet finished creating its worker threads, which could result in the affinity mask not being properly respected. This caused inconsistent performance. The affinity logic has now been moved to the Direct3D device creation stage, when the game has completed its main initialization and all major threads have been spawned.

Motivation

image

Test plan

N/A

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@FileEX FileEX requested a review from a team as a code owner February 28, 2026 13:43
@FileEX FileEX added the bugfix Solution to a bug of any kind label Feb 28, 2026
@FileEX FileEX enabled auto-merge (squash) February 28, 2026 21:23
@FileEX FileEX merged commit afb6fd7 into multitheftauto:master Feb 28, 2026
9 checks passed
@FileEX FileEX deleted the bugfix/cpu_affinity branch February 28, 2026 21:27
@FileEX FileEX added this to the 1.7 (Current) milestone Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants