Skip to content

Fix error code 87 when setting affinity. Add logging to Limit CPU Cores. - #122

Merged
KevinW1998 merged 1 commit into
ProjectCeleste:masterfrom
CWO333:master
Aug 22, 2026
Merged

KevinW1998 merged 1 commit into
ProjectCeleste:masterfrom
CWO333:master

Conversation

@CWO333

@CWO333 CWO333 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Enabling Limit CPU Cores by default has revealed an issue affecting a small number of players. If their machine (or Virtual Machine) has less then 4 Logical CPU Threads, Win32 throws error code 87 (Invalid Parameter) and crashes the game when setting the affinity.

This pull adds a few log lines to the Limit CPU Cores option and checks if there are more than 4 Logical CPU Threads before trying to clamp to 4. The Affinity log line should always return "15" when it works properly. This is correct since the 4 internally is a bitmask (00001111) and not an integer.

@KevinW1998
KevinW1998 merged commit c462ff7 into ProjectCeleste:master Aug 22, 2026
1 check passed
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.

2 participants