mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-22 05:22:32 +01:00
SA: Use DWLP_USER in the resolution dialog
GWLP_USERDATA was unlikely to cause issues, but it's technically reserved since we didn't create the window class ourselves. DWLP_USER is guaranteed to be free for us to use.
This commit is contained in:
parent
f1d85b825b
commit
17baa64613
@ -2719,7 +2719,7 @@ namespace NewResolutionSelectionDialog
|
||||
if (msg == WM_INITDIALOG)
|
||||
{
|
||||
const WrappedDialocFunc* data = reinterpret_cast<WrappedDialocFunc*>(lParam);
|
||||
SetWindowLongPtr(window, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(data->lpDialogFunc));
|
||||
SetWindowLongPtr(window, DWLP_USER, reinterpret_cast<LONG_PTR>(data->lpDialogFunc));
|
||||
|
||||
data->lpDialogFunc(window, msg, wParam, data->dwInitParam);
|
||||
|
||||
@ -2758,7 +2758,7 @@ namespace NewResolutionSelectionDialog
|
||||
}
|
||||
}
|
||||
|
||||
DLGPROC origProc = reinterpret_cast<DLGPROC>(GetWindowLongPtr(window, GWLP_USERDATA));
|
||||
DLGPROC origProc = reinterpret_cast<DLGPROC>(GetWindowLongPtr(window, DWLP_USER));
|
||||
if (origProc != nullptr)
|
||||
{
|
||||
return origProc(window, msg, wParam, lParam);
|
||||
|
Loading…
Reference in New Issue
Block a user