diff options
author | Sven Göthel <[email protected]> | 2024-01-28 09:20:11 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-28 09:20:11 +0100 |
commit | c5bca1f0dba2540088e8e2a90d720fdbc4870b30 (patch) | |
tree | d4551065e02448e034fed875ea545a844898f8be /src/demos/com/jogamp | |
parent | 28e5b66e6e201259c6ad240552045314d2072595 (diff) |
Cleanup GLMediaPlayer.EventMask.Bit handling in GLMediaEventListener implementations: Either Uninit, Init, Pause or Play (exclusive)
Diffstat (limited to 'src/demos/com/jogamp')
5 files changed, 5 insertions, 10 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0a.java b/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0a.java index e9572d6ff..ad0ce310f 100644 --- a/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0a.java +++ b/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0a.java @@ -112,8 +112,7 @@ public class MovieCubeActivity0a extends NewtBaseActivity { glWindowMain.addGLEventListener(demoMain); anim.setUpdateFPSFrames(60*5, null); anim.resetFPSCounter(); - } - if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { + } else if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { anim.resetFPSCounter(); } if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Error) || eventMask.isSet(GLMediaPlayer.EventMask.Bit.EOS) ) { diff --git a/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0b.java b/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0b.java index 06ae92bc4..7a0eb47da 100644 --- a/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0b.java +++ b/src/demos/com/jogamp/opengl/demos/android/MovieCubeActivity0b.java @@ -114,8 +114,7 @@ public class MovieCubeActivity0b extends NewtBaseActivity { glWindowMain.addGLEventListener(demoMain); anim.setUpdateFPSFrames(60*5, null); anim.resetFPSCounter(); - } - if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { + } else if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { anim.resetFPSCounter(); } if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Error) || eventMask.isSet(GLMediaPlayer.EventMask.Bit.EOS) ) { diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieCube.java b/src/demos/com/jogamp/opengl/demos/av/MovieCube.java index f268ba43c..1507e1322 100644 --- a/src/demos/com/jogamp/opengl/demos/av/MovieCube.java +++ b/src/demos/com/jogamp/opengl/demos/av/MovieCube.java @@ -615,8 +615,7 @@ public class MovieCube implements GLEventListener { anim.setUpdateFPSFrames(60, null); anim.resetFPSCounter(); mc.resetGLState(); - } - if( event_mask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { + } else if( event_mask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { anim.resetFPSCounter(); } if( event_mask.isSet(GLMediaPlayer.EventMask.Bit.EOS) ) { diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java b/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java index 7f71cdaf5..0840d87f2 100644 --- a/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java +++ b/src/demos/com/jogamp/opengl/demos/av/MovieSBSStereo.java @@ -842,8 +842,7 @@ public class MovieSBSStereo implements StereoGLEventListener { anim.setUpdateFPSFrames(60, null); anim.resetFPSCounter(); ms.setStereoClientRenderer(stereoClientRenderer); - } - if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { + } else if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { window.getAnimator().resetFPSCounter(); } diff --git a/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java b/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java index a697d2c19..0d928d937 100644 --- a/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java +++ b/src/demos/com/jogamp/opengl/demos/av/MovieSimple.java @@ -628,8 +628,7 @@ public class MovieSimple implements GLEventListener { } }.start(); */ - } - if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { + } else if( eventMask.isSet(GLMediaPlayer.EventMask.Bit.Play) ) { window.getAnimator().resetFPSCounter(); } |