mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-28 06:43:01 +05: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
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue