예제 #1
0
파일: CursorManager.cs 프로젝트: Rysm/Mesen
 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;
     }
 }
예제 #2
0
파일: CursorManager.cs 프로젝트: Rysm/Mesen
        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();
                }
            }
        }