From 8f551b5dc1b7844caab0cf595e841922a7a39adc Mon Sep 17 00:00:00 2001 From: d3kod Date: Tue, 19 Nov 2013 23:26:21 -0800 Subject: [PATCH] #41 fix --- src/com/twobigears/circlesynth/SynthCircle.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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(); }