diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index 5a181ab..87cf3ff 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -2719,7 +2719,7 @@ namespace NewResolutionSelectionDialog if (msg == WM_INITDIALOG) { const WrappedDialocFunc* data = reinterpret_cast(lParam); - SetWindowLongPtr(window, GWLP_USERDATA, reinterpret_cast(data->lpDialogFunc)); + SetWindowLongPtr(window, DWLP_USER, reinterpret_cast(data->lpDialogFunc)); data->lpDialogFunc(window, msg, wParam, data->dwInitParam); @@ -2758,7 +2758,7 @@ namespace NewResolutionSelectionDialog } } - DLGPROC origProc = reinterpret_cast(GetWindowLongPtr(window, GWLP_USERDATA)); + DLGPROC origProc = reinterpret_cast(GetWindowLongPtr(window, DWLP_USER)); if (origProc != nullptr) { return origProc(window, msg, wParam, lParam);