瀏覽代碼

Fixed PSVR switching to VR mode

TheOnlyJoey 8 年之前
父節點
當前提交
441a06d791
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 1 0
      src/drv_psvr/psvr.c
  2. 5 1
      src/drv_psvr/psvr.h

+ 1 - 0
src/drv_psvr/psvr.c

@@ -213,6 +213,7 @@ static ohmd_device* open_device(ohmd_driver* driver, ohmd_device_desc* desc)
 
 	// turn the display on
 	hid_write(priv->hmd_control, psvr_power_on, sizeof(psvr_power_on));
+	
 	// set VR mode for the hmd
 	hid_write(priv->hmd_control, psvr_vrmode_on, sizeof(psvr_vrmode_on));
 

+ 5 - 1
src/drv_psvr/psvr.h

@@ -32,7 +32,11 @@ typedef struct
 	psvr_sensor_sample samples[1];
 } psvr_sensor_packet;
 
-static const unsigned char psvr_vrmode_on[12]  = {
+static const unsigned char psvr_vrmode_on[8]  = {
+	0x23, 0x00, 0xaa, 0x04, 0x01, 0x00, 0x00, 0x00
+};
+
+static const unsigned char psvr_tracking_on[12]  = {
 	0x11, 0x00, 0xaa, 0x08, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00
 };