src/core/android/SDL_android.cpp
changeset 7191 75360622e65f
parent 7190 11612d544fcd
child 7246 be3beed886ea
     1.1 --- a/src/core/android/SDL_android.cpp	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/src/core/android/SDL_android.cpp	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -121,7 +121,7 @@
     1.4                                  "createGLContext","(II[I)Z");
     1.5      midFlipBuffers = mEnv->GetStaticMethodID(mActivityClass,
     1.6                                  "flipBuffers","()V");
     1.7 -    midAudioInit = mEnv->GetStaticMethodID(mActivityClass, 
     1.8 +    midAudioInit = mEnv->GetStaticMethodID(mActivityClass,
     1.9                                  "audioInit", "(IZZI)V");
    1.10      midAudioWriteShortBuffer = mEnv->GetStaticMethodID(mActivityClass,
    1.11                                  "audioWriteShortBuffer", "([S)V");
    1.12 @@ -184,14 +184,14 @@
    1.13  // Low memory
    1.14  extern "C" void Java_org_libsdl_app_SDLActivity_nativeLowMemory(
    1.15                                      JNIEnv* env, jclass cls)
    1.16 -{    
    1.17 +{
    1.18      SDL_SendAppEvent(SDL_APP_LOWMEMORY);
    1.19  }
    1.20  
    1.21  // Quit
    1.22  extern "C" void Java_org_libsdl_app_SDLActivity_nativeQuit(
    1.23                                      JNIEnv* env, jclass cls)
    1.24 -{    
    1.25 +{
    1.26      // Inject a SDL_QUIT event
    1.27      SDL_SendQuit();
    1.28      SDL_SendAppEvent(SDL_APP_TERMINATING);
    1.29 @@ -348,7 +348,7 @@
    1.30  extern "C" void Android_JNI_SwapWindow()
    1.31  {
    1.32      JNIEnv *mEnv = Android_JNI_GetEnv();
    1.33 -    mEnv->CallStaticVoidMethod(mActivityClass, midFlipBuffers); 
    1.34 +    mEnv->CallStaticVoidMethod(mActivityClass, midFlipBuffers);
    1.35  }
    1.36  
    1.37  extern "C" void Android_JNI_SetActivityTitle(const char *title)
    1.38 @@ -453,7 +453,7 @@
    1.39  
    1.40      /* Allocating the audio buffer from the Java side and passing it as the return value for audioInit no longer works on
    1.41       * Android >= 4.2 due to a "stale global reference" error. So now we allocate this buffer directly from this side. */
    1.42 -    
    1.43 +
    1.44      if (is16Bit) {
    1.45          jshortArray audioBufferLocal = env->NewShortArray(desiredBufferFrames * (audioBufferStereo ? 2 : 1));
    1.46          if (audioBufferLocal) {
    1.47 @@ -513,7 +513,7 @@
    1.48  {
    1.49      JNIEnv *env = Android_JNI_GetEnv();
    1.50  
    1.51 -    env->CallStaticVoidMethod(mActivityClass, midAudioQuit); 
    1.52 +    env->CallStaticVoidMethod(mActivityClass, midAudioQuit);
    1.53  
    1.54      if (audioBuffer) {
    1.55          env->DeleteGlobalRef(audioBuffer);
    1.56 @@ -592,7 +592,7 @@
    1.57      mid = mEnv->GetStaticMethodID(mActivityClass,
    1.58              "getContext","()Landroid/content/Context;");
    1.59      context = mEnv->CallStaticObjectMethod(mActivityClass, mid);
    1.60 -    
    1.61 +
    1.62  
    1.63      // assetManager = context.getAssets();
    1.64      mid = mEnv->GetMethodID(mEnv->GetObjectClass(context),
    1.65 @@ -779,7 +779,7 @@
    1.66              ctx->hidden.androidio.position += result;
    1.67          }
    1.68          return bytesRead / size;
    1.69 -    }    
    1.70 +    }
    1.71  }
    1.72  
    1.73  extern "C" size_t Android_JNI_FileWrite(SDL_RWops* ctx, const void* buffer,
    1.74 @@ -920,7 +920,7 @@
    1.75      }
    1.76  
    1.77      return ctx->hidden.androidio.position;
    1.78 -    
    1.79 +
    1.80  }
    1.81  
    1.82  extern "C" int Android_JNI_FileClose(SDL_RWops* ctx)
    1.83 @@ -1151,7 +1151,7 @@
    1.84  extern "C" void *SDL_AndroidGetActivity()
    1.85  {
    1.86      /* See SDL_system.h for caveats on using this function. */
    1.87 -    
    1.88 +
    1.89      jmethodID mid;
    1.90  
    1.91      JNIEnv *env = Android_JNI_GetEnv();