Reset rollo to page 0 when it's fully zoomed out.
diff --git a/res/raw/rollo.c b/res/raw/rollo.c
index 0844c97..8d09127 100644
--- a/res/raw/rollo.c
+++ b/res/raw/rollo.c
@@ -92,6 +92,10 @@
//g_Zoom += (maxf(fabsf(g_PosVelocity), 3) - 3) / 2.f;
}
+void touchUp() {
+ g_LastTouchDown = 0;
+}
+
void setZoomTarget() {
g_ZoomTarget = state->zoomTarget;
//debugF("zoom target", g_ZoomTarget);
@@ -320,8 +324,10 @@
// Set clear value to dim the background based on the zoom position.
if (g_Zoom < 0.001f) {
pfClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- // Nothing else to do if fully zoomed out.
- g_PosPage = roundf(g_PosPage);
+ // When we're zoomed out and not tracking motion events, reset the pos to 0.
+ if (!g_LastTouchDown) {
+ g_PosPage = 0;
+ }
return 1; // 0;
} else if (g_Zoom < 0.8f) {
pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
@@ -329,8 +335,6 @@
pfClearColor(0.0f, 0.0f, 0.0f, 0.80f);
}
-
-
// icons & labels
int iconCount = state->iconCount;
g_PageCount = count_pages(iconCount);