diff options
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/app.cpp | 7 | ||||
| -rw-r--r-- | editor/app.hpp | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/editor/app.cpp b/editor/app.cpp index b031d6f3..85bbba54 100644 --- a/editor/app.cpp +++ b/editor/app.cpp @@ -73,7 +73,7 @@ static int atoi_(const char* str) return negative ? result : -result; } -int app::run_from_argv(const int argc, const char* const* const argv) +fm_settings app::parse_cmdline(int argc, const char* const* argv) { fm_settings opts; Corrade::Utility::Arguments args{}; @@ -98,7 +98,12 @@ int app::run_from_argv(const int argc, const char* const* const argv) else opts.msaa_samples = (std::uint8_t)n; } + return opts; +} +int app::run_from_argv(const int argc, const char* const* const argv) +{ + auto opts = parse_cmdline(argc, argv); int ret; Pointer<floormat_main> ptr; { diff --git a/editor/app.hpp b/editor/app.hpp index 5b4497b0..57487b01 100644 --- a/editor/app.hpp +++ b/editor/app.hpp @@ -33,7 +33,8 @@ struct cursor_state final { struct app final : floormat_app { - static int run_from_argv(int argv, const char* const* argc); + static int run_from_argv(int argc, const char* const* argv); + static fm_settings parse_cmdline(int argc, const char* const* argv); ~app() override; private: |
