]> git.pld-linux.org Git - packages/SDL.git/commitdiff
http://sam.zoy.org/projects/libcaca/patch-libsdl1.2-libcaca0.6.diff
authorwolf <wolf@pld-linux.org>
Sun, 4 Jan 2004 15:01:05 +0000 (15:01 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    SDL-caca.patch -> 1.2

SDL-caca.patch

index f10efec9a74f32091485a9d0e45516bde2a3a1a5..42df3bd10a0a65b2b0f5735e880c63ffd357685c 100644 (file)
@@ -188,8 +188,8 @@ diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/Makefile.am lib
 +
 diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/SDL_cacaevents.c libsdl1.2-1.2.6-caca/src/video/caca/SDL_cacaevents.c
 --- libsdl1.2-1.2.6/src/video/caca/SDL_cacaevents.c    1970-01-01 01:00:00.000000000 +0100
-+++ libsdl1.2-1.2.6-caca/src/video/caca/SDL_cacaevents.c       2003-11-21 16:04:12.000000000 +0100
-@@ -0,0 +1,123 @@
++++ libsdl1.2-1.2.6-caca/src/video/caca/SDL_cacaevents.c       2004-01-04 02:31:43.000000000 +0100
+@@ -0,0 +1,119 @@
 +/*
 +    SDL - Simple DirectMedia Layer
 +    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002  Sam Lantinga
@@ -229,7 +229,6 @@ diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/SDL_cacaevents.
 +
 +void Caca_PumpEvents(_THIS)
 +{
-+      static int prev_x = -1, prev_y = -1;
 +      int posted = 0;
 +      int event;
 +      SDL_keysym keysym;
@@ -289,22 +288,19 @@ diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/SDL_cacaevents.
 +                      Caca_lastkey = key;
 +                      gettimeofday ( &Caca_lasttime, NULL );
 +              }
-+              else if ( event & CACA_EVENT_MOUSE_CLICK ) {
-+                      int new_x, new_y, button;
-+                      button = (event & 0x0000ff00) >> 16;
-+                      new_x = ((event & 0x0000ff00) >> 8) * Caca_w / caca_get_width();
-+                      new_y = ((event & 0x000000ff) >> 0) * Caca_h / caca_get_height();
-+
-+                      if ( prev_x != new_x || prev_y != new_y ) {
-+                              posted += SDL_PrivateMouseMotion(0, 0, new_x, new_y);
-+                              prev_x = new_x;
-+                              prev_y = new_y;
-+                      }
-+
++              else if ( event & CACA_EVENT_MOUSE_PRESS ) {
 +                      /* FIXME: we currently ignore the button type! */
++                      int button = event & 0x00ffffff;
 +                      posted += SDL_PrivateMouseButton(SDL_PRESSED, 1, 0, 0);
 +                      posted += SDL_PrivateMouseButton(SDL_RELEASED, 1, 0, 0);
 +              }
++              else if ( event & CACA_EVENT_MOUSE_MOTION ) {
++                      int new_x, new_y;
++                      new_x = ((event & 0x00fff000) >> 12) * Caca_w / caca_get_width();
++                      new_y = ((event & 0x00000fff) >> 0) * Caca_h / caca_get_height();
++
++                      posted += SDL_PrivateMouseMotion(0, 0, new_x, new_y);
++              }
 +      } while ( posted );
 +}
 +
This page took 0.04745 seconds and 4 git commands to generate.