From 927fd0adef665ee4a687ddac1f679599243e433f Mon Sep 17 00:00:00 2001 From: Florin9doi Date: Sat, 31 Oct 2020 16:26:56 +0200 Subject: [PATCH] Resolve 64bit crashes --- src/usb-mic/audiodev-wasapi.cpp | 4 ++-- src/usb-pad/raw/raw-config.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/usb-mic/audiodev-wasapi.cpp b/src/usb-mic/audiodev-wasapi.cpp index fdb9467d..16238b41 100644 --- a/src/usb-mic/audiodev-wasapi.cpp +++ b/src/usb-mic/audiodev-wasapi.cpp @@ -898,12 +898,12 @@ static BOOL CALLBACK WASAPIDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lPa switch (uMsg) { case WM_CREATE: - SetWindowLongPtr(hW, GWLP_USERDATA, (LONG)lParam); + SetWindowLongPtr(hW, GWLP_USERDATA, lParam); break; case WM_INITDIALOG: { s = (WASAPISettings *)lParam; - SetWindowLongPtr(hW, GWLP_USERDATA, (LONG)lParam); + SetWindowLongPtr(hW, GWLP_USERDATA, lParam); int buffering = 50; LoadSetting(s->dev_type, s->port, APINAME, N_BUFFER_LEN_SRC, buffering); diff --git a/src/usb-pad/raw/raw-config.cpp b/src/usb-pad/raw/raw-config.cpp index 16b5b5d2..ac3e0282 100644 --- a/src/usb-pad/raw/raw-config.cpp +++ b/src/usb-pad/raw/raw-config.cpp @@ -666,7 +666,7 @@ INT_PTR CALLBACK ConfigureRawDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM l if(!InitHid()) return FALSE; dgHwnd = hW; - SetWindowLongPtr(hW, GWLP_USERDATA, (LONG)lParam); + SetWindowLongPtr(hW, GWLP_USERDATA, lParam); //SendDlgItemMessage(hW, IDC_BUILD_DATE, WM_SETTEXT, 0, (LPARAM)__DATE__ " " __TIME__); ListView_SetExtendedListViewStyle(GetDlgItem(hW, IDC_LIST1), LVS_EX_FULLROWSELECT);