Handle the default case more robustly when parsing events master
authorAntonio Ospite <ospite@studenti.unina.it>
Thu, 21 Mar 2013 15:55:26 +0000 (16:55 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Thu, 21 Mar 2013 15:55:26 +0000 (16:55 +0100)
scrolling/sdl-scrolling.c

index 4b9475f..df3a2f3 100644 (file)
@@ -158,6 +158,11 @@ int main(int argc, char *argv[])
                                                /* TODO: improve scaling here */
                                                y_offset = event.jaxis.value;
                                }
                                                /* TODO: improve scaling here */
                                                y_offset = event.jaxis.value;
                                }
+                               break;
+
+                       default:
+                               /* ignore other events */
+                               break;
                        }
                }
 
                        }
                }