Document the mouse control method for Cube.
[sgt/puzzles] / midend.c
index e8bcd20..1def041 100644 (file)
--- a/midend.c
+++ b/midend.c
@@ -132,6 +132,14 @@ static void midend_set_timer(midend_data *me)
        deactivate_timer(me->frontend);
 }
 
+void midend_force_redraw(midend_data *me)
+{
+    if (me->drawstate)
+        me->ourgame->free_drawstate(me->drawstate);
+    me->drawstate = me->ourgame->new_drawstate(me->states[0].state);
+    midend_redraw(me);
+}
+
 void midend_new_game(midend_data *me)
 {
     while (me->nstates > 0)
@@ -317,7 +325,7 @@ static int midend_really_process_key(midend_data *me, int x, int y, int button)
     } else {
         game_state *s =
             me->ourgame->make_move(me->states[me->statepos-1].state,
-                                   me->ui, x, y, button);
+                                   me->ui, me->drawstate, x, y, button);
 
         if (s == me->states[me->statepos-1].state) {
             /*