Disable OpenHMD dummy device for release builds

Also fixing warning.
This commit is contained in:
Julian Eisel
2017-03-05 22:32:46 +01:00
parent 4950ce4cd9
commit 6907aa26c6
2 changed files with 9 additions and 2 deletions

View File

@@ -51,7 +51,14 @@
int WM_device_HMD_num_devices_get(void)
{
return GHOST_HMDgetNumDevices();
const int tot_devices = GHOST_HMDgetNumDevices();
#ifdef NDEBUG
/* OpenHMD always places the dummy device last, we don't want to display it in non-debug builds. */
return tot_devices - 1;
#else
return tot_devices;
#endif
}
/**

View File

@@ -674,7 +674,7 @@ static bool wm_window_setup_type(bContext *C, Scene *scene, wmWindow *win, rcti
sa = win->screen->areabase.first;
CTX_wm_area_set(C, sa);
int spacetype;
int spacetype = SPACE_EMPTY;
switch (type) {
case WM_WINDOW_RENDER:
spacetype = SPACE_IMAGE;