[olympic/applib] Move run function to olympic namespace

This commit is contained in:
Gary Talent 2023-12-10 21:07:17 -06:00
parent 6a1e2f7566
commit af1f674bc0
2 changed files with 8 additions and 5 deletions

View File

@ -25,15 +25,17 @@
#define OLYMPIC_LOAD_STUDIO_MODULES 0
#endif
namespace olympic {
[[nodiscard]]
ox::StringView appName() noexcept;
ox::Error run(
ox::StringView appName,
ox::StringView projectDataDir,
int argc,
const char **argv) noexcept;
namespace olympic {
[[nodiscard]]
ox::StringView appName() noexcept;
}
namespace OLYMPIC_PROJECT_NAMESPACE {
@ -55,7 +57,7 @@ int main(int argc, const char **argv) {
#if OLYMPIC_LOAD_STUDIO_MODULES
OLYMPIC_PROJECT_NAMESPACE::registerStudioModules();
#endif
auto const err = run(olympic::appName(), OLYMPIC_PROJECT_DATADIR, argc, argv);
auto const err = olympic::run(olympic::appName(), OLYMPIC_PROJECT_DATADIR, argc, argv);
oxAssert(err, "Something went wrong...");
if (err) {
oxErrf("Failure: {}\n", toStr(err));

View File

@ -87,11 +87,11 @@ ox::Error run(StudioOptions &&opts, int argc = 0, const char **argv = nullptr) {
}
namespace olympic {
[[nodiscard]]
ox::StringView appName() noexcept {
return "Nostalgia Studio";
}
}
ox::Error run(
ox::StringView appName,
@ -101,3 +101,4 @@ ox::Error run(
return studio::run(appName, projectDataDir, argc, argv);
}
}