Compare commits
No commits in common. "e0ec9e0c5f65e09bf6e382582f918f4ac91166d0" and "03a05c511ea39232e65ff1464281535343676286" have entirely different histories.
e0ec9e0c5f
...
03a05c511e
6
deps/nfde/src/nfd_win.cpp
vendored
6
deps/nfde/src/nfd_win.cpp
vendored
@ -201,7 +201,7 @@ nfdresult_t SetDefaultExtension(::IFileDialog* fileOpenDialog,
|
||||
}
|
||||
if (*p_spec) {
|
||||
// multiple file extensions for this type (need to allocate memory)
|
||||
size_t numChars = static_cast<size_t>(p_spec - filterList[0].spec);
|
||||
size_t numChars = p_spec - filterList[0].spec;
|
||||
// allocate one more char space for the '\0'
|
||||
nfdnchar_t* extnBuf = NFDi_Malloc<nfdnchar_t>(sizeof(nfdnchar_t) * (numChars + 1));
|
||||
if (!extnBuf) {
|
||||
@ -710,7 +710,7 @@ nfdresult_t CopyCharToWChar(const nfdu8char_t* inStr, nfdnchar_t*& outStr) {
|
||||
int charsNeeded = MultiByteToWideChar(CP_UTF8, 0, inStr, -1, nullptr, 0);
|
||||
assert(charsNeeded);
|
||||
|
||||
nfdnchar_t* tmp_outStr = NFDi_Malloc<nfdnchar_t>(sizeof(nfdnchar_t) * static_cast<size_t>(charsNeeded));
|
||||
nfdnchar_t* tmp_outStr = NFDi_Malloc<nfdnchar_t>(sizeof(nfdnchar_t) * charsNeeded);
|
||||
if (!tmp_outStr) {
|
||||
return NFD_ERROR;
|
||||
}
|
||||
@ -727,7 +727,7 @@ nfdresult_t CopyWCharToNFDChar(const nfdnchar_t* inStr, nfdu8char_t*& outStr) {
|
||||
int bytesNeeded = WideCharToMultiByte(CP_UTF8, 0, inStr, -1, nullptr, 0, nullptr, nullptr);
|
||||
assert(bytesNeeded);
|
||||
|
||||
nfdu8char_t* tmp_outStr = NFDi_Malloc<nfdu8char_t>(sizeof(nfdu8char_t) * static_cast<size_t>(bytesNeeded));
|
||||
nfdu8char_t* tmp_outStr = NFDi_Malloc<nfdu8char_t>(sizeof(nfdu8char_t) * bytesNeeded);
|
||||
if (!tmp_outStr) {
|
||||
return NFD_ERROR;
|
||||
}
|
||||
|
@ -157,6 +157,8 @@ static ox::Error runScene(turbine::Context &tctx) {
|
||||
return turbine::run(tctx);
|
||||
}
|
||||
|
||||
namespace olympic {
|
||||
|
||||
ox::Error run(
|
||||
[[maybe_unused]] ox::StringView project,
|
||||
[[maybe_unused]] ox::StringView appName,
|
||||
@ -170,3 +172,5 @@ ox::Error run(
|
||||
oxRequireM(tctx, turbine::init(std::move(fs), project));
|
||||
return runTileSheetSetTest(*tctx);
|
||||
}
|
||||
|
||||
}
|
@ -17,10 +17,6 @@
|
||||
#define OLYMPIC_APP_VERSION "dev build"
|
||||
#endif
|
||||
|
||||
#ifndef OLYMPIC_GUI_APP
|
||||
#define OLYMPIC_GUI_APP 0
|
||||
#endif
|
||||
|
||||
#ifndef OLYMPIC_PROJECT_NAMESPACE
|
||||
#define OLYMPIC_PROJECT_NAMESPACE project
|
||||
#endif
|
||||
@ -38,8 +34,8 @@
|
||||
#endif
|
||||
|
||||
namespace olympic {
|
||||
|
||||
ox::String appVersion = ox::String(OLYMPIC_APP_VERSION);
|
||||
}
|
||||
|
||||
ox::Error run(
|
||||
ox::StringView project,
|
||||
@ -47,6 +43,8 @@ ox::Error run(
|
||||
ox::StringView projectDataDir,
|
||||
ox::SpanView<char const*> argv) noexcept;
|
||||
|
||||
}
|
||||
|
||||
namespace OLYMPIC_PROJECT_NAMESPACE {
|
||||
void registerKeelModules() noexcept;
|
||||
void registerStudioModules() noexcept;
|
||||
@ -66,7 +64,7 @@ int main(int argc, char const**argv) {
|
||||
#if OLYMPIC_LOAD_STUDIO_MODULES
|
||||
OLYMPIC_PROJECT_NAMESPACE::registerStudioModules();
|
||||
#endif
|
||||
auto const err = run(
|
||||
auto const err = olympic::run(
|
||||
OLYMPIC_PROJECT_NAME,
|
||||
OLYMPIC_APP_NAME,
|
||||
OLYMPIC_PROJECT_DATADIR,
|
||||
|
@ -97,6 +97,8 @@ static ox::Error run(ox::SpanView<char const*> argv, ox::StringView projectDataD
|
||||
return pack(argSrc, argRomBin, argManifest, projectDataDir);
|
||||
}
|
||||
|
||||
namespace olympic {
|
||||
|
||||
ox::Error run(
|
||||
[[maybe_unused]] ox::StringView project,
|
||||
[[maybe_unused]] ox::StringView appName,
|
||||
@ -104,3 +106,5 @@ ox::Error run(
|
||||
ox::SpanView<char const*> argv) noexcept {
|
||||
return ::run(argv, projectDataDir);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -67,6 +67,8 @@ static ox::Error run(
|
||||
|
||||
}
|
||||
|
||||
namespace olympic {
|
||||
|
||||
ox::Error run(
|
||||
ox::StringView project,
|
||||
ox::StringView appName,
|
||||
@ -74,3 +76,5 @@ ox::Error run(
|
||||
ox::SpanView<char const*> args) noexcept {
|
||||
return studio::run(ox::sfmt("{} {}", project, appName), projectDataDir, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user