コード例 #1
0
ファイル: SDLActivity.java プロジェクト: fcjailybo/asgp
 // Called when we lose the surface
 @Override
 public void surfaceDestroyed(SurfaceHolder holder) {
   Log.v("SDL", "surfaceDestroyed()");
   // Call this *before* setting mIsSurfaceReady to 'false'
   SDLActivity.handlePause();
   SDLActivity.mIsSurfaceReady = false;
   SDLActivity.onNativeSurfaceDestroyed();
 }
コード例 #2
0
ファイル: SDLActivity.java プロジェクト: mactec0/flare-engine
  // Events
  @Override
  protected void onPause() {
    Log.v("SDL", "onPause()");
    super.onPause();

    if (SDLActivity.mBrokenLibraries) {
      return;
    }

    SDLActivity.handlePause();
  }
コード例 #3
0
ファイル: SDLActivity.java プロジェクト: Tkachov/Square
  // Called when we lose the surface
  @Override
  public void surfaceDestroyed(SurfaceHolder holder) {
    Log.v("SDL", "surfaceDestroyed()");
    // Call this *before* setting mIsSurfaceReady to 'false'
    SDLActivity.handlePause();
    SDLActivity.mIsSurfaceReady = false;

    /* We have to clear the current context and destroy the egl surface here
     * Otherwise there's BAD_NATIVE_WINDOW errors coming from eglCreateWindowSurface on resume
     * Ref: http://stackoverflow.com/questions/8762589/eglcreatewindowsurface-on-ics-and-switching-from-2d-to-3d
     */

    EGL10 egl = (EGL10) EGLContext.getEGL();
    egl.eglMakeCurrent(
        SDLActivity.mEGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
    egl.eglDestroySurface(SDLActivity.mEGLDisplay, SDLActivity.mEGLSurface);
    SDLActivity.mEGLSurface = EGL10.EGL_NO_SURFACE;
  }
コード例 #4
0
ファイル: SDLActivity.java プロジェクト: fcjailybo/asgp
 // Events
 @Override
 protected void onPause() {
   Log.v("SDL", "onPause()");
   super.onPause();
   SDLActivity.handlePause();
 }