mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 02:48:12 +02:00
Fix file shader file lookup on windows
This commit is contained in:
parent
c0a675dd9e
commit
78b805a19a
1 changed files with 4 additions and 4 deletions
|
@ -76,12 +76,12 @@ static const std::string DEEFAULT_CUSTOM_SHADER {
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string getFileContent(std::string fileName, std::string defaultContent = std::string()) {
|
static std::string getFileContent(std::string fileName, std::string defaultContent = std::string()) {
|
||||||
QFile customFile(QUrl(QString::fromStdString(fileName)).toLocalFile());
|
QFile customFile(QString::fromStdString(fileName));
|
||||||
if (customFile.open(QIODevice::ReadOnly)) {
|
if (customFile.open(QIODevice::ReadOnly)) {
|
||||||
return customFile.readAll().toStdString();
|
return customFile.readAll().toStdString();
|
||||||
}
|
}
|
||||||
qWarning() << "DebugDeferredBuffer::getFileContent(): Could not open"
|
qWarning() << "DebugDeferredBuffer::getFileContent(): Could not open"
|
||||||
<< QUrl(QString::fromStdString(fileName)).toLocalFile();
|
<< QString::fromStdString(fileName);
|
||||||
return defaultContent;
|
return defaultContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,9 +89,9 @@ static std::string getFileContent(std::string fileName, std::string defaultConte
|
||||||
DebugDeferredBuffer::DebugDeferredBuffer() {
|
DebugDeferredBuffer::DebugDeferredBuffer() {
|
||||||
// TODO REMOVE: Temporary until UI
|
// TODO REMOVE: Temporary until UI
|
||||||
static const auto DESKTOP_PATH = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
static const auto DESKTOP_PATH = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
||||||
static const auto CUSTOM_FILE = "file://" + DESKTOP_PATH.toStdString() + "/custom.slh";
|
static const auto CUSTOM_FILE = DESKTOP_PATH.toStdString() + "/custom.slh";
|
||||||
CustomPipeline pipeline;
|
CustomPipeline pipeline;
|
||||||
pipeline.info = QFileInfo(DESKTOP_PATH + "/custom.slh");
|
pipeline.info = QFileInfo(QString::fromStdString(CUSTOM_FILE));
|
||||||
_customPipelines.emplace(CUSTOM_FILE, pipeline);
|
_customPipelines.emplace(CUSTOM_FILE, pipeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue