Repository navigation
3.2.0
MORPHIX v3.2.0
Release date: 2026-03-06
Bug Fixes
-
Refresh Res button reset selections — clicking Refresh Res read
config.inifrom disk to restore combo selections; if the INI was stale or the drive was slow, selections could silently fall back to the first item. Now reads from an in-memory cache that is always in sync with the last Save & Apply. -
Full-window repaint on hotkey press — pressing F7 or F8 invalidated the entire 666×448 window even though only the preset card area (y 132–304) changes. On slower integrated GPUs this caused a visible flicker. Invalidation is now scoped to the preset card rect only.
-
GDI handle leak risk in paint paths — every WM_PAINT, WM_DRAWITEM, and combo repaint event was calling
CreateSolidBrush/CreatePenfollowed byDeleteObject. Across rapid mouse movement over buttons or scrolling the dropdown, this produced bursty GDI heap traffic. All transient GDI objects in hot paths have been replaced with pre-created handles.
Key Changes
GDI object caching
Nine GDI objects that were previously allocated and freed on every render event are now created once at WM_CREATE and destroyed at WM_DESTROY:
| Handle | Value | Used in |
|---|---|---|
hBrushAccent |
COL_ACCENT |
monitor accent bar, combo selected row |
hBrushAccent2 |
COL_ACCENT2 |
Save & Apply button normal state |
hBrushGreen |
COL_GREEN |
active preset top bar and bottom bar |
hBrushHotlight |
RGB(38, 38, 52) |
Refresh Res hover state |
hBrushText2 |
COL_TEXT2 |
combo dropdown chevron fill |
hPenGreen |
2 px COL_GREEN |
active preset card border |
hPenAccent3 |
1 px COL_ACCENT3 |
Save & Apply button border |
hPenAccent2Thin |
1 px COL_ACCENT2 |
Refresh Res hover border |
hPenText2 |
1 px COL_TEXT2 |
combo dropdown chevron outline |
Before: up to 14 GDI alloc/free pairs per frame (5 in WM_PAINT + up to 9 across three combo repaints).
After: zero allocations in any paint or draw path.
Resolution string cache
g_savedRes1[64] and g_savedRes2[64] hold the last-written resolution strings from SaveConfig() and are populated on startup by LoadConfig(). The Refresh Res click handler now reads these instead of calling GetPrivateProfileStringA twice.
Partial window invalidation
All three InvalidateRect(hwnd, NULL, FALSE) calls in WM_HOTKEY changed to InvalidateRect(hwnd, &rcPresets, FALSE) where rcPresets = {12, 132, 654, 304}. The header, monitor card, and footer rows are not repainted on hotkey-triggered preset switches.
Internal
- Split monolithic
main.cppinto focused translation units:globals.h,utils.cpp,display.cpp,config.cpp,font.cpp,controls.cpp,wndproc.cpp,main.cpp. compile.batupdated for multi-file build.
Support
- Issues: GitHub Issues
- License: MIT