mirror of
https://github.com/OpenTrespasser/JurassicParkTrespasser.git
synced 2024-12-24 01:21:57 +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);
|
||||
}
|
||||
|
||||
void CEnumerateDevices::LoadSelectedDeviceFromRegistry()
|
||||
{
|
||||
char str_title[2048] = { '\0' };
|
||||
GetRegString(strD3D_TITLE, str_title, sizeof(str_title), "");
|
||||
|
||||
SelectDevice(str_title);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Global variables.
|
||||
|
@ -150,8 +150,10 @@ public:
|
||||
return Devices[iSelectedDevice];
|
||||
}
|
||||
|
||||
void LoadSelectedDeviceFromRegistry();
|
||||
void WriteSelectedDeviceToRegistry();
|
||||
|
||||
int GetSelectedDeviceIndex() const { return iSelectedDevice; }
|
||||
void SelectDevice(char* str);
|
||||
|
||||
void GetTitle(int i, char* str) const;
|
||||
|
@ -273,6 +273,11 @@ void CConfigureWnd::InitializeCardSelection()
|
||||
penumdevDevices->GetTitle(i, 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.
|
||||
ListBox_SelectString(m_hwndList, 0, str);
|
||||
|
Loading…
Reference in New Issue
Block a user