aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llappviewerlinux.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2010-07-01 15:19:49 +0200
committerArmin Weatherwax2010-07-01 15:19:49 +0200
commit1ac763405f15934beb156a9db67337de84a68755 (patch)
tree3d9dc875833b1a61d144120eb45c686e2af304ad /linden/indra/newview/llappviewerlinux.cpp
parentretry joystick detection when opening prefs-input-joystick (diff)
downloadmeta-impy-1ac763405f15934beb156a9db67337de84a68755.zip
meta-impy-1ac763405f15934beb156a9db67337de84a68755.tar.gz
meta-impy-1ac763405f15934beb156a9db67337de84a68755.tar.bz2
meta-impy-1ac763405f15934beb156a9db67337de84a68755.tar.xz
add dbus method to retry joystick detection
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llappviewerlinux.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/linden/indra/newview/llappviewerlinux.cpp b/linden/indra/newview/llappviewerlinux.cpp
index 4372053..39c2692 100644
--- a/linden/indra/newview/llappviewerlinux.cpp
+++ b/linden/indra/newview/llappviewerlinux.cpp
@@ -65,6 +65,7 @@
65 65
66#if LL_DBUS_ENABLED 66#if LL_DBUS_ENABLED
67#include "llappviewerlinux_api.h" 67#include "llappviewerlinux_api.h"
68#include "llviewerjoystick.h"
68#endif 69#endif
69 70
70namespace 71namespace
@@ -452,6 +453,28 @@ gboolean viewer_app_api_GoSLURL(ViewerAppAPI *obj, gchar *slurl, gboolean **succ
452 return TRUE; // the invokation succeeded, even if the actual dispatch didn't. 453 return TRUE; // the invokation succeeded, even if the actual dispatch didn't.
453} 454}
454 455
456gboolean viewer_app_api_HotplugJoystick(ViewerAppAPI *obj, gchar *dummy, gboolean **success_rtn, GError **error)
457{
458
459 llinfos << "Joystick plugged in: " << dummy << llendl;
460 bool success = false;
461 bool joystick_inited = LLViewerJoystick::getInstance()->isJoystickInitialized();
462
463 if (!joystick_inited)
464 {
465 success = LLViewerJoystick::getInstance()->init(false);
466 }
467
468 *success_rtn = g_new (gboolean, 1);
469 (*success_rtn)[0] = (gboolean)success;
470
471 return TRUE; // the invokation succeeded, even if the actual dispatch didn't.
472
473 // TODO: fire this by the spacenavi udev rule.
474 // for testing plug in joystick while Imprudence is running and type in a
475 // console: dbus-send --type=method_call --dest=com.secondlife.ViewerAppAPIService /com/secondlife/ViewerAppAPI com.secondlife.ViewerAppAPI.HotplugJoystick string:'dummy'
476}
477
455/// 478///
456 479
457//virtual 480//virtual