Misc UI updates and fixes:
- Vertically center the server name for manually added servers - Add padding for feature icons - Use a popup for adding a new server - Display pointers for both controllers - Avoid jumps in scrolling when the focused controller changes - Grab the GUI by the pointed position instead of the center - Add battery level in lobby - Use the correct width in the server list if there is a scrollbar - Make sure the tooltip does not overflow on other layers - Save the virtual keyboard layout in the config file - Don't display the IP address for USB connections - Allow receiving intents when WiVRn is already running - Add recentering tip
This commit is contained in:
+18
-8
@@ -54,6 +54,10 @@
|
||||
|
||||
class scene;
|
||||
|
||||
#ifdef __ANDROID__
|
||||
extern "C" __attribute__((visibility("default"))) void Java_org_meumeu_wivrn_MainActivity_onNewIntent(JNIEnv * env, jobject instance, jobject intent_obj);
|
||||
#endif
|
||||
|
||||
struct application_info
|
||||
{
|
||||
std::string name = "Unnamed application";
|
||||
@@ -71,6 +75,10 @@ class application : public singleton<application>
|
||||
{
|
||||
friend class scene;
|
||||
|
||||
#ifdef __ANDROID__
|
||||
friend __attribute__((visibility("default"))) void Java_org_meumeu_wivrn_MainActivity_onNewIntent(JNIEnv * env, jobject instance, jobject intent_obj);
|
||||
#endif
|
||||
|
||||
application_info app_info;
|
||||
#ifdef __ANDROID__
|
||||
ANativeWindow * native_window = nullptr;
|
||||
@@ -140,8 +148,8 @@ class application : public singleton<application>
|
||||
|
||||
std::shared_ptr<wifi_lock> wifi;
|
||||
|
||||
std::string server_address;
|
||||
bool server_tcp_only = false;
|
||||
std::mutex server_intent_mutex;
|
||||
std::optional<wivrn_discover::service> server_intent;
|
||||
|
||||
std::mutex scene_stack_lock;
|
||||
std::vector<std::shared_ptr<scene>> scene_stack;
|
||||
@@ -171,6 +179,8 @@ class application : public singleton<application>
|
||||
vk::raii::DebugReportCallbackEXT debug_report_callback = nullptr;
|
||||
#endif
|
||||
|
||||
void set_server_uri(std::string uri);
|
||||
|
||||
public:
|
||||
using singleton<application>::instance;
|
||||
application(application_info info);
|
||||
@@ -348,14 +358,14 @@ public:
|
||||
return instance().vk_queue;
|
||||
}
|
||||
|
||||
const std::string & get_server_address() const
|
||||
static std::optional<wivrn_discover::service> get_intent()
|
||||
{
|
||||
return server_address;
|
||||
}
|
||||
std::unique_lock _{instance().server_intent_mutex};
|
||||
|
||||
const bool & get_server_tcp_only() const
|
||||
{
|
||||
return server_tcp_only;
|
||||
std::optional<wivrn_discover::service> intent = instance().server_intent;
|
||||
instance().server_intent.reset();
|
||||
|
||||
return intent;
|
||||
}
|
||||
|
||||
static vk::raii::PhysicalDevice & get_physical_device()
|
||||
|
||||
Reference in New Issue
Block a user