[jasper/player] Make player default to working dir for asset dir
All checks were successful
Build / build (push) Successful in 3m18s
All checks were successful
Build / build (push) Successful in 3m18s
This commit is contained in:
parent
ce9ce3f0e5
commit
f338a6a86a
@ -16,6 +16,7 @@
|
||||
namespace ncore = nostalgia::core;
|
||||
|
||||
namespace jasper {
|
||||
|
||||
ox::Error run(turbine::Context &tctx, ox::StringView, ox::SpanView<ox::String> args) noexcept {
|
||||
oxOut("Jasper Player\n");
|
||||
oxRequire(nctx, ncore::init(tctx));
|
||||
@ -36,6 +37,7 @@ ox::Error run(turbine::Context &tctx, ox::StringView, ox::SpanView<ox::String> a
|
||||
oxOut("Exiting...\n");
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace olympic {
|
||||
@ -46,13 +48,13 @@ ox::Error run(
|
||||
[[maybe_unused]] ox::StringView projectDataDir,
|
||||
int argc,
|
||||
char const**argv) noexcept {
|
||||
if (argc < 2) {
|
||||
return OxError(1, "Insufficient arguments given to olympic::run");
|
||||
auto path = ".";
|
||||
if (argc > 1) {
|
||||
path = argv[1];
|
||||
}
|
||||
auto const path = ox::StringView(argv[1]);
|
||||
oxRequireM(fs, keel::loadRomFs(path));
|
||||
oxRequireM(tctx, turbine::init(std::move(fs), project));
|
||||
constexpr ox::FileAddress BootfileAddr = ox::StringLiteral("/Bootfile");
|
||||
constexpr ox::FileAddress BootfileAddr = ox::StringLiteral{"/Bootfile"};
|
||||
oxRequire(bootfile, keel::readObj<jasper::core::Bootfile>(keelCtx(*tctx), BootfileAddr));
|
||||
return jasper::run(*tctx, bootfile->app, bootfile->args);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user