Skip to content

Commit 4ac1367

Browse files
committed
Introduce INT_PTR_COMPAT
1 parent b3b1c82 commit 4ac1367

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

GolDP/include/goldevicelist.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#include <d3d.h>
77
#include <windows.h>
88

9+
#if defined(_MSC_VER) && _MSC_VER < 1300
10+
typedef int INT_PTR_COMPAT;
11+
#else
12+
typedef INT_PTR INT_PTR_COMPAT;
13+
#endif
14+
915
template <typename T>
1016
class GolVector {
1117
GolVector()
@@ -104,7 +110,7 @@ class GolDeviceList {
104110
const char* p_type,
105111
const char* p_text
106112
);
107-
static int CALLBACK SelectDeviceDlgProc(HWND p_hWnd, UINT p_uMsg, WPARAM p_wParam, LPARAM p_lParam);
113+
static INT_PTR_COMPAT CALLBACK SelectDeviceDlgProc(HWND p_hWnd, UINT p_uMsg, WPARAM p_wParam, LPARAM p_lParam);
108114

109115
// GolVector<GolD3DDriverInfo> m_drivers;
110116
LegoU32 m_countDrivers;

GolDP/src/goldevicelist.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ GolDeviceList::GolD3DDeviceInfo* GolDeviceList::SelectDevice(
168168
);
169169
StoreDialogItem(&writePtr, SS_LEFT, 5, 5, 22, 13, -1, "STATIC", "Driver:");
170170
StoreDialogItem(&writePtr, SS_LEFT, 5, 24, 29, 13, -1, "STATIC", "Device:");
171-
int result = DialogBoxIndirectParam(
171+
int result = DialogBoxIndirectParamA(
172172
hInstance,
173173
dialogTemplate,
174174
p_hWnd,
@@ -513,7 +513,7 @@ void GolDeviceList::StoreDialogItem(
513513
}
514514

515515
// FUNCTION: GOLDP 0x100145a0
516-
int GolDeviceList::SelectDeviceDlgProc(HWND p_hWnd, UINT p_uMsg, WPARAM p_wParam, LPARAM p_lParam)
516+
INT_PTR_COMPAT GolDeviceList::SelectDeviceDlgProc(HWND p_hWnd, UINT p_uMsg, WPARAM p_wParam, LPARAM p_lParam)
517517
{
518518
if (p_uMsg == WM_INITDIALOG) {
519519
s_DialogDeviceList = reinterpret_cast<GolDeviceList*>(p_lParam);

0 commit comments

Comments
 (0)