@@ -25,13 +25,6 @@ typedef unsigned int uintptr_t;
2525// GLOBAL: GOLDP 0x10063550
2626GolDeviceList* GolDeviceList::s_DialogDeviceList;
2727
28- // FUNCTION: GOLDP 0x10026100
29- GolDeviceList::GolDeviceList ()
30- {
31- m_countDrivers = 0 ;
32- m_drivers = NULL ;
33- }
34-
3528// FUNCTION: GOLDP 0x10013820
3629void GolDeviceList::DetectDevices ()
3730{
@@ -190,47 +183,6 @@ GolDeviceList::GolD3DDeviceInfo* GolDeviceList::SelectDevice(
190183 return device;
191184}
192185
193- // FUNCTION: GOLDP 0x10013ff0
194- void GolDeviceList::UpdateDialog (HWND p_hWnd)
195- {
196- SendDlgItemMessageA (p_hWnd, IDC_DRIVERS_COMBOBOX , CB_RESETCONTENT , 0 , 0 );
197- SendDlgItemMessageA (p_hWnd, IDC_DEVICES_COMBOBOX , CB_RESETCONTENT , 0 , 0 );
198-
199- for (LegoU32 driverIndex = 0 ; driverIndex < m_countDrivers; driverIndex++) {
200- LegoU32 comboBoxIndex = SendDlgItemMessageA (
201- p_hWnd,
202- IDC_DRIVERS_COMBOBOX ,
203- CB_ADDSTRING ,
204- 0 ,
205- reinterpret_cast <LPARAM >(m_drivers[driverIndex].m_name )
206- );
207- SendDlgItemMessageA (
208- p_hWnd,
209- IDC_DRIVERS_COMBOBOX ,
210- CB_SETITEMDATA ,
211- comboBoxIndex,
212- reinterpret_cast <LPARAM >(&m_drivers[driverIndex])
213- );
214- if (driverIndex == m_driverIndex) {
215- SendDlgItemMessageA (p_hWnd, IDC_DRIVERS_COMBOBOX , CB_SETCURSEL , comboBoxIndex, 0 );
216- }
217- }
218-
219- for (LegoU32 deviceIndex = 0 ; deviceIndex < m_drivers[m_driverIndex].m_countDevices ; deviceIndex++) {
220- GolD3DDeviceInfo* device = &m_drivers[m_driverIndex].m_devices [deviceIndex];
221- LegoU32 comboBoxIndex = SendDlgItemMessageA (
222- p_hWnd,
223- IDC_DEVICES_COMBOBOX ,
224- CB_ADDSTRING ,
225- 0 ,
226- reinterpret_cast <LPARAM >(device->m_description )
227- );
228- if (deviceIndex == m_driverIndex) { // FIXME: should compare against m_deviceIndex
229- SendDlgItemMessageA (p_hWnd, IDC_DEVICES_COMBOBOX , CB_SETCURSEL , comboBoxIndex, 0 );
230- }
231- }
232- }
233-
234186// FUNCTION: GOLDP 0x10013ca0
235187GolDeviceList::GolD3DDeviceInfo* GolDeviceList::FindMatchingDevice (
236188 LegoU32 p_flags,
@@ -333,6 +285,47 @@ GolDeviceList::GolD3DDeviceInfo* GolDeviceList::FindMatchingDevice(
333285 return NULL ;
334286}
335287
288+ // FUNCTION: GOLDP 0x10013ff0
289+ void GolDeviceList::UpdateDialog (HWND p_hWnd)
290+ {
291+ SendDlgItemMessageA (p_hWnd, IDC_DRIVERS_COMBOBOX , CB_RESETCONTENT , 0 , 0 );
292+ SendDlgItemMessageA (p_hWnd, IDC_DEVICES_COMBOBOX , CB_RESETCONTENT , 0 , 0 );
293+
294+ for (LegoU32 driverIndex = 0 ; driverIndex < m_countDrivers; driverIndex++) {
295+ LegoU32 comboBoxIndex = SendDlgItemMessageA (
296+ p_hWnd,
297+ IDC_DRIVERS_COMBOBOX ,
298+ CB_ADDSTRING ,
299+ 0 ,
300+ reinterpret_cast <LPARAM >(m_drivers[driverIndex].m_name )
301+ );
302+ SendDlgItemMessageA (
303+ p_hWnd,
304+ IDC_DRIVERS_COMBOBOX ,
305+ CB_SETITEMDATA ,
306+ comboBoxIndex,
307+ reinterpret_cast <LPARAM >(&m_drivers[driverIndex])
308+ );
309+ if (driverIndex == m_driverIndex) {
310+ SendDlgItemMessageA (p_hWnd, IDC_DRIVERS_COMBOBOX , CB_SETCURSEL , comboBoxIndex, 0 );
311+ }
312+ }
313+
314+ for (LegoU32 deviceIndex = 0 ; deviceIndex < m_drivers[m_driverIndex].m_countDevices ; deviceIndex++) {
315+ GolD3DDeviceInfo* device = &m_drivers[m_driverIndex].m_devices [deviceIndex];
316+ LegoU32 comboBoxIndex = SendDlgItemMessageA (
317+ p_hWnd,
318+ IDC_DEVICES_COMBOBOX ,
319+ CB_ADDSTRING ,
320+ 0 ,
321+ reinterpret_cast <LPARAM >(device->m_description )
322+ );
323+ if (deviceIndex == m_driverIndex) { // FIXME: should compare against m_deviceIndex
324+ SendDlgItemMessageA (p_hWnd, IDC_DEVICES_COMBOBOX , CB_SETCURSEL , comboBoxIndex, 0 );
325+ }
326+ }
327+ }
328+
336329// FUNCTION: GOLDP 0x10014110
337330BOOL GolDeviceList::CountDirectDrawDriversCallback (GUID * p_guid, LPSTR p_name, LPSTR p_description, LPVOID p_context)
338331{
@@ -557,3 +550,10 @@ int GolDeviceList::SelectDeviceDlgProc(HWND p_hWnd, UINT p_uMsg, WPARAM p_wParam
557550 }
558551 return 0 ;
559552}
553+
554+ // FUNCTION: GOLDP 0x10026100
555+ GolDeviceList::GolDeviceList ()
556+ {
557+ m_countDrivers = 0 ;
558+ m_drivers = NULL ;
559+ }
0 commit comments