@@ -234,32 +234,32 @@ protected static void SetupKnownDeviceModel(IVRModuleDeviceStateRW deviceState)
234234 return ;
235235 case VRModuleDeviceClass . Controller :
236236 {
237- var headName = GetDeviceState ( HMD_DEVICE_INDEX ) . modelNumber ;
238- if ( s_quest2Rgx . IsMatch ( deviceState . modelNumber ) )
237+ var modelNumWithHmd = GetDeviceState ( HMD_DEVICE_INDEX ) . modelNumber + " " + deviceState . modelNumber ;
238+ if ( s_quest2Rgx . IsMatch ( modelNumWithHmd ) )
239239 {
240- deviceState . deviceModel = s_leftRgx . IsMatch ( deviceState . modelNumber ) ? VRModuleDeviceModel . OculusQuest2ControllerLeft : VRModuleDeviceModel . OculusQuest2ControllerRight ;
240+ deviceState . deviceModel = s_leftRgx . IsMatch ( modelNumWithHmd ) ? VRModuleDeviceModel . OculusQuest2ControllerLeft : VRModuleDeviceModel . OculusQuest2ControllerRight ;
241241 deviceState . input2DType = VRModuleInput2DType . JoystickOnly ;
242242 return ;
243243 }
244- else if ( deviceState . modelNumber . Contains ( "Rift S" ) || deviceState . modelNumber . Contains ( "Quest" ) )
244+ else if ( modelNumWithHmd . Contains ( "Rift S" ) || modelNumWithHmd . Contains ( "Quest" ) )
245245 {
246- deviceState . deviceModel = s_leftRgx . IsMatch ( deviceState . modelNumber ) ? VRModuleDeviceModel . OculusQuestOrRiftSControllerLeft : VRModuleDeviceModel . OculusQuestOrRiftSControllerRight ;
246+ deviceState . deviceModel = s_leftRgx . IsMatch ( modelNumWithHmd ) ? VRModuleDeviceModel . OculusQuestOrRiftSControllerLeft : VRModuleDeviceModel . OculusQuestOrRiftSControllerRight ;
247247 deviceState . input2DType = VRModuleInput2DType . JoystickOnly ;
248248 return ;
249249 }
250- else if ( deviceState . modelNumber . Contains ( "Touch" ) )
250+ else if ( modelNumWithHmd . Contains ( "Touch" ) )
251251 {
252- deviceState . deviceModel = s_leftRgx . IsMatch ( deviceState . modelNumber ) ? VRModuleDeviceModel . OculusTouchLeft : VRModuleDeviceModel . OculusTouchRight ;
252+ deviceState . deviceModel = s_leftRgx . IsMatch ( modelNumWithHmd ) ? VRModuleDeviceModel . OculusTouchLeft : VRModuleDeviceModel . OculusTouchRight ;
253253 deviceState . input2DType = VRModuleInput2DType . JoystickOnly ;
254254 return ;
255255 }
256- else if ( deviceState . modelNumber . Contains ( "Go" ) )
256+ else if ( modelNumWithHmd . Contains ( "Go" ) )
257257 {
258258 deviceState . deviceModel = VRModuleDeviceModel . OculusGoController ;
259259 deviceState . input2DType = VRModuleInput2DType . TouchpadOnly ;
260260 return ;
261261 }
262- else if ( deviceState . modelNumber . Contains ( "Gear" ) )
262+ else if ( modelNumWithHmd . Contains ( "Gear" ) )
263263 {
264264 deviceState . deviceModel = VRModuleDeviceModel . OculusGearVrController ;
265265 deviceState . input2DType = VRModuleInput2DType . TouchpadOnly ;
0 commit comments