mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-22 14:41:47 +00:00
d/qwerty: Add QWERTY_ENABLE environment variable
This commit is contained in:
parent
183ee4f4ee
commit
e13a6fc2fd
|
@ -9,8 +9,12 @@
|
||||||
|
|
||||||
#include "qwerty_device.h"
|
#include "qwerty_device.h"
|
||||||
#include "util/u_misc.h"
|
#include "util/u_misc.h"
|
||||||
|
#include "util/u_debug.h"
|
||||||
#include "xrt/xrt_prober.h"
|
#include "xrt/xrt_prober.h"
|
||||||
|
|
||||||
|
// Driver disabled by default for being experimental
|
||||||
|
DEBUG_GET_ONCE_BOOL_OPTION(qwerty_enable, "QWERTY_ENABLE", false)
|
||||||
|
|
||||||
struct qwerty_prober
|
struct qwerty_prober
|
||||||
{
|
{
|
||||||
struct xrt_auto_prober base;
|
struct xrt_auto_prober base;
|
||||||
|
@ -36,6 +40,11 @@ qwerty_prober_autoprobe(struct xrt_auto_prober *xap,
|
||||||
struct xrt_prober *xp,
|
struct xrt_prober *xp,
|
||||||
struct xrt_device **out_xdevs)
|
struct xrt_device **out_xdevs)
|
||||||
{
|
{
|
||||||
|
bool qwerty_enabled = debug_get_bool_option_qwerty_enable();
|
||||||
|
if (!qwerty_enabled) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool hmd_wanted = !no_hmds; // Hopefully easier to reason about
|
bool hmd_wanted = !no_hmds; // Hopefully easier to reason about
|
||||||
|
|
||||||
struct qwerty_device *qhmd = qwerty_hmd_create();
|
struct qwerty_device *qhmd = qwerty_hmd_create();
|
||||||
|
|
|
@ -46,6 +46,7 @@ oxr_sdl2_hack_stop(void **hack)
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
|
|
||||||
DEBUG_GET_ONCE_BOOL_OPTION(gui, "OXR_DEBUG_GUI", false)
|
DEBUG_GET_ONCE_BOOL_OPTION(gui, "OXR_DEBUG_GUI", false)
|
||||||
|
DEBUG_GET_ONCE_BOOL_OPTION(qwerty_enable, "QWERTY_ENABLE", false)
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -148,7 +149,7 @@ sdl2_loop(struct sdl2_program *p)
|
||||||
ImPlot_SetCurrentContext(plot_ctx);
|
ImPlot_SetCurrentContext(plot_ctx);
|
||||||
|
|
||||||
// Setup qwerty driver usage
|
// Setup qwerty driver usage
|
||||||
bool qwerty_enabled = true; // @todo: get from an env var
|
bool qwerty_enabled = debug_get_bool_option_qwerty_enable();
|
||||||
|
|
||||||
// Main loop
|
// Main loop
|
||||||
struct gui_imgui gui = {0};
|
struct gui_imgui gui = {0};
|
||||||
|
|
Loading…
Reference in a new issue