mirror of
https://github.com/arabine/open-story-teller.git
synced 2025-12-06 17:09:06 +01:00
fix windows build
This commit is contained in:
parent
41255f2cec
commit
0ef87ca325
7 changed files with 14 additions and 8 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -22,3 +22,9 @@ hardware/kicad/ost-pico-addon/fp-info-cache
|
|||
*.png~
|
||||
|
||||
build-story-editor-Desktop_Qt_6_5_1_GCC_64bit-Debug/
|
||||
|
||||
build-story-editor-Desktop_Qt_6_5_1_MinGW_64_bit-Debug/
|
||||
|
||||
build-story-editor-Desktop_Qt_6_5_1_MinGW_64_bit-Release/
|
||||
|
||||
build-story-editor-Desktop_Qt_6_5_1_MSVC2019_64bit-Debug/
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ uint8_t MainWindow::Syscall(uint8_t code)
|
|||
// sound file name address is in R1
|
||||
QString soundFile = m_model.BuildFullSoundPath(GetFileNameFromMemory(m_chip32_ctx.registers[R1]));
|
||||
qDebug() << ", Sound: " << soundFile;
|
||||
m_model.PlaySound(soundFile);
|
||||
m_model.PlaySoundFile(soundFile);
|
||||
}
|
||||
retCode = SYSCALL_RET_WAIT_EV; // set the VM in pause
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ MediaNodeModel::MediaNodeModel(StoryGraphModel &model)
|
|||
});
|
||||
|
||||
connect(m_ui.playSoundButton, &QPushButton::clicked, [&](bool enable) {
|
||||
m_model.PlaySound(m_soundFilePath);
|
||||
m_model.PlaySoundFile(m_soundFilePath);
|
||||
});
|
||||
|
||||
m_ui.playSoundButton->setEnabled(false);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ ResourcesDock::ResourcesDock(StoryProject &project, ResourceModel &model)
|
|||
Resource res;
|
||||
res.format = "BMP";
|
||||
res.type = "image";
|
||||
res.file = p.filename();
|
||||
res.file = p.filename().generic_string();
|
||||
m_resourcesModel.Append(res);
|
||||
}
|
||||
});
|
||||
|
|
@ -49,7 +49,7 @@ ResourcesDock::ResourcesDock(StoryProject &project, ResourceModel &model)
|
|||
Resource res;
|
||||
res.format = "WAV";
|
||||
res.type = "sound";
|
||||
res.file = p.filename();
|
||||
res.file = p.filename().generic_string();
|
||||
m_resourcesModel.Append(res);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ void StoryGraphModel::AudioThread()
|
|||
}
|
||||
}
|
||||
|
||||
void StoryGraphModel::PlaySound(const QString &fileName)
|
||||
void StoryGraphModel::PlaySoundFile(const QString &fileName)
|
||||
{
|
||||
m_audioQueue.push({"play", fileName.toStdString()});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ public:
|
|||
std::string GetNodeEntryLabel(NodeId nodeId) const;
|
||||
|
||||
// Centralized for wide usage
|
||||
void PlaySound(const QString &fileName);
|
||||
void PlaySoundFile(const QString &fileName);
|
||||
|
||||
NodeId FindFirstNode() const;
|
||||
signals:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ void StoryProject::Initialize(const std::string &file_path)
|
|||
{
|
||||
m_project_file_path = file_path;
|
||||
std::filesystem::path p(file_path);
|
||||
m_working_dir= p.parent_path();
|
||||
m_working_dir= p.parent_path().generic_string();
|
||||
|
||||
// Frist try to create the working directory
|
||||
if (!std::filesystem::is_directory(m_working_dir))
|
||||
|
|
@ -40,7 +40,7 @@ bool StoryProject::Load(const std::string &file_path, nlohmann::json &model)
|
|||
bool success = false;
|
||||
|
||||
std::filesystem::path p(file_path);
|
||||
m_working_dir= p.parent_path();
|
||||
m_working_dir= p.parent_path().generic_string();
|
||||
|
||||
std::cout << "Working dir is: " << m_working_dir << std::endl;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue