mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 13:47:43 +00:00
Windows fixes
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#else
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#include "hecl/Database.hpp"
|
||||
|
||||
2
hecl/extern/athena
vendored
2
hecl/extern/athena
vendored
Submodule hecl/extern/athena updated: 57e5196e72...a5056960ed
@@ -301,7 +301,8 @@ static inline int64_t FTell(FILE* fp)
|
||||
static inline int Rename(const SystemChar* oldpath, const SystemChar* newpath)
|
||||
{
|
||||
#if HECL_UCS2
|
||||
return _wrename(oldpath, newpath);
|
||||
//return _wrename(oldpath, newpath);
|
||||
return ReplaceFileW(newpath, oldpath, nullptr, 0, nullptr, nullptr) == 0;
|
||||
#else
|
||||
return rename(oldpath, newpath);
|
||||
#endif
|
||||
|
||||
@@ -186,7 +186,8 @@ bool Project::ConfigFile::unlockAndCommit()
|
||||
else
|
||||
{
|
||||
#if HECL_UCS2
|
||||
_wrename(newPath.c_str(), m_filepath.c_str());
|
||||
//_wrename(newPath.c_str(), m_filepath.c_str());
|
||||
ReplaceFileW(m_filepath.c_str(), newPath.c_str(), nullptr, 0, nullptr, nullptr);
|
||||
#else
|
||||
rename(newPath.c_str(), m_filepath.c_str());
|
||||
#endif
|
||||
@@ -529,7 +530,10 @@ bool Project::packagePath(const ProjectPath& path, FProgress progress, bool fast
|
||||
}
|
||||
}
|
||||
|
||||
if (specEntry && (!m_lastPackageSpec || m_lastPackageSpec->getDataSpecEntry() != specEntry))
|
||||
if (!specEntry)
|
||||
LogModule.report(logvisor::Fatal, "No matching DataSpec");
|
||||
|
||||
if (!m_lastPackageSpec || m_lastPackageSpec->getDataSpecEntry() != specEntry)
|
||||
m_lastPackageSpec = std::unique_ptr<IDataSpec>(specEntry->m_factory(*this, DataSpecTool::Package));
|
||||
|
||||
if (m_lastPackageSpec->canPackage(path))
|
||||
|
||||
Reference in New Issue
Block a user