Event more local8Bit -> UTF8 fixes
This commit is contained in:
parent
19eaaf04ee
commit
e492ddd5a0
10 changed files with 14 additions and 15 deletions
|
@ -247,8 +247,8 @@ do_materials_reload (const SGPropertyNode * arg, SGPropertyNode * root)
|
|||
SGMaterialLib* new_matlib = new SGMaterialLib;
|
||||
SGPath mpath( globals->get_fg_root() );
|
||||
mpath.append( fgGetString("/sim/rendering/materials-file") );
|
||||
bool loaded = new_matlib->load(globals->get_fg_root().local8BitStr(),
|
||||
mpath.local8BitStr(),
|
||||
bool loaded = new_matlib->load(globals->get_fg_root(),
|
||||
mpath,
|
||||
globals->get_props());
|
||||
|
||||
if ( ! loaded ) {
|
||||
|
|
|
@ -359,7 +359,7 @@ static void fgIdleFunction ( void ) {
|
|||
flightgear::initPosition();
|
||||
flightgear::initTowerLocationListener();
|
||||
|
||||
simgear::SGModelLib::init(globals->get_fg_root().local8BitStr(), globals->get_props());
|
||||
simgear::SGModelLib::init(globals->get_fg_root().utf8Str(), globals->get_props());
|
||||
|
||||
auto timeManager = globals->get_subsystem<TimeManager>();
|
||||
timeManager->init();
|
||||
|
|
|
@ -33,7 +33,7 @@ static osg::Node *
|
|||
fgLoad3DModelPanel(const SGPath &path, SGPropertyNode *prop_root)
|
||||
{
|
||||
bool loadPanels = true;
|
||||
osg::Node* node = simgear::SGModelLib::loadModel(path.local8BitStr(), prop_root, NULL, loadPanels);
|
||||
osg::Node* node = simgear::SGModelLib::loadModel(path.utf8Str(), prop_root, NULL, loadPanels);
|
||||
if (node)
|
||||
node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
|
||||
return node;
|
||||
|
|
|
@ -168,9 +168,8 @@ void FGTileMgr::reinit()
|
|||
osgDB::FilePathList &fp = _options->getDatabasePathList();
|
||||
const PathList &sc = globals->get_fg_scenery();
|
||||
fp.clear();
|
||||
PathList::const_iterator it;
|
||||
for (it = sc.begin(); it != sc.end(); ++it) {
|
||||
fp.push_back(it->local8BitStr());
|
||||
for (auto it = sc.begin(); it != sc.end(); ++it) {
|
||||
fp.push_back(it->utf8Str());
|
||||
}
|
||||
_options->setPluginStringData("SimGear::FG_ROOT", globals->get_fg_root().utf8Str());
|
||||
|
||||
|
|
|
@ -774,7 +774,7 @@ static naRef f_open(naContext c, naRef me, int argc, naRef* args)
|
|||
std::wstring wmodestr = simgear::strutils::convertUtf8ToWString(modestr);
|
||||
f = _wfopen(fp.c_str(), wmodestr.c_str());
|
||||
#else
|
||||
std::string fp = filename.local8BitStr();
|
||||
std::string fp = filename.utf8Str();
|
||||
f = fopen(fp.c_str(), modestr);
|
||||
#endif
|
||||
if(!f) naRuntimeError(c, strerror(errno));
|
||||
|
|
|
@ -76,7 +76,7 @@ string FLITEVoiceSynthesizer::getVoicePath( voice_t voice )
|
|||
{
|
||||
if( voice < 0 || voice >= VOICE_UNKNOWN ) return string("");
|
||||
SGPath voicePath = globals->get_fg_root() / "ATC" / VOICE_FILES[voice];
|
||||
return voicePath.local8BitStr();
|
||||
return voicePath.utf8Str();
|
||||
}
|
||||
|
||||
string FLITEVoiceSynthesizer::getVoicePath( const string & voice )
|
||||
|
|
|
@ -41,7 +41,7 @@ FGFLITEVoice::FGFLITEVoice(FGVoiceMgr * mgr, const SGPropertyNode_ptr node, cons
|
|||
SGPath voice = globals->get_fg_root() / "ATC" /
|
||||
node->getStringValue("htsvoice", "cmu_us_arctic_slt.htsvoice");
|
||||
|
||||
_synthesizer = new FLITEVoiceSynthesizer(voice.local8BitStr());
|
||||
_synthesizer = new FLITEVoiceSynthesizer(voice.utf8Str());
|
||||
|
||||
SGSoundMgr *smgr = globals->get_subsystem<SGSoundMgr>();
|
||||
_sgr = smgr->find(sampleGroupRefName, true);
|
||||
|
|
|
@ -690,7 +690,7 @@ void CameraGroup::buildCamera(SGPropertyNode* cameraNode)
|
|||
std::string compositor_path =
|
||||
cameraNode->getStringValue("compositor", default_compositor.c_str());
|
||||
osg::ref_ptr<SGReaderWriterOptions> options =
|
||||
SGReaderWriterOptions::fromPath(globals->get_fg_root().local8BitStr());
|
||||
SGReaderWriterOptions::fromPath(globals->get_fg_root());
|
||||
options->setPropertyNode(globals->get_props());
|
||||
Compositor *compositor = Compositor::create(_viewer,
|
||||
window->gc,
|
||||
|
|
|
@ -529,7 +529,7 @@ FGRenderer::setupView( void )
|
|||
// Moon diameter: 3,476 kilometers
|
||||
// Sun diameter: 1,390,000 kilometers
|
||||
osg::ref_ptr<simgear::SGReaderWriterOptions> opt;
|
||||
opt = simgear::SGReaderWriterOptions::fromPath(globals->get_fg_root().local8BitStr());
|
||||
opt = simgear::SGReaderWriterOptions::fromPath(globals->get_fg_root());
|
||||
opt->setPropertyNode(globals->get_props());
|
||||
_sky->build( 80000.0, 80000.0,
|
||||
463.3, 361.8,
|
||||
|
|
|
@ -1136,7 +1136,7 @@ FGRenderer::buildDeferredFullscreenCamera( flightgear::CameraInfo* info, const F
|
|||
g->setUseDisplayList(false);
|
||||
simgear::EffectGeode* eg = new simgear::EffectGeode;
|
||||
osg::ref_ptr<SGReaderWriterOptions> opt;
|
||||
opt = SGReaderWriterOptions::fromPath(globals->get_fg_root().local8BitStr());
|
||||
opt = SGReaderWriterOptions::fromPath(globals->get_fg_root());
|
||||
opt->setPropertyNode(globals->get_props());
|
||||
simgear::Effect* effect = simgear::makeEffect(pass->effect, true, opt.get());
|
||||
if (effect) {
|
||||
|
@ -1189,7 +1189,7 @@ FGRenderer::buildDeferredDisplayCamera( osg::Camera* camera, flightgear::CameraI
|
|||
g->setUseDisplayList(false); //DEBUG
|
||||
simgear::EffectGeode* eg = new simgear::EffectGeode;
|
||||
osg::ref_ptr<SGReaderWriterOptions> opt;
|
||||
opt = SGReaderWriterOptions::fromPath(globals->get_fg_root().local8BitStr());
|
||||
opt = SGReaderWriterOptions::fromPath(globals->get_fg_root());
|
||||
opt->setPropertyNode(globals->get_props());
|
||||
simgear::Effect* effect = simgear::makeEffect(stage->effect, true, opt.get());
|
||||
if (!effect) {
|
||||
|
@ -1422,7 +1422,7 @@ FGRenderer::setupView( void )
|
|||
// Moon diameter: 3,476 kilometers
|
||||
// Sun diameter: 1,390,000 kilometers
|
||||
osg::ref_ptr<SGReaderWriterOptions> opt;
|
||||
opt = SGReaderWriterOptions::fromPath(globals->get_fg_root().local8BitStr());
|
||||
opt = SGReaderWriterOptions::fromPath(globals->get_fg_root());
|
||||
opt->setPropertyNode(globals->get_props());
|
||||
_sky->build( 80000.0, 80000.0,
|
||||
463.3, 361.8,
|
||||
|
|
Loading…
Reference in a new issue