[olympic/applib] Move run function to olympic namespace
This commit is contained in:
parent
6a1e2f7566
commit
af1f674bc0
@ -25,15 +25,17 @@
|
|||||||
#define OLYMPIC_LOAD_STUDIO_MODULES 0
|
#define OLYMPIC_LOAD_STUDIO_MODULES 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace olympic {
|
||||||
|
|
||||||
|
[[nodiscard]]
|
||||||
|
ox::StringView appName() noexcept;
|
||||||
|
|
||||||
ox::Error run(
|
ox::Error run(
|
||||||
ox::StringView appName,
|
ox::StringView appName,
|
||||||
ox::StringView projectDataDir,
|
ox::StringView projectDataDir,
|
||||||
int argc,
|
int argc,
|
||||||
const char **argv) noexcept;
|
const char **argv) noexcept;
|
||||||
|
|
||||||
namespace olympic {
|
|
||||||
[[nodiscard]]
|
|
||||||
ox::StringView appName() noexcept;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace OLYMPIC_PROJECT_NAMESPACE {
|
namespace OLYMPIC_PROJECT_NAMESPACE {
|
||||||
@ -55,7 +57,7 @@ int main(int argc, const char **argv) {
|
|||||||
#if OLYMPIC_LOAD_STUDIO_MODULES
|
#if OLYMPIC_LOAD_STUDIO_MODULES
|
||||||
OLYMPIC_PROJECT_NAMESPACE::registerStudioModules();
|
OLYMPIC_PROJECT_NAMESPACE::registerStudioModules();
|
||||||
#endif
|
#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...");
|
oxAssert(err, "Something went wrong...");
|
||||||
if (err) {
|
if (err) {
|
||||||
oxErrf("Failure: {}\n", toStr(err));
|
oxErrf("Failure: {}\n", toStr(err));
|
||||||
|
@ -87,11 +87,11 @@ ox::Error run(StudioOptions &&opts, int argc = 0, const char **argv = nullptr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace olympic {
|
namespace olympic {
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
ox::StringView appName() noexcept {
|
ox::StringView appName() noexcept {
|
||||||
return "Nostalgia Studio";
|
return "Nostalgia Studio";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ox::Error run(
|
ox::Error run(
|
||||||
ox::StringView appName,
|
ox::StringView appName,
|
||||||
@ -101,3 +101,4 @@ ox::Error run(
|
|||||||
return studio::run(appName, projectDataDir, argc, argv);
|
return studio::run(appName, projectDataDir, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user