fix: harden lock/getdc lifecycle and isolate internal dc path#474
Open
weypro wants to merge 4 commits intoFunkyFr3sh:masterfrom
Open
fix: harden lock/getdc lifecycle and isolate internal dc path#474weypro wants to merge 4 commits intoFunkyFr3sh:masterfrom
weypro wants to merge 4 commits intoFunkyFr3sh:masterfrom
Conversation
- split and refine log switches to support category-based output control - enable detailed logs by default under _DEBUG_X, with per-category opt-out flags - add scaling disabled/restored logs for child-window cases in D3D9/GDI/OpenGL paths - add child-window enumeration/tree diagnostics
- validate DDSURFACEDESC/DDSURFACEDESC2 sizes before lock/surface-desc operations - enforce lock and public dc acquisition states to return busy/not-locked/no-dc errors consistently - split internal dc access from public GetDC and route blt/debug/render/hack paths through the internal helper - guard Warcraft/Diablo and Armada unlock hacks on successful internal dc acquisition to avoid invalid dc usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the course of researching how to run Red Alert 2 on newer versions of Windows, I came across this project.
During that process, I noticed that the lifecycle management around
lock/getdcwas not rigorous enough, so I attempted to refactor that part based on my understanding.These changes still need further review to confirm that they do not introduce new issues or behavioral changes.
In addition, this patch also includes some adjustments related to project conventions and log readability.
These changes do not affect functional logic and can be safely merged.