Skip to content

Commit 38442d3

Browse files
committed
fix
1 parent 41a78bd commit 38442d3

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

TOVR/C++/TOVR/TOVR.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,21 @@ void DriverAttach() {
6767
}
6868
key.Close();
6969

70-
CString _driversPath(driversPath);
71-
CString _driverName(driverName);
70+
if (status == ERROR_SUCCESS) {
71+
CString _driversPath(driversPath);
72+
CString _driverName(driverName);
7273

73-
if (PathFileExists(_driversPath + _driverName)) {
74+
if (PathFileExists(_driversPath + _driverName)) {
7475

75-
hDll = LoadLibrary(_driversPath + _driverName);
76+
hDll = LoadLibrary(_driversPath + _driverName);
7677

77-
if (hDll != NULL) {
78+
if (hDll != NULL) {
7879

79-
DriverGetHMDData = (_GetHMDData)GetProcAddress(hDll, "GetHMDData");
80-
DriverGetControllersData = (_GetControllersData)GetProcAddress(hDll, "GetControllersData");
81-
DriverSetControllerData = (_SetControllerData)GetProcAddress(hDll, "SetControllerData");
82-
DriverSetCentering = (_SetCentering)GetProcAddress(hDll, "SetCentering");
80+
DriverGetHMDData = (_GetHMDData)GetProcAddress(hDll, "GetHMDData");
81+
DriverGetControllersData = (_GetControllersData)GetProcAddress(hDll, "GetControllersData");
82+
DriverSetControllerData = (_SetControllerData)GetProcAddress(hDll, "SetControllerData");
83+
DriverSetCentering = (_SetCentering)GetProcAddress(hDll, "SetCentering");
84+
}
8385
}
8486
}
8587
}
@@ -88,9 +90,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser
8890
{
8991
switch (ul_reason_for_call)
9092
{
91-
case DLL_PROCESS_ATTACH: {
92-
//DriverAttach();
93-
}
93+
case DLL_PROCESS_ATTACH: //DriverAttach();
9494

9595
case DLL_PROCESS_DETACH: {
9696
if (hDll != NULL) {

0 commit comments

Comments
 (0)