 +    pp::MouseInputEvent *mouse_event =
 +      reinterpret_cast<pp::MouseInputEvent*>(input_event);
 +    event->button = translateButton(mouse_event->GetButton());
++  } else if (event->type == PP_INPUTEVENT_TYPE_WHEEL) {
++    pp::WheelInputEvent *wheel_event =
++      reinterpret_cast<pp::WheelInputEvent*>(input_event);
++    wheel_clicks_x += wheel_event->GetTicks().x();
++    wheel_clicks_y += wheel_event->GetTicks().y();
++    event->wheel_clicks_x = trunc(wheel_clicks_x);
++    event->wheel_clicks_y = trunc(wheel_clicks_y);
++    if (event->wheel_clicks_x == 0 && event->wheel_clicks_y == 0) {
++      free(event);
++      return;
++    }
++    wheel_clicks_x -= event->wheel_clicks_x;
++    wheel_clicks_y -= event->wheel_clicks_y;
 +  } else if (event->type == PP_INPUTEVENT_TYPE_MOUSEMOVE) {
 +    pp::MouseInputEvent *mouse_event =
 +      reinterpret_cast<pp::MouseInputEvent*>(input_event);

+
+#endif  // LIBRARIES_NACL_MOUNTS_BASE_MAINTHREADRUNNER_H_
diff -urN SDL-1.2.14/src/video/nacl/SDL_naclevents.cc SDL-1.2.14-nacl/src/video/nacl/SDL_naclevents.cc
--- SDL-1.2.14/src/video/nacl/SDL_naclevents.cc	1970-01-01 08:00:00.000000000 +0800
+++ SDL-1.2.14-nacl/src/video/nacl/SDL_naclevents.cc	2011-12-05 19:54:13.000000000 +0800
@@ -0,0 +1,248 @@
+#include "SDL_config.h"
+
+#include "SDL_nacl.h"

 LT_CURRENT  = @LT_CURRENT@
diff -urN SDL-1.2.14/src/audio/nacl/SDL_naclaudio.cc SDL-1.2.14-nacl/src/audio/nacl/SDL_naclaudio.cc
--- SDL-1.2.14/src/audio/nacl/SDL_naclaudio.cc	1970-01-01 03:00:00.000000000 +0300
+++ SDL-1.2.14-nacl/src/audio/nacl/SDL_naclaudio.cc	2012-01-16 12:16:39.460269192 +0400
@@ -0,0 +1,133 @@
+
+#include "SDL_config.h"
