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