mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 15:09:39 +00:00
Fix some remaining encoding errors due to std::filesystem transition.
This commit is contained in:
parent
1fc197e404
commit
c226b35f1f
22 changed files with 56 additions and 57 deletions
|
@ -244,7 +244,7 @@ int extractAll(std::unique_ptr<File>& bsa, Arguments& info)
|
|||
|
||||
// Get the target path (the path the file will be extracted to)
|
||||
auto target = info.outdir;
|
||||
target /= extractPath;
|
||||
target /= Misc::StringUtils::stringToU8String(extractPath);
|
||||
|
||||
// Create the directory hierarchy
|
||||
std::filesystem::create_directories(target.parent_path());
|
||||
|
@ -261,7 +261,7 @@ int extractAll(std::unique_ptr<File>& bsa, Arguments& info)
|
|||
std::ofstream out(target, std::ios::binary);
|
||||
|
||||
// Write the file to disk
|
||||
std::cout << "Extracting " << target << std::endl;
|
||||
std::cout << "Extracting " << Files::pathToUnicodeString(target) << std::endl;
|
||||
out << data->rdbuf();
|
||||
out.close();
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ void loadCell(const Arguments& info, ESM::Cell &cell, ESM::ESMReader &esm, ESMDa
|
|||
|
||||
void printRawTes3(const std::filesystem::path &path)
|
||||
{
|
||||
std::cout << "TES3 RAW file listing: " << path << '\n';
|
||||
std::cout << "TES3 RAW file listing: " << Files::pathToUnicodeString(path) << '\n';
|
||||
ESM::ESMReader esm;
|
||||
esm.openRaw(path);
|
||||
while(esm.hasMoreRecs())
|
||||
|
|
|
@ -345,7 +345,7 @@ namespace ESSImport
|
|||
|
||||
writer.setFormat (ESM::SavedGame::sCurrentFormat);
|
||||
|
||||
std::ofstream stream(std::filesystem::path(mOutFile), std::ios::out | std::ios::binary);
|
||||
std::ofstream stream(mOutFile, std::ios::out | std::ios::binary);
|
||||
// all unused
|
||||
writer.setVersion(0);
|
||||
writer.setType(0);
|
||||
|
|
|
@ -232,7 +232,7 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
|
|||
|
||||
const auto& globalDataDir = mGameSettings.getGlobalDataDir();
|
||||
if (!globalDataDir.empty())
|
||||
directories.insert(0, QString::fromStdWString(globalDataDir.wstring()));
|
||||
directories.insert(0, QString::fromStdU32String(globalDataDir.u32string()));
|
||||
|
||||
// normalize user supplied directories: resolve symlink, convert to native separator, make absolute
|
||||
for (auto& currentDir : directories)
|
||||
|
@ -264,7 +264,7 @@ void Launcher::DataFilesPage::populateFileViews(const QString& contentModelName)
|
|||
}
|
||||
|
||||
// deactivate data-local and global data directory: they are always included
|
||||
if (currentDir == mDataLocal || std::filesystem::path(currentDir.toStdWString()) == globalDataDir)
|
||||
if (currentDir == mDataLocal || std::filesystem::path(currentDir.toStdU32String()) == globalDataDir)
|
||||
{
|
||||
auto flags = item->flags();
|
||||
item->setFlags(flags & ~(Qt::ItemIsDragEnabled|Qt::ItemIsDropEnabled|Qt::ItemIsEnabled));
|
||||
|
|
|
@ -163,7 +163,7 @@ Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog()
|
|||
cfgError(tr("Error opening OpenMW configuration file"),
|
||||
tr("<br><b>Could not create directory %0</b><br><br> \
|
||||
Please make sure you have the right permissions \
|
||||
and try again.<br>").arg(QString::fromStdWString(canonical(userConfigDir).wstring()))
|
||||
and try again.<br>").arg(QString::fromStdU32String(canonical(userConfigDir).u32string()))
|
||||
);
|
||||
return FirstRunDialogResultFailure;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ bool Launcher::MainDialog::setupLauncherSettings()
|
|||
|
||||
mLauncherSettings.setMultiValueEnabled(true);
|
||||
|
||||
QString userPath = QString::fromStdWString(mCfgMgr.getUserConfigPath().wstring());
|
||||
QString userPath = QString::fromStdU32String(mCfgMgr.getUserConfigPath().u32string());
|
||||
|
||||
QStringList paths;
|
||||
paths.append(QString(Config::LauncherSettings::sLauncherConfigFileName));
|
||||
|
@ -329,9 +329,9 @@ bool Launcher::MainDialog::setupGameSettings()
|
|||
{
|
||||
mGameSettings.clear();
|
||||
|
||||
QString localPath = QString::fromStdWString(mCfgMgr.getLocalPath().wstring());
|
||||
QString userPath = QString::fromStdWString(mCfgMgr.getUserConfigPath().wstring());
|
||||
QString globalPath = QString::fromStdWString(mCfgMgr.getGlobalPath().wstring());
|
||||
QString localPath = QString::fromStdU32String(mCfgMgr.getLocalPath().u32string());
|
||||
QString userPath = QString::fromStdU32String(mCfgMgr.getUserConfigPath().u32string());
|
||||
QString globalPath = QString::fromStdU32String(mCfgMgr.getGlobalPath().u32string());
|
||||
|
||||
QFile file;
|
||||
|
||||
|
@ -487,13 +487,13 @@ bool Launcher::MainDialog::writeSettings()
|
|||
cfgError(tr("Error creating OpenMW configuration directory"),
|
||||
tr("<br><b>Could not create %0</b><br><br> \
|
||||
Please make sure you have the right permissions \
|
||||
and try again.<br>").arg(QString::fromStdWString(userPath.wstring())));
|
||||
and try again.<br>").arg(QString::fromStdU32String(userPath.u32string())));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Game settings
|
||||
QFile file(QString::fromStdWString((userPath / "openmw.cfg").wstring()));
|
||||
QFile file(QString::fromStdU32String((userPath / "openmw.cfg").u32string()));
|
||||
|
||||
if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
||||
// File cannot be opened or created
|
||||
|
@ -521,7 +521,7 @@ bool Launcher::MainDialog::writeSettings()
|
|||
}
|
||||
|
||||
// Launcher settings
|
||||
file.setFileName(QString::fromStdWString((userPath / Config::LauncherSettings::sLauncherConfigFileName).wstring()));
|
||||
file.setFileName(QString::fromStdU32String((userPath / Config::LauncherSettings::sLauncherConfigFileName).u32string()));
|
||||
|
||||
if (!file.open(QIODevice::ReadWrite | QIODevice::Text | QIODevice::Truncate)) {
|
||||
// File cannot be opened or created
|
||||
|
|
|
@ -104,7 +104,7 @@ void Launcher::SettingsPage::on_importerButton_clicked()
|
|||
// Create the file if it doesn't already exist, else the importer will fail
|
||||
auto path = mCfgMgr.getUserConfigPath();
|
||||
path /= "openmw.cfg";
|
||||
QFile file(QString::fromStdWString(path.wstring()));
|
||||
QFile file(QString::fromStdU32String(path.u32string()));
|
||||
|
||||
if (!file.exists()) {
|
||||
if (!file.open(QIODevice::ReadWrite)) {
|
||||
|
@ -137,7 +137,7 @@ void Launcher::SettingsPage::on_importerButton_clicked()
|
|||
arguments.append(QString("--ini"));
|
||||
arguments.append(settingsComboBox->currentText());
|
||||
arguments.append(QString("--cfg"));
|
||||
arguments.append(QString::fromStdWString(path.wstring()));
|
||||
arguments.append(QString::fromStdU32String(path.u32string()));
|
||||
|
||||
qDebug() << "arguments " << arguments;
|
||||
|
||||
|
|
|
@ -658,7 +658,7 @@ void MwIniImporter::setVerbose(bool verbose) {
|
|||
}
|
||||
|
||||
MwIniImporter::multistrmap MwIniImporter::loadIniFile(const std::filesystem::path& filename) const {
|
||||
std::cout << "load ini file: " << filename << std::endl;
|
||||
std::cout << "load ini file: " << Files::pathToUnicodeString(filename) << std::endl;
|
||||
|
||||
std::string section("");
|
||||
MwIniImporter::multistrmap map;
|
||||
|
@ -719,7 +719,7 @@ MwIniImporter::multistrmap MwIniImporter::loadIniFile(const std::filesystem::pat
|
|||
}
|
||||
|
||||
MwIniImporter::multistrmap MwIniImporter::loadCfgFile(const std::filesystem::path& filename) {
|
||||
std::cout << "load cfg file: " << filename << std::endl;
|
||||
std::cout << "load cfg file: " << Files::pathToUnicodeString(filename) << std::endl;
|
||||
|
||||
MwIniImporter::multistrmap map;
|
||||
std::ifstream file(filename);
|
||||
|
@ -872,7 +872,7 @@ void MwIniImporter::addPaths(std::vector<std::filesystem::path>& output, std::ve
|
|||
// Drop first and last characters - quotation marks
|
||||
path = path.substr(1, path.size() - 2);
|
||||
}
|
||||
output.emplace_back(path);
|
||||
output.emplace_back(Files::pathFromUnicodeString(path));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <boost/program_options.hpp>
|
||||
|
||||
#include <components/files/configurationmanager.hpp>
|
||||
#include <components/files/conversion.hpp>
|
||||
|
||||
namespace bpo = boost::program_options;
|
||||
namespace sfs = std::filesystem;
|
||||
|
@ -137,7 +138,7 @@ int wmain(int argc, wchar_t *wargv[]) {
|
|||
importer.importArchives(cfg, ini);
|
||||
}
|
||||
|
||||
std::cout << "write to: " << outputFile << std::endl;
|
||||
std::cout << "write to: " << Files::pathToUnicodeString(outputFile) << std::endl;
|
||||
std::ofstream file(outputFile);
|
||||
importer.writeToFile(file, cfg);
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ void CS::Editor::openFiles (const std::filesystem::path &savePath, const std::ve
|
|||
if(discoveredFiles.empty())
|
||||
{
|
||||
for (const QString &path : mFileDialog.selectedFilePaths())
|
||||
files.emplace_back(path.toUtf8().constData());
|
||||
files.emplace_back(path.toStdU32String());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -248,7 +248,7 @@ void CS::Editor::createNewFile (const std::filesystem::path &savePath)
|
|||
std::vector<std::filesystem::path> files;
|
||||
|
||||
for (const QString &path : mFileDialog.selectedFilePaths()) {
|
||||
files.emplace_back(path.toUtf8().constData());
|
||||
files.emplace_back(path.toStdU32String());
|
||||
}
|
||||
|
||||
files.push_back (savePath);
|
||||
|
@ -377,23 +377,20 @@ int CS::Editor::run()
|
|||
|
||||
std::vector<std::filesystem::path> discoveredFiles;
|
||||
|
||||
for (std::vector<ESM::Header::MasterData>::const_iterator itemIter = fileReader.getGameFiles().begin();
|
||||
itemIter != fileReader.getGameFiles().end(); ++itemIter)
|
||||
for (const auto& item : fileReader.getGameFiles())
|
||||
{
|
||||
for (Files::PathContainer::const_iterator pathIter = mDataDirs.begin();
|
||||
pathIter != mDataDirs.end(); ++pathIter)
|
||||
for (const auto& path : mDataDirs)
|
||||
{
|
||||
const std::filesystem::path masterPath = *pathIter / itemIter->name;
|
||||
if (std::filesystem::exists(masterPath))
|
||||
if (auto masterPath = path / item.name; std::filesystem::exists(masterPath))
|
||||
{
|
||||
discoveredFiles.push_back(masterPath);
|
||||
discoveredFiles.emplace_back(std::move(masterPath));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
discoveredFiles.push_back(mFileToLoad);
|
||||
|
||||
QString extension = QString::fromStdWString(mFileToLoad.extension().wstring()).toLower();
|
||||
QString extension = QString::fromStdU32String(mFileToLoad.extension().u32string()).toLower();
|
||||
if (extension == ".esm")
|
||||
{
|
||||
mFileToLoad.replace_extension(".omwgame");
|
||||
|
|
|
@ -83,17 +83,17 @@ void CSMDoc::Runner::start (bool delayed)
|
|||
arguments << ("--script-run="+mStartup->fileName());
|
||||
|
||||
arguments <<
|
||||
QString::fromStdWString (L"--data=\""+mProjectPath.parent_path().wstring()+L"\"");
|
||||
QString::fromStdU32String (U"--data=\""+mProjectPath.parent_path().u32string()+U"\"");
|
||||
|
||||
arguments << "--replace=content";
|
||||
|
||||
for (const auto & mContentFile : mContentFiles)
|
||||
{
|
||||
arguments << QString::fromStdWString (L"--content="+mContentFile.wstring());
|
||||
arguments << QString::fromStdU32String (U"--content="+mContentFile.u32string());
|
||||
}
|
||||
|
||||
arguments
|
||||
<< QString::fromStdWString (L"--content="+mProjectPath.filename().wstring());
|
||||
<< QString::fromStdU32String (U"--content="+mProjectPath.filename().u32string());
|
||||
|
||||
mProcess.start (path, arguments);
|
||||
}
|
||||
|
|
|
@ -648,8 +648,7 @@ CSMPrefs::State::~State()
|
|||
|
||||
void CSMPrefs::State::save()
|
||||
{
|
||||
std::filesystem::path user = mConfigurationManager.getUserConfigPath() / mConfigFile;
|
||||
Settings::Manager::saveUser (user);
|
||||
Settings::Manager::saveUser (mConfigurationManager.getUserConfigPath() / mConfigFile);
|
||||
}
|
||||
|
||||
CSMPrefs::State::Iterator CSMPrefs::State::begin()
|
||||
|
|
|
@ -68,7 +68,7 @@ void CSVDoc::AdjusterWidget::setName (const QString& name, bool addon)
|
|||
}
|
||||
else
|
||||
{
|
||||
std::filesystem::path path (name.toStdWString());
|
||||
std::filesystem::path path (name.toStdU32String());
|
||||
|
||||
const auto extension = Misc::StringUtils::lowerCase(path.extension().u8string());
|
||||
|
||||
|
@ -85,7 +85,7 @@ void CSVDoc::AdjusterWidget::setName (const QString& name, bool addon)
|
|||
if (!isFilePathChanged && !isLegacyPath)
|
||||
{
|
||||
// path already points to the local data directory
|
||||
message = QString::fromStdWString (L"Will be saved as: " + path.wstring());
|
||||
message = QString::fromStdU32String (U"Will be saved as: " + path.u32string());
|
||||
mResultPath = path;
|
||||
}
|
||||
//in all other cases, ensure the path points to data-local and do an existing file check
|
||||
|
@ -95,7 +95,7 @@ void CSVDoc::AdjusterWidget::setName (const QString& name, bool addon)
|
|||
if (isFilePathChanged)
|
||||
path = mLocalData / path.filename();
|
||||
|
||||
message = QString::fromStdWString (L"Will be saved as: " + path.wstring());
|
||||
message = QString::fromStdU32String (U"Will be saved as: " + path.u32string());
|
||||
mResultPath = path;
|
||||
|
||||
if (std::filesystem::exists (path))
|
||||
|
|
|
@ -19,7 +19,7 @@ void CSVDoc::LoadingDocument::closeEvent (QCloseEvent *event)
|
|||
CSVDoc::LoadingDocument::LoadingDocument (CSMDoc::Document *document)
|
||||
: mDocument (document), mTotalRecordsLabel (0), mRecordsLabel (0), mAborted (false), mMessages (nullptr), mRecords(0)
|
||||
{
|
||||
setWindowTitle (QString::fromStdWString(L"Opening " + document->getSavePath().filename().wstring()));
|
||||
setWindowTitle (QString::fromStdU32String(U"Opening " + document->getSavePath().filename().u32string()));
|
||||
|
||||
setMinimumWidth (400);
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ bool CSVDoc::ViewManager::showModifiedDocumentMessageBox (CSVDoc::View *view)
|
|||
QMessageBox messageBox(view);
|
||||
CSMDoc::Document *document = view->getDocument();
|
||||
|
||||
messageBox.setWindowTitle (QString::fromStdWString(document->getSavePath().filename().wstring()));
|
||||
messageBox.setWindowTitle (QString::fromStdU32String(document->getSavePath().filename().u32string()));
|
||||
messageBox.setText ("The document has been modified.");
|
||||
messageBox.setInformativeText ("Do you want to save your changes?");
|
||||
messageBox.setStandardButtons (QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
|
||||
|
|
|
@ -102,7 +102,7 @@ void CSVTools::Merge::configure (CSMDoc::Document *document)
|
|||
|
||||
for (std::vector<std::filesystem::path>::const_iterator iter (files.begin());
|
||||
iter!=files.end(); ++iter)
|
||||
mFiles->addItem (QString::fromStdWString(iter->filename().wstring()));
|
||||
mFiles->addItem (QString::fromStdU32String(iter->filename().u32string()));
|
||||
}
|
||||
|
||||
void CSVTools::Merge::setLocalData (const std::filesystem::path& localData)
|
||||
|
|
|
@ -440,7 +440,7 @@ namespace MWGui
|
|||
const std::vector<char>& data = mCurrentSlot->mProfile.mScreenshot;
|
||||
if (!data.size())
|
||||
{
|
||||
Log(Debug::Warning) << "Selected save file '" << mCurrentSlot->mPath.filename().string() << "' has no savegame screenshot";
|
||||
Log(Debug::Warning) << "Selected save file '" << Files::pathToUnicodeString(mCurrentSlot->mPath.filename()) << "' has no savegame screenshot";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -471,5 +471,5 @@ bool Wizard::MainWizard::findFiles(const QString &name, const QString &path)
|
|||
|
||||
QString Wizard::MainWizard::toQString(const std::filesystem::path& path)
|
||||
{
|
||||
return QString::fromStdWString(path.wstring());
|
||||
return QString::fromStdU32String(path.u32string());
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QTextCodec>
|
||||
#include <QDir>
|
||||
#include <QRegExp>
|
||||
#include <QDebug>
|
||||
|
||||
#include <components/files/configurationmanager.hpp>
|
||||
|
||||
|
@ -23,8 +24,7 @@ void Config::GameSettings::validatePaths()
|
|||
|
||||
for (const QString &path : paths)
|
||||
{
|
||||
QByteArray bytes = path.toUtf8();
|
||||
dataDirs.push_back(Files::PathContainer::value_type(std::string(bytes.constData(), bytes.length())));
|
||||
dataDirs.emplace_back(path.toStdU32String());
|
||||
}
|
||||
|
||||
// Parse the data dirs to convert the tokenized paths
|
||||
|
@ -32,7 +32,7 @@ void Config::GameSettings::validatePaths()
|
|||
mDataDirs.clear();
|
||||
|
||||
for (auto & dataDir : dataDirs) {
|
||||
QString path = QString::fromStdWString(dataDir.wstring());
|
||||
QString path = QString::fromStdU32String(dataDir.u32string());
|
||||
|
||||
QDir dir(path);
|
||||
if (dir.exists())
|
||||
|
@ -51,13 +51,12 @@ void Config::GameSettings::validatePaths()
|
|||
return;
|
||||
|
||||
dataDirs.clear();
|
||||
QByteArray bytes = local.toUtf8();
|
||||
dataDirs.push_back(Files::PathContainer::value_type(std::string(bytes.constData(), bytes.length())));
|
||||
dataDirs.emplace_back(local.toStdU32String());
|
||||
|
||||
mCfgMgr.processPaths(dataDirs, /*basePath=*/"");
|
||||
|
||||
if (!dataDirs.empty()) {
|
||||
QString path = QString::fromStdWString(dataDirs.front().wstring());
|
||||
QString path = QString::fromStdU32String(dataDirs.front().u32string());
|
||||
|
||||
QDir dir(path);
|
||||
if (dir.exists())
|
||||
|
@ -68,8 +67,9 @@ void Config::GameSettings::validatePaths()
|
|||
std::filesystem::path Config::GameSettings::getGlobalDataDir() const
|
||||
{
|
||||
// global data dir may not exists if OpenMW is not installed (ie if run from build directory)
|
||||
if (std::filesystem::exists(mCfgMgr.getGlobalDataPath()))
|
||||
return std::filesystem::canonical(mCfgMgr.getGlobalDataPath());
|
||||
const auto& path = mCfgMgr.getGlobalDataPath();
|
||||
if (std::filesystem::exists(path))
|
||||
return std::filesystem::canonical(path);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ void Config::LauncherSettings::setContentList(const GameSettings& gameSettings)
|
|||
}
|
||||
|
||||
// global and local data directories are not part of any profile
|
||||
const auto globalDataDir = QString::fromStdWString(gameSettings.getGlobalDataDir().wstring());
|
||||
const auto globalDataDir = QString::fromStdU32String(gameSettings.getGlobalDataDir().u32string());
|
||||
const auto dataLocal = gameSettings.getDataLocal();
|
||||
dirs.removeAll(globalDataDir);
|
||||
dirs.removeAll(dataLocal);
|
||||
|
|
|
@ -99,7 +99,7 @@ void ConfigurationManager::readConfiguration(bpo::variables_map& variables,
|
|||
|
||||
while (!extraConfigDirs.empty())
|
||||
{
|
||||
std::filesystem::path path = extraConfigDirs.top();
|
||||
auto path = extraConfigDirs.top();
|
||||
extraConfigDirs.pop();
|
||||
if (alreadyParsedPaths.count(path) > 0)
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ void ConfigurationManager::readConfiguration(bpo::variables_map& variables,
|
|||
Log(Debug::Info) << "Skipping previous configs except " << (mActiveConfigPaths.front() / "openmw.cfg") <<
|
||||
" due to replace=config in " << (path / "openmw.cfg");
|
||||
}
|
||||
mActiveConfigPaths.push_back(path);
|
||||
mActiveConfigPaths.emplace_back(std::move(path));
|
||||
if (config)
|
||||
{
|
||||
addExtraConfigDirs(extraConfigDirs, *config);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/misc/strings/algorithm.hpp>
|
||||
#include <components/files/conversion.hpp>
|
||||
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
|
@ -324,6 +325,6 @@ bool Settings::SettingsFileParser::skipWhiteSpace(size_t& i, std::string& str)
|
|||
[[noreturn]] void Settings::SettingsFileParser::fail(const std::string& message)
|
||||
{
|
||||
std::stringstream error;
|
||||
error << "Error on line " << mLine << " in " << mFile << ":\n" << message;
|
||||
error << "Error on line " << mLine << " in " << Files::pathToUnicodeString(mFile) << ":\n" << message;
|
||||
throw std::runtime_error(error.str());
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <components/misc/strings/algorithm.hpp>
|
||||
#include <components/misc/strings/format.hpp>
|
||||
#include <components/settings/settings.hpp>
|
||||
#include <components/files/conversion.hpp>
|
||||
|
||||
namespace Shader
|
||||
{
|
||||
|
@ -384,7 +385,7 @@ namespace Shader
|
|||
const std::set<std::filesystem::path>& shaderFiles = templateIncludedFiles[templateName];
|
||||
for (const std::filesystem::path& file : shaderFiles)
|
||||
{
|
||||
mShaderFiles[file.string()].insert(std::make_pair(templateName, defines));
|
||||
mShaderFiles[Files::pathToUnicodeString(file)].insert(std::make_pair(templateName, defines));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -426,7 +427,7 @@ namespace Shader
|
|||
stream.open(path);
|
||||
if (stream.fail())
|
||||
{
|
||||
Log(Debug::Error) << "Failed to open " << path.string();
|
||||
Log(Debug::Error) << "Failed to open " << Files::pathToUnicodeString(path);
|
||||
}
|
||||
std::stringstream buffer;
|
||||
buffer << stream.rdbuf();
|
||||
|
|
Loading…
Reference in a new issue