File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1492,6 +1492,9 @@ int Com_EventLoop( void )
1492
1492
byte bufData[ MAX_MSGLEN ];
1493
1493
msg_t buf;
1494
1494
1495
+ int mouseX = 0 , mouseY = 0 , mouseTime = 0 ;
1496
+ bool mouseHaveEvent = false ;
1497
+
1495
1498
MSG_Init ( &buf, bufData, sizeof ( bufData ) );
1496
1499
1497
1500
while ( 1 )
@@ -1501,6 +1504,10 @@ int Com_EventLoop( void )
1501
1504
// if no more events are available
1502
1505
if ( ev.evType == SE_NONE )
1503
1506
{
1507
+ if ( mouseHaveEvent ){
1508
+ CL_MouseEvent ( mouseX, mouseY, mouseTime );
1509
+ }
1510
+
1504
1511
// manually send packet events for the loopback channel
1505
1512
while ( NET_GetLoopPacket ( NS_CLIENT, &evFrom, &buf ) )
1506
1513
{
@@ -1551,7 +1558,10 @@ int Com_EventLoop( void )
1551
1558
break ;
1552
1559
1553
1560
case SE_MOUSE:
1554
- CL_MouseEvent ( ev.evValue , ev.evValue2 , ev.evTime );
1561
+ mouseHaveEvent = true ;
1562
+ mouseX += ev.evValue ;
1563
+ mouseY += ev.evValue2 ;
1564
+ mouseTime += ev.evTime ;
1555
1565
break ;
1556
1566
1557
1567
case SE_JOYSTICK_AXIS:
You can’t perform that action at this time.
0 commit comments