+static void set_speed(int d)
+{
+ if (d > 0) speed = SPEED_UP(speed);
+ if (d < 0) speed = SPEED_DN(speed);
+
+ demo_speed_set(speed);
+ hud_speed_pulse(speed);
+}
+
+static void demo_play_stick(int id, int a, float v, int bump)
+{
+ if (!bump)
+ return;
+
+ if (config_tst_d(CONFIG_JOYSTICK_AXIS_Y, a))
+ {
+ if (v < 0) set_speed(+1);
+ if (v > 0) set_speed(-1);
+ }
+}
+
+static int demo_play_click(int b, int d)
+{
+ if (d)
+ {
+ if (b == SDL_BUTTON_WHEELUP) set_speed(+1);
+ if (b == SDL_BUTTON_WHEELDOWN) set_speed(-1);
+ }
+
+ return 1;
+}
+