Exemplo n.º 1
0
 private static void tmrCheckMouseMove_Tick(object sender, EventArgs e)
 {
     //Rarely the cursor becomes hidden despite leaving the window or moving
     //Have not been able to find a reliable way to reproduce it yet
     //This is a patch to prevent that bug from having any negative impact
     if (_lastPosition != Cursor.Position)
     {
         if (!InteropEmu.HasArkanoidPaddle())
         {
             ShowMouse();
         }
         _lastPosition = Cursor.Position;
     }
 }
Exemplo n.º 2
0
        public static void OnMouseMove(Control ctrl)
        {
            if (!InteropEmu.IsRunning() || InteropEmu.IsPaused() || !InteropEmu.HasArkanoidPaddle())
            {
                ShowMouse();
            }
            else if (InteropEmu.HasArkanoidPaddle() && !CursorManager.NeedMouseIcon)
            {
                HideMouse();
            }

            _tmrHideMouse.Stop();

            if (!CursorManager.NeedMouseIcon)
            {
                //Only hide mouse if no zapper (otherwise this could be pretty annoying)
                ctrl.Cursor = Cursors.Default;

                if (InteropEmu.IsRunning() && !InteropEmu.IsPaused())
                {
                    _tmrHideMouse.Start();
                }
            }
        }