diff --git a/src/com/twobigears/circlesynth/SynthCircle.java b/src/com/twobigears/circlesynth/SynthCircle.java index 6bee441..e01716e 100644 --- a/src/com/twobigears/circlesynth/SynthCircle.java +++ b/src/com/twobigears/circlesynth/SynthCircle.java @@ -1137,6 +1137,8 @@ public void updateCircles(float mX, float mY) { int checkdelete; int fxcheckdelete; + private static float mSavedPlayState = 0; + /** * This is where the magic happens. All touch events are sent here, and then * worked on accordingly. @@ -1329,8 +1331,21 @@ public void bpmChanged(int t) { PdBase.sendFloat("pd_bpm", bpm); } + @Override + protected void onPause() { + PdBase.sendFloat("pd_playToggle", 0); + if (toolbar.playToggleB.isEnabled) { + mSavedPlayState = 1; + } + else { + mSavedPlayState = 0; + } + super.onPause(); + } + @Override protected void onResume() { + PdBase.sendFloat("pd_playToggle", mSavedPlayState); super.onResume(); }