Author: awy
Date: Fri Nov  7 04:01:10 2008
New Revision: 3306

URL: http://svn.slimdevices.com?rev=3306&root=Jive&view=rev
Log:
bug 9583: Compile error on 64bit Linux 
Fix int<->void* cast problems in 64-bit build

Modified:
    7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c

Modified: 7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c?rev=3306&root=Jive&r1=3305&r2=3306&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c (original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c Fri Nov  7 
04:01:10 2008
@@ -1018,7 +1018,7 @@
 
                if (event->type == SDL_MOUSEBUTTONDOWN) {
                        if (mouse_state == MOUSE_STATE_NONE) {
-                               int param;
+                               unsigned int * param = malloc(sizeof(unsigned 
int));
 
                                mouse_state = MOUSE_STATE_DOWN;
 
@@ -1026,8 +1026,8 @@
                                        SDL_RemoveTimer(mouse_timer);
                                }
 
-                               param = (event->button.y << 16) | 
event->button.x;
-                               mouse_timer = SDL_AddTimer(HOLD_TIMEOUT, 
&mousehold_callback, (void *) param);
+                               *param = (event->button.y << 16) | 
event->button.x;
+                               mouse_timer = SDL_AddTimer(HOLD_TIMEOUT, 
&mousehold_callback, param);
 
                                mouse_origin_x = event->button.x;
                                mouse_origin_y = event->button.y;
@@ -1235,9 +1235,10 @@
                case JIVE_USER_EVENT_MOUSE_HOLD:
                        if (mouse_state == MOUSE_STATE_DOWN) {
                                jevent.type = JIVE_EVENT_MOUSE_HOLD;
-                               jevent.u.mouse.x = (unsigned int) 
event->user.data1 & 0xFFFF;
-                               jevent.u.mouse.y = ((unsigned int) 
event->user.data1 >> 16) & 0xFFFF;
+                               jevent.u.mouse.x = *((unsigned int *) 
event->user.data1) & 0xFFFF;
+                               jevent.u.mouse.y = ( *((unsigned int *) 
event->user.data1) >> 16) & 0xFFFF;
                                mouse_state = MOUSE_STATE_SENT;
+                               free(event->user.data1);
                        }
                        break;
 

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to