Ejemplo n.º 1
0
        internal override bool Initialize()
        {
            if (OsuMain.IsWine)
            {
                return(false);
            }

            try
            {
                if (!IsInitialized)
                {
                    realTimeStylus = new RealTimeStylus(GameBase.Instance.Window.Handle, false);
                    SimpleStylus ss = new SimpleStylus(this);
                    realTimeStylus.AsyncPluginCollection.Add(ss);
                    realTimeStylus.Enabled = ConfigManager.sTablet.Value;
                    IsInitialized          = true;
                    return(true);
                }
            }
            catch (Exception)
            {
                NotificationManager.ShowMessage("Tablet initialisation failed.");
            }

            return(false);
        }
Ejemplo n.º 2
0
 public static bool InitialiseTablet()
 {
     if ((IsRunningOnTablet() || ConfigManager.sTablet) && !isInitialized)
     {
         try
         {
             RealTimeStylus s  = new RealTimeStylus(GameBase.Instance.Window.Handle, false);
             SimpleStylus   ss = new SimpleStylus();
             s.AsyncPluginCollection.Add(ss);
             s.Enabled     = true;
             isInitialized = true;
             return(true);
         }
         catch (Exception e)
         {
             GameBase.ShowMessage("Tablet initialisation failed.");
         }
     }
     return(false);
 }