@@ -19,7 +19,7 @@ vr::EVRInitError SlimeVRDriver::VRDriver::Init(vr::IVRDriverContext* pDriverCont
1919 auto path = std::string { doc.get_object ()[" config" ].at (0 ).get_string ().value () };
2020 default_chap_path_ = GetDefaultChaperoneFromConfigPath (path);
2121 } catch (simdjson::simdjson_error& e) {
22- logger_->Log (" Error getting VR Config path, continuing: %s " , e.error ());
22+ logger_->Log (" Error getting VR Config path, continuing (error code {}) " , std::to_string ( e.error () ));
2323 }
2424
2525 logger_->Log (" SlimeVR Driver Loaded Successfully" );
@@ -92,7 +92,7 @@ void SlimeVRDriver::VRDriver::RunPoseRequestThread() {
9292 }
9393 }
9494 } else if (universe_error != last_universe_error_) {
95- logger_->Log (" Failed to find current universe: Prop_CurrentUniverseId_Uint64 error = %s " ,
95+ logger_->Log (" Failed to find current universe: Prop_CurrentUniverseId_Uint64 error = {} " ,
9696 vr::VRPropertiesRaw ()->GetPropErrorNameFromEnum (universe_error)
9797 );
9898 }
@@ -218,7 +218,7 @@ void SlimeVRDriver::VRDriver::OnBridgeMessage(const messages::ProtobufMessage& m
218218 { messages::TrackerStatus_Status_BUSY, " BUSY" },
219219 };
220220 if (status_map.count (status.status ())) {
221- logger_->Log (" Tracker status id %i status %s " , status.tracker_id (), status_map.at (status.status ()). c_str ( ));
221+ logger_->Log (" Tracker status id {} status {} " , status.tracker_id (), status_map.at (status.status ()));
222222 }
223223 }
224224 } else if (message.has_battery ()) {
@@ -280,19 +280,19 @@ bool SlimeVRDriver::VRDriver::AddDevice(std::shared_ptr<IVRDevice> device) {
280280 devices_.push_back (device);
281281 devices_by_id_[device->GetDeviceId ()] = device;
282282 devices_by_serial_[device->GetSerial ()] = device;
283- logger_->Log (" New tracker device added %s (id %i )" , device->GetSerial (). c_str (), device->GetDeviceId ());
283+ logger_->Log (" New tracker device added {} (id {} )" , device->GetSerial (), device->GetDeviceId ());
284284 } else {
285- logger_->Log (" Failed to add tracker device %s (id %i )" , device->GetSerial (). c_str (), device->GetDeviceId ());
285+ logger_->Log (" Failed to add tracker device {} (id {} )" , device->GetSerial (), device->GetDeviceId ());
286286 return false ;
287287 }
288288 } else {
289289 std::shared_ptr<IVRDevice> oldDevice = devices_by_serial_[device->GetSerial ()];
290290 if (oldDevice->GetDeviceId () != device->GetDeviceId ()) {
291291 devices_by_id_[device->GetDeviceId ()] = oldDevice;
292292 oldDevice->SetDeviceId (device->GetDeviceId ());
293- logger_->Log (" Device overridden from id %i to %i for serial %s " , oldDevice->GetDeviceId (), device->GetDeviceId (), device->GetSerial ());
293+ logger_->Log (" Device overridden from id {} to {} for serial {} " , oldDevice->GetDeviceId (), device->GetDeviceId (), device->GetSerial ());
294294 } else {
295- logger_->Log (" Device readded id %i , serial %s " , device->GetDeviceId (), device->GetSerial (). c_str ());
295+ logger_->Log (" Device readded id {} , serial {} " , device->GetDeviceId (), device->GetSerial ());
296296 }
297297 }
298298 return true ;
@@ -407,7 +407,7 @@ std::optional<SlimeVRDriver::UniverseTranslation> SlimeVRDriver::VRDriver::Searc
407407 }
408408 }
409409 } catch (simdjson::simdjson_error& e) {
410- logger_->Log (" Error getting universes from %s: %s " , path. c_str () , e.what ());
410+ logger_->Log (" Error getting universes from {}: {} " , path, e.what ());
411411 return std::nullopt ;
412412 }
413413
0 commit comments