public Main() { try { this.sound = new Sound(); this.graphics = new GraphicsDeviceManager((Microsoft.Xna.Framework.Game) this); this.graphics.PreferMultiSampling = false; Main.ini = new IniFiles(Directory.GetCurrentDirectory() + "/custom.ini"); this.Content.RootDirectory = "Content/Model"; this.graphics.PreferredBackBufferWidth = 640; this.graphics.PreferredBackBufferHeight = 480; Main.WindowTitle = "東方幕華祭 ~ Fantastic Danmaku Festival. ver " + Main.version; Main.padinfo = new JOYINFOEX(); Main.padinfo.dwSize = Marshal.SizeOf(typeof(JOYINFOEX)); Main.padinfo.dwFlags = 128; Main.MKeys = new bool[RecordManager.used.Length]; Main.preMKeys = new bool[RecordManager.used.Length]; sourseForm = new SourseForm(); // sourseForm.Show(); } catch (Exception ex) { StreamWriter streamWriter = new StreamWriter("Error.txt"); DateTime now = DateTime.Now; streamWriter.Write("[" + now.Hour.ToString("00") + ":" + now.Minute.ToString("00") + ":" + now.Second.ToString("00") + "]\n" + ex.ToString()); streamWriter.Close(); Main.Message(ex.ToString()); } }
public static extern int joyGetPosEx(int uJoyID, ref JOYINFOEX pji);