Skip to content

Commit

Permalink
Many fixes made
Browse files Browse the repository at this point in the history
  • Loading branch information
Wunder-Wulfe committed Apr 5, 2022
1 parent 11face8 commit 79e4255
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CDriverSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ bool CDriverSettings::UpdateConfig(const CServerDriver *source)
{
return SetConfigVector(SECTION_POS, source->m_nvInterface->GetCameraPos())
&& SetConfigVector(SECTION_ROT, source->m_camBryan)
&& SetConfigVector(SECTION_TRACK_SCALE, source->m_scaleFactor);
//&& SetConfigInteger(SECTION_CAMSET, KEY_CAM_INDEX, source->m_cameraDriver->GetIndex());
&& SetConfigVector(SECTION_TRACK_SCALE, source->m_scaleFactor)
&& SetConfigInteger(SECTION_CAMSET, KEY_CAM_INDEX, source->camIndex);
}

bool CDriverSettings::SaveConfig()
Expand Down
2 changes: 1 addition & 1 deletion CDriverSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class CDriverSettings
inline const char *GetConfigCString(const char *section, const char *key, const char *def = "") const { return m_iniFile.GetValue(section, key, def); }
inline const std::string GetConfigString(const char *section, const char *key, const std::string &def = std::string("")) const { return std::string(m_iniFile.GetValue(section, key, def.c_str())); }

inline bool SetConfigInteger(const char *section, const char *key, int value) { _itoa_s(value, m_tempBuffer, BUFFER_SIZE); return 0 == m_iniFile.SetValue(section, key, m_tempBuffer); }
inline bool SetConfigInteger(const char *section, const char *key, int value) { _itoa_s(value, m_tempBuffer, 10); return 0 == m_iniFile.SetValue(section, key, m_tempBuffer); }
inline bool SetConfigFloat(const char *section, const char *key, float value) { return 0 == m_iniFile.SetDoubleValue(section, key, (double)value); }
bool SetConfigVector(const char *section, const glm::vec3 value);
bool SetConfigQuaternion(const char *section, const glm::quat value);
Expand Down
4 changes: 3 additions & 1 deletion CServerDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ void CServerDriver::OnCameraUpdate(const CCameraDriver &me, int index)
ptrsafe(me.driver);
ptrsafe(me.driver->m_nvInterface);

me.driver->camIndex = index;

me.driver->m_nvInterface->SetFPS(me.GetFps());
vr_log("Attempting to load the image from the camera onto GPU memory\n");
me.driver->m_nvInterface->LoadImageFromCam(me.m_currentCamera);
Expand Down Expand Up @@ -400,7 +402,7 @@ void CServerDriver::Cleanup()

m_cameraDriver->m_working = false;

m_camThread->join();
//m_camThread->join();

delptr(m_cameraDriver);
delptr(m_camThread);
Expand Down
1 change: 1 addition & 0 deletions CServerDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class CServerDriver final : public vr::IServerTrackedDeviceProvider
glm::vec3 m_camBryan;
uint m_frame;
bool mirrored;
int camIndex;

vr::TrackedDevicePose_t m_hmd_controller_pose[3]{};

Expand Down

0 comments on commit 79e4255

Please sign in to comment.