コード例 #1
0
ファイル: FFJoystick.cpp プロジェクト: nickpenaranda/gmdrive
JNIEXPORT jint JNICALL Java_at_wisch_joystick_FFJoystick_pause (JNIEnv *env, jclass, jint hapticDeviceIndex){
	int num = SDL_HapticPause(ffjoysticks[hapticDeviceIndex]);
	if (num < 0) {
		throwException(env, SDL_GetError());
		return -19;
	}
	return num;
}
コード例 #2
0
ファイル: SdlJoystick.cpp プロジェクト: baibaiwei/vrjuggler
bool SdlJoystick::setPause(const bool pause)
{
#if SDL_VERSION_ATLEAST(1,3,0)
   if (mPause == pause) return true;

   bool ret = false;
   if (mHaptic && mPause != pause)
   {
      if (mPause)
         ret = (SDL_HapticUnpause(mHaptic) == 0);
      else
         ret = (SDL_HapticPause(mHaptic) == 0);
      if (ret) mPause = !mPause;
   }
   return ret;
#else
   mPause = pause;
   return true;
#endif
}