src/events/SDL_mouse.c
changeset 12024 3688283680b1
parent 12007 ecfb6a793c30
child 12188 f081a5675f93
equal deleted inserted replaced
12023:842dd960769e 12024:3688283680b1
   719     } else if (enabled && ShouldUseRelativeModeWarp(mouse)) {
   719     } else if (enabled && ShouldUseRelativeModeWarp(mouse)) {
   720         mouse->relative_mode_warp = SDL_TRUE;
   720         mouse->relative_mode_warp = SDL_TRUE;
   721     } else if (mouse->SetRelativeMouseMode(enabled) < 0) {
   721     } else if (mouse->SetRelativeMouseMode(enabled) < 0) {
   722         if (enabled) {
   722         if (enabled) {
   723             /* Fall back to warp mode if native relative mode failed */
   723             /* Fall back to warp mode if native relative mode failed */
       
   724             if (!mouse->WarpMouse) {
       
   725                 return SDL_SetError("No relative mode implementation available");
       
   726             }
   724             mouse->relative_mode_warp = SDL_TRUE;
   727             mouse->relative_mode_warp = SDL_TRUE;
   725         }
   728         }
   726     }
   729     }
   727     mouse->relative_mode = enabled;
   730     mouse->relative_mode = enabled;
   728     mouse->scale_accum_x = 0.0f;
   731     mouse->scale_accum_x = 0.0f;