Allow URI to be provided for Linux client
ex: wivrn wivrn://:123456@localhost
This commit is contained in:
@@ -187,8 +187,6 @@ private:
|
|||||||
vk::raii::DebugReportCallbackEXT debug_report_callback = nullptr;
|
vk::raii::DebugReportCallbackEXT debug_report_callback = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void set_server_uri(std::string uri);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using singleton<application>::instance;
|
using singleton<application>::instance;
|
||||||
application(application_info info);
|
application(application_info info);
|
||||||
@@ -214,6 +212,8 @@ public:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void set_server_uri(std::string uri);
|
||||||
|
|
||||||
static bool is_session_running()
|
static bool is_session_running()
|
||||||
{
|
{
|
||||||
return instance().session_running;
|
return instance().session_running;
|
||||||
|
|||||||
+7
-2
@@ -38,7 +38,7 @@
|
|||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
void real_main(android_app * native_app)
|
void real_main(android_app * native_app)
|
||||||
#else
|
#else
|
||||||
void real_main()
|
void real_main(int argc, char ** argv)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (wivrn::is_tag)
|
if (wivrn::is_tag)
|
||||||
@@ -55,6 +55,11 @@ void real_main()
|
|||||||
info.version = VK_MAKE_VERSION(1, 0, 0);
|
info.version = VK_MAKE_VERSION(1, 0, 0);
|
||||||
application app(info);
|
application app(info);
|
||||||
|
|
||||||
|
#ifndef __ANDROID__
|
||||||
|
if (argc == 2)
|
||||||
|
app.set_server_uri(argv[1]);
|
||||||
|
#endif
|
||||||
|
|
||||||
app.push_scene<scenes::lobby>();
|
app.push_scene<scenes::lobby>();
|
||||||
|
|
||||||
app.run();
|
app.run();
|
||||||
@@ -123,6 +128,6 @@ int main(int argc, char * argv[])
|
|||||||
spdlog::warn("Invalid value for WIVRN_LOGLEVEL environment variable");
|
spdlog::warn("Invalid value for WIVRN_LOGLEVEL environment variable");
|
||||||
}
|
}
|
||||||
|
|
||||||
real_main();
|
real_main(argc, argv);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user