Skip to content

Restore Windows 7 compatibility#160

Merged
smartcmd merged 3 commits intomainfrom
dpi-awareness-runtime-switch
Mar 2, 2026
Merged

Restore Windows 7 compatibility#160
smartcmd merged 3 commits intomainfrom
dpi-awareness-runtime-switch

Conversation

@void2012
Copy link
Collaborator

@void2012 void2012 commented Mar 2, 2026

Pull Request

Description

Shcore.dll and SetProcessDpiAwareness were introduced in Windows 8 and higher, so to keep compatibility with Windows 7, we use GetProcAddress to call this function dynamically, avoiding linker writing binary dependency on shcore.dll in the import table.

Changes

Previous Behavior

After #133, the game started to depend on shcore.dll, which is present on Windows 8 and higher and call the function SetProcessDpiAwareness via the import table.

Root Cause

SetProcessDpiAwareness and shcore.dll aren't present on Windows 7

New Behavior

This fix restores Windows 7 compatibility

Fix Implementation

dynamically call SetProcessDpiAwareness via GetProcAddress via LoadLibraryExW.

Related Issues

void2012 added 3 commits March 3, 2026 01:11
…compatibility

Shcore.dll and SetProcessDpiAwareness were introduced in Windows 8 and higher, so to keep compatibility with Windows 7, we use GetProcAddress to call this function dynamically, avoiding linker writing binary dependency on shcore.dll in the import table
@smartcmd smartcmd merged commit 5a9e512 into main Mar 2, 2026
@Aerocatia
Copy link

Please squash these reverts, or use git reset HEAD~1 and re-commit it. There are a lot of reverts polluting git history here.

void2012 added a commit that referenced this pull request Mar 2, 2026
@void2012
Copy link
Collaborator Author

void2012 commented Mar 2, 2026

Fixed finally with 796a743

@void2012 void2012 deleted the dpi-awareness-runtime-switch branch March 2, 2026 20:54
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.

latest build breaks win7 compatibility

3 participants