summaryrefslogtreecommitdiffhomepage
path: root/main/main-impl.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-02 02:23:37 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-02 02:23:37 +0100
commit316f7bef0d81f86eb099e6a07b517bb24ed4a3dd (patch)
treeb596622c1edb6570b1d7383c66a9aa09921c7acd /main/main-impl.cpp
parent8f6fc959ffbb3c612e9115c9b155f5379bee66d8 (diff)
app, main: allow Magnum to parse argv --magnum-foo opts
Diffstat (limited to 'main/main-impl.cpp')
-rw-r--r--main/main-impl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/main-impl.cpp b/main/main-impl.cpp
index 1da2d4ee..01aea1ca 100644
--- a/main/main-impl.cpp
+++ b/main/main-impl.cpp
@@ -1,5 +1,7 @@
#include "main-impl.hpp"
#include "compat/assert.hpp"
+#include <cstdlib>
+#include <cstdio>
#include <Magnum/Platform/Sdl2Application.h>
namespace floormat {
@@ -28,8 +30,7 @@ int main_impl::exec()
floormat_main* floormat_main::create(floormat_app& app, fm_settings&& options)
{
- int fake_argc = 0;
- auto* ret = new main_impl(app, std::move(options), fake_argc);
+ auto* ret = new main_impl(app, std::move(options), options.argc, const_cast<char**>(options.argv));
fm_assert(ret);
return ret;
}