mirror of
https://github.com/OpenTrespasser/JurassicParkTrespasser.git
synced 2024-12-25 01:51:56 +00:00
Compare commits
4 Commits
223881eae3
...
e6698f85a4
Author | SHA1 | Date | |
---|---|---|---|
|
e6698f85a4 | ||
|
5bd95ec56c | ||
|
55c526309f | ||
|
4953355deb |
@ -771,6 +771,14 @@ void CEnumerateDevices::WriteSelectedDeviceToRegistry()
|
|||||||
SetZBufferBitdepth(dev.d3dDevice.iZBufferBitDepth);
|
SetZBufferBitdepth(dev.d3dDevice.iZBufferBitDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CEnumerateDevices::LoadSelectedDeviceFromRegistry()
|
||||||
|
{
|
||||||
|
char str_title[2048] = { '\0' };
|
||||||
|
GetRegString(strD3D_TITLE, str_title, sizeof(str_title), "");
|
||||||
|
|
||||||
|
SelectDevice(str_title);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Global variables.
|
// Global variables.
|
||||||
|
@ -150,8 +150,10 @@ public:
|
|||||||
return Devices[iSelectedDevice];
|
return Devices[iSelectedDevice];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadSelectedDeviceFromRegistry();
|
||||||
void WriteSelectedDeviceToRegistry();
|
void WriteSelectedDeviceToRegistry();
|
||||||
|
|
||||||
|
int GetSelectedDeviceIndex() const { return iSelectedDevice; }
|
||||||
void SelectDevice(char* str);
|
void SelectDevice(char* str);
|
||||||
|
|
||||||
void GetTitle(int i, char* str) const;
|
void GetTitle(int i, char* str) const;
|
||||||
|
@ -273,6 +273,11 @@ void CConfigureWnd::InitializeCardSelection()
|
|||||||
penumdevDevices->GetTitle(i, str);
|
penumdevDevices->GetTitle(i, str);
|
||||||
ListBox_AddString(m_hwndList, str);
|
ListBox_AddString(m_hwndList, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
penumdevDevices->LoadSelectedDeviceFromRegistry();
|
||||||
|
int selectedDevice = penumdevDevices->GetSelectedDeviceIndex();
|
||||||
|
if (selectedDevice >= 0 && selectedDevice < iMaxDevices)
|
||||||
|
penumdevDevices->GetTitle(penumdevDevices->GetSelectedDeviceIndex(), str);
|
||||||
|
|
||||||
// Attempt to select a string.
|
// Attempt to select a string.
|
||||||
ListBox_SelectString(m_hwndList, 0, str);
|
ListBox_SelectString(m_hwndList, 0, str);
|
||||||
|
Loading…
Reference in New Issue
Block a user