Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
Anthony Rabine 2023-08-10 09:00:56 +02:00
commit 8f0ae16af1
3 changed files with 9 additions and 5 deletions

View file

@ -74,6 +74,10 @@ struct AudioCommand {
std::string filename;
};
#if !defined(__PRETTY_FUNCTION__) && !defined(__GNUC__)
#define __PRETTY_FUNCTION__ __FUNCSIG__
#endif
/**
* The class implements a bare minimum required to demonstrate a model-based

View file

@ -61,12 +61,12 @@ private:
void StoryProject::SaveStory(const std::vector<uint8_t> &m_program)
{
std::ofstream o(m_working_dir + std::filesystem::path::preferred_separator + "story.c32", std::ios::out | std::ios::binary);
std::ofstream o(m_working_dir / "story.c32", std::ios::out | std::ios::binary);
o.write(reinterpret_cast<const char*>(m_program.data()), m_program.size());
o.close();
Tlv tlv(m_working_dir + std::filesystem::path::preferred_separator + "index.ost");
auto p = m_working_dir / "index.ost";
Tlv tlv(p.string());
tlv.add_array(1);
@ -399,6 +399,6 @@ std::string StoryProject::GetProjectFilePath() const
std::string StoryProject::GetWorkingDir() const
{
return m_working_dir;
return m_working_dir.string();
}

View file

@ -126,7 +126,7 @@ private:
std::string m_titleSound;
std::vector<Resource> m_resources;
std::string m_working_dir; /// Temporary folder based on the uuid, where the archive is unzipped
std::filesystem::path m_working_dir; /// Temporary folder based on the uuid, where the archive is unzipped
std::string m_project_file_path; /// JSON project file
int m_display_w{320};