File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 22
22
23
23
#ifdef SDL_VIDEO_DRIVER_OPENVR
24
24
25
+ #if 0
25
26
#define DEBUG_OPENVR
27
+ #endif
26
28
27
29
#include "../../events/SDL_mouse_c.h"
28
30
#include "../../events/SDL_keyboard_c.h"
@@ -445,7 +447,7 @@ static void OPENVR_VirtualControllerUpdate(void *userdata)
445
447
static bool OPENVR_SetupJoystickBasedOnLoadedActionManifest (SDL_VideoData * videodata )
446
448
{
447
449
SDL_VirtualJoystickDesc desc ;
448
- int virtual_index ;
450
+ SDL_JoystickID virtual_id ;
449
451
450
452
EVRInputError e = 0 ;
451
453
@@ -537,9 +539,9 @@ static bool OPENVR_SetupJoystickBasedOnLoadedActionManifest(SDL_VideoData * vide
537
539
desc .RumbleTriggers = OPENVR_VirtualControllerRumbleTriggers ;
538
540
desc .Update = OPENVR_VirtualControllerUpdate ;
539
541
desc .userdata = videodata ;
540
- virtual_index = SDL_AttachVirtualJoystick (& desc );
542
+ virtual_id = SDL_AttachVirtualJoystick (& desc );
541
543
542
- if (virtual_index < 0 ) {
544
+ if (! virtual_id ) {
543
545
return SDL_SetError ("OPENVR: Couldn't open virtual joystick device: %s" , SDL_GetError ());
544
546
} else {
545
547
videodata -> virtual_joystick = SDL_OpenJoystick (virtual_index );
@@ -552,7 +554,7 @@ static bool OPENVR_SetupJoystickBasedOnLoadedActionManifest(SDL_VideoData * vide
552
554
SDL_Log ("Loaded virtual joystick with %d buttons and %d axes" , videodata -> input_action_handles_buttons_count , videodata -> input_action_handles_axes_count );
553
555
#endif
554
556
555
- return false ;
557
+ return true ;
556
558
}
557
559
558
560
static bool OPENVR_InitializeOverlay (SDL_VideoDevice * _this ,SDL_Window * window )
You can’t perform that action at this time.
0 commit comments