void IN_CenterMouse( void ) { CheckMouseState(); if (!x_grabbed) return; XSelectInput( x_disp, x_win, x_std_event_mask & ~PointerMotionMask ); XWarpPointer( x_disp, None, x_root_win, 0, 0, 0, 0, x_center_width, x_center_height ); XSelectInput( x_disp, x_win, x_std_event_mask ); }
GLOBALOSGLUPROC WaitForNextTick(void) { label_retry: CheckForSystemEvents(); CheckForSavedTasks(); if (ForceMacOff) { return; } if (CurSpeedStopped) { MyDrawChangesAndClear(); WaitForTheNextEvent(); goto label_retry; } if (ExtraTimeNotOver()) { si5b TimeDiff = GetTimeDiff(); if (TimeDiff < 0) { /* FIXME: Implement this? struct timespec rqt; struct timespec rmt; rqt.tv_sec = 0; rqt.tv_nsec = (- TimeDiff) * 1000; (void) nanosleep(&rqt, &rmt); */ } goto label_retry; } if (CheckDateTime()) { #if MySoundEnabled MySound_SecondNotify(); #endif #if EnableDemoMsg DemoModeSecondNotify(); #endif } CheckMouseState(); OnTrueTime = TrueEmulatedTime; }