diff --git a/src/jasper/player/app.cpp b/src/jasper/player/app.cpp index c463ab5..0763ea8 100644 --- a/src/jasper/player/app.cpp +++ b/src/jasper/player/app.cpp @@ -16,6 +16,7 @@ namespace ncore = nostalgia::core; namespace jasper { + ox::Error run(turbine::Context &tctx, ox::StringView, ox::SpanView 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 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(keelCtx(*tctx), BootfileAddr)); return jasper::run(*tctx, bootfile->app, bootfile->args); }