Disable OpenHMD dummy device for release builds
Also fixing warning.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user