Changed: Use toString instead of std::stringstream
This commit is contained in:
parent
8a09f68b7b
commit
99f5dd2443
1 changed files with 6 additions and 12 deletions
|
@ -46,9 +46,6 @@
|
||||||
// Ligo.
|
// Ligo.
|
||||||
#include "nel/ligo/ligo_config.h"
|
#include "nel/ligo/ligo_config.h"
|
||||||
|
|
||||||
// Std.
|
|
||||||
#include <fstream>
|
|
||||||
#include <sstream>
|
|
||||||
// Client
|
// Client
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
@ -578,14 +575,12 @@ void listStereoDisplayDevices(std::vector<NL3D::CStereoDeviceInfo> &devices)
|
||||||
IStereoDisplay::listDevices(devices);
|
IStereoDisplay::listDevices(devices);
|
||||||
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
||||||
{
|
{
|
||||||
std::stringstream name;
|
std::string name = toString("%s - %s - %s", IStereoDisplay::getLibraryName(it->Library), it->Manufacturer.c_str(), it->ProductName.c_str());
|
||||||
name << IStereoDisplay::getLibraryName(it->Library) << " - " << it->Manufacturer << " - " << it->ProductName;
|
std::string fullname = toString("[%s] [%s]", name.c_str(), it->Serial.c_str());
|
||||||
std::stringstream fullname;
|
nlinfo("VR [C]: Stereo Display: %s", name.c_str());
|
||||||
fullname << std::string("[") << name.str() << "] [" << it->Serial << "]";
|
|
||||||
nlinfo("VR [C]: Stereo Display: %s", name.str().c_str());
|
|
||||||
if (cache)
|
if (cache)
|
||||||
{
|
{
|
||||||
VRDeviceCache.push_back(std::pair<std::string, std::string>(name.str(), it->Serial)); // VR_CONFIG
|
VRDeviceCache.push_back(std::pair<std::string, std::string>(name, it->Serial)); // VR_CONFIG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -623,9 +618,8 @@ void initStereoDisplayDevice()
|
||||||
{
|
{
|
||||||
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
||||||
{
|
{
|
||||||
std::stringstream name;
|
std::string name = toString("%s - %s - %s", IStereoDisplay::getLibraryName(it->Library), it->Manufacturer.c_str(), it->ProductName.c_str());
|
||||||
name << IStereoDisplay::getLibraryName(it->Library) << " - " << it->Manufacturer << " - " << it->ProductName;
|
if (name == ClientCfg.VRDisplayDevice)
|
||||||
if (name.str() == ClientCfg.VRDisplayDevice)
|
|
||||||
deviceInfo = &(*it);
|
deviceInfo = &(*it);
|
||||||
if (ClientCfg.VRDisplayDeviceId == it->Serial)
|
if (ClientCfg.VRDisplayDeviceId == it->Serial)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue