diff --git a/client/application.h b/client/application.h index f872b557..739b6710 100644 --- a/client/application.h +++ b/client/application.h @@ -187,8 +187,6 @@ private: vk::raii::DebugReportCallbackEXT debug_report_callback = nullptr; #endif - void set_server_uri(std::string uri); - public: using singleton::instance; application(application_info info); @@ -214,6 +212,8 @@ public: } #endif + void set_server_uri(std::string uri); + static bool is_session_running() { return instance().session_running; diff --git a/client/main.cpp b/client/main.cpp index 37db0497..3e5d79ef 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -38,7 +38,7 @@ #ifdef __ANDROID__ void real_main(android_app * native_app) #else -void real_main() +void real_main(int argc, char ** argv) #endif { if (wivrn::is_tag) @@ -55,6 +55,11 @@ void real_main() info.version = VK_MAKE_VERSION(1, 0, 0); application app(info); +#ifndef __ANDROID__ + if (argc == 2) + app.set_server_uri(argv[1]); +#endif + app.push_scene(); app.run(); @@ -123,6 +128,6 @@ int main(int argc, char * argv[]) spdlog::warn("Invalid value for WIVRN_LOGLEVEL environment variable"); } - real_main(); + real_main(argc, argv); } #endif