mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-21 09:31:33 -08:00
Allow URI to be provided for Linux client
ex: wivrn wivrn://:123456@localhost
This commit is contained in:
1 parent
80c899efdf
commit
85c1935849
2 files changed
+9
-4
No files matched your search
@@ -187,8 +187,6 @@ private:
|
||||
vk::raii::DebugReportCallbackEXT debug_report_callback = nullptr;
|
||||
#endif
|
||||
|
||||
void set_server_uri(std::string uri);
|
||||
|
||||
public:
|
||||
using singleton<application>::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;
|
||||
|
||||
+7
-2
@@ -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<scenes::lobby>();
|
||||
|
||||
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
|
||||
Reference in new issue
Block a user