//[DllImport("User32.dll", CharSet = CharSet.Auto)] //public static extern IntPtr GetWindowDC(IntPtr hWnd); private void PspDisplayForm_Load_1(object sender, EventArgs e) { Console.WriteLine("PspDisplayForm.Thread: {0}", Thread.CurrentThread.ManagedThreadId); //SetStyle(ControlStyles.Opaque, true); //SetStyle(ControlStyles.UserPaint, true); //SetStyle(ControlStyles.AllPaintingInWmPaint, true); // //var DC = this.CreateGraphics().GetHdc(); //int mode = WGL.wglGetPixelFormat(DC); //Console.WriteLine("this.CreateGraphics().GetHdc(): {0}, {1}", DC, mode); this.GLControl = new PspOpenglDisplayControl(); //var DC2 = GetWindowDC(this.GLControl.Handle); //int mode2 = WGL.wglGetPixelFormat(DC2); //Console.WriteLine("this.CreateGraphics().GetHdc(): {0}, {1}", DC2, mode2); this.Controls.Add(this.GLControl); UpdateCheckboxes(); Debug.WriteLine($"Now: {DateTime.UtcNow}"); Debug.WriteLine($"LastCheckedTime: {StoredConfig.LastCheckedTime}"); Debug.WriteLine($"Elapsed: {(DateTime.UtcNow - StoredConfig.LastCheckedTime)}"); if ((DateTime.UtcNow - StoredConfig.LastCheckedTime).TotalDays > 3) { CheckForUpdates(NotifyIfNotFound: false); } Console.WriteLine("[1]"); if (Platform.OS == OS.Windows && !Platform.IsMono) { GameListComponent = new GameListComponent(); GameListComponent.SelectedItem += (IsoFile) => { OpenFileRealOnNewThreadLock(IsoFile); }; GameListComponent.Dock = DockStyle.Fill; //PspConfig.IsosPath = @"e:\isos\pspa"; if (!AutoLoad) { RefreshGameList(); EnablePspDisplay(false); } else { EnablePspDisplay(true); } GameListComponent.Parent = this; } PspDisplay.DrawEvent += PspDisplayTick; Console.WriteLine("[2]"); }
private void PspDisplayForm_Load_1(object sender, EventArgs e) { UtilsFrameLimitingMenu.Checked = this.PspConfig.VerticalSynchronization; UtilsUseFastmemMenu.Checked = IGuiExternalInterface.GetConfig().StoredConfig.UseFastMemory; Debug.WriteLine(String.Format("Now: {0}", DateTime.UtcNow)); Debug.WriteLine(String.Format("LastCheckedTime: {0}", IGuiExternalInterface.GetConfig().StoredConfig.LastCheckedTime)); Debug.WriteLine(String.Format("Elapsed: {0}", (DateTime.UtcNow - IGuiExternalInterface.GetConfig().StoredConfig.LastCheckedTime))); if ((DateTime.UtcNow - IGuiExternalInterface.GetConfig().StoredConfig.LastCheckedTime).TotalDays > 3) { CheckForUpdates(NotifyIfNotFound: false); } if (Platform.OperatingSystem == Platform.OS.Windows) //if (false) { GameListComponent = new GameListComponent(); GameListComponent.SelectedItem += (IsoFile) => { OpenFileRealOnNewThreadLock(IsoFile); }; GameListComponent.Dock = DockStyle.Fill; //PspConfig.IsosPath = @"e:\isos\pspa"; if (!AutoLoad) { RefreshGameList(); GameListComponent.Visible = true; } else { GameListComponent.Visible = false; } GameListComponent.Parent = this; } }
//[DllImport("User32.dll", CharSet = CharSet.Auto)] //public static extern IntPtr GetWindowDC(IntPtr hWnd); private void PspDisplayForm_Load_1(object sender, EventArgs e) { Console.WriteLine("PspDisplayForm.Thread: {0}", Thread.CurrentThread.ManagedThreadId); //SetStyle(ControlStyles.Opaque, true); //SetStyle(ControlStyles.UserPaint, true); //SetStyle(ControlStyles.AllPaintingInWmPaint, true); // //var DC = this.CreateGraphics().GetHdc(); //int mode = WGL.wglGetPixelFormat(DC); //Console.WriteLine("this.CreateGraphics().GetHdc(): {0}, {1}", DC, mode); this.GLControl = new PspOpenglDisplayControl(); //var DC2 = GetWindowDC(this.GLControl.Handle); //int mode2 = WGL.wglGetPixelFormat(DC2); //Console.WriteLine("this.CreateGraphics().GetHdc(): {0}, {1}", DC2, mode2); this.Controls.Add(this.GLControl); UpdateCheckboxes(); Debug.WriteLine(String.Format("Now: {0}", DateTime.UtcNow)); Debug.WriteLine(String.Format("LastCheckedTime: {0}", StoredConfig.LastCheckedTime)); Debug.WriteLine(String.Format("Elapsed: {0}", (DateTime.UtcNow - StoredConfig.LastCheckedTime))); if ((DateTime.UtcNow - StoredConfig.LastCheckedTime).TotalDays > 3) { CheckForUpdates(NotifyIfNotFound: false); } Console.WriteLine("[1]"); if (Platform.OS == OS.Windows && !Platform.IsMono) { GameListComponent = new GameListComponent(); GameListComponent.SelectedItem += (IsoFile) => { OpenFileRealOnNewThreadLock(IsoFile); }; GameListComponent.Dock = DockStyle.Fill; //PspConfig.IsosPath = @"e:\isos\pspa"; if (!AutoLoad) { RefreshGameList(); EnablePspDisplay(false); } else { EnablePspDisplay(true); } GameListComponent.Parent = this; } PspDisplay.DrawEvent += PspDisplayTick; Console.WriteLine("[2]"); }