[turbine] Add init wrapper that takes FS path

This commit is contained in:
Gary Talent 2024-12-06 23:20:30 -06:00
parent c51a45e1ba
commit 7679403742
3 changed files with 20 additions and 0 deletions

View File

@ -18,6 +18,8 @@ using TimeMs = uint64_t;
ox::Result<ContextUPtr> init(ox::UPtr<ox::FileSystem> &&fs, ox::StringViewCR appName) noexcept; ox::Result<ContextUPtr> init(ox::UPtr<ox::FileSystem> &&fs, ox::StringViewCR appName) noexcept;
ox::Result<ContextUPtr> init(ox::StringViewCR fsPath, ox::StringViewCR appName) noexcept;
ox::Error run(Context &ctx) noexcept; ox::Error run(Context &ctx) noexcept;
// Returns the number of milliseconds that have passed since the start of the // Returns the number of milliseconds that have passed since the start of the

View File

@ -18,6 +18,11 @@ target_include_directories(
../include ../include
) )
target_sources(
Turbine PUBLIC
turbine.cpp
)
target_link_libraries( target_link_libraries(
Turbine PUBLIC Turbine PUBLIC
Keel Keel

View File

@ -0,0 +1,13 @@
#include <keel/keel.hpp>
#include <turbine/turbine.hpp>
namespace turbine {
ox::Result<ContextUPtr> init(ox::StringViewCR fsPath, ox::StringViewCR appName) noexcept {
oxRequireM(fs, keel::loadRomFs(fsPath));
return init(std::move(fs), appName);
}
}