intelligent? window sizing

This commit is contained in:
beirich 2011-01-26 05:06:44 +00:00
parent c8650fd20b
commit d40b7706f8
5 changed files with 147 additions and 108 deletions

View File

@ -4,6 +4,7 @@
{
// General Client Settings
public bool SoundEnabled = true;
public int TargetZoomFactor = 2;
public string LastRomPath = ".";
public bool AutoLoadMostRecentRom = false; //TODO: eventually make a class or struct for all the auto-loads, which will include recent roms, movies, etc, as well as autoloading any modeless dialog
public RecentFiles RecentRoms = new RecentFiles(8);

View File

@ -49,6 +49,8 @@
this.savestate8toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.savestate9toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.savestate0toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.saveNamedStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadstate1toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadstate2toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -60,6 +62,8 @@
this.loadstate8toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadstate9toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadstate0toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.loadNamedStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveSlotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSlot10ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectSlot1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -105,10 +109,6 @@
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveNamedStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.loadNamedStateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
@ -123,7 +123,7 @@
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(932, 24);
this.menuStrip1.Size = new System.Drawing.Size(827, 24);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
@ -142,7 +142,7 @@
this.toolStripSeparator4,
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "&File";
this.fileToolStripMenuItem.DropDownOpened += new System.EventHandler(this.fileToolStripMenuItem_DropDownOpened);
//
@ -150,7 +150,7 @@
//
this.openROMToolStripMenuItem.Name = "openROMToolStripMenuItem";
this.openROMToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.openROMToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.openROMToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.openROMToolStripMenuItem.Text = "Open ROM";
this.openROMToolStripMenuItem.Click += new System.EventHandler(this.openROMToolStripMenuItem_Click);
//
@ -162,46 +162,46 @@
this.clearToolStripMenuItem,
this.autoloadMostRecentToolStripMenuItem});
this.recentROMToolStripMenuItem.Name = "recentROMToolStripMenuItem";
this.recentROMToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.recentROMToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.recentROMToolStripMenuItem.Text = "Recent ROM";
this.recentROMToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentROMToolStripMenuItem_DropDownOpened);
//
// noneToolStripMenuItem
//
this.noneToolStripMenuItem.Name = "noneToolStripMenuItem";
this.noneToolStripMenuItem.Size = new System.Drawing.Size(191, 22);
this.noneToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.noneToolStripMenuItem.Text = "None";
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(188, 6);
this.toolStripSeparator3.Size = new System.Drawing.Size(189, 6);
//
// clearToolStripMenuItem
//
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
this.clearToolStripMenuItem.Size = new System.Drawing.Size(191, 22);
this.clearToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.clearToolStripMenuItem.Text = "&Clear";
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
//
// autoloadMostRecentToolStripMenuItem
//
this.autoloadMostRecentToolStripMenuItem.Name = "autoloadMostRecentToolStripMenuItem";
this.autoloadMostRecentToolStripMenuItem.Size = new System.Drawing.Size(191, 22);
this.autoloadMostRecentToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.autoloadMostRecentToolStripMenuItem.Text = "&Autoload Most Recent";
this.autoloadMostRecentToolStripMenuItem.Click += new System.EventHandler(this.autoloadMostRecentToolStripMenuItem_Click);
//
// closeROMToolStripMenuItem
//
this.closeROMToolStripMenuItem.Name = "closeROMToolStripMenuItem";
this.closeROMToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.closeROMToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.closeROMToolStripMenuItem.Text = "&Close ROM";
this.closeROMToolStripMenuItem.Click += new System.EventHandler(this.closeROMToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(174, 6);
this.toolStripMenuItem1.Size = new System.Drawing.Size(173, 6);
//
// saveStateToolStripMenuItem
//
@ -219,14 +219,14 @@
this.toolStripSeparator6,
this.saveNamedStateToolStripMenuItem});
this.saveStateToolStripMenuItem.Name = "saveStateToolStripMenuItem";
this.saveStateToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.saveStateToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.saveStateToolStripMenuItem.Text = "Save State";
//
// savestate1toolStripMenuItem
//
this.savestate1toolStripMenuItem.Name = "savestate1toolStripMenuItem";
this.savestate1toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F1)));
this.savestate1toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate1toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate1toolStripMenuItem.Text = "1";
this.savestate1toolStripMenuItem.Click += new System.EventHandler(this.savestate1toolStripMenuItem_Click);
//
@ -234,7 +234,7 @@
//
this.savestate2toolStripMenuItem.Name = "savestate2toolStripMenuItem";
this.savestate2toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F2)));
this.savestate2toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate2toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate2toolStripMenuItem.Text = "2";
this.savestate2toolStripMenuItem.Click += new System.EventHandler(this.savestate2toolStripMenuItem_Click);
//
@ -242,7 +242,7 @@
//
this.savestate3toolStripMenuItem.Name = "savestate3toolStripMenuItem";
this.savestate3toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F3)));
this.savestate3toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate3toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate3toolStripMenuItem.Text = "3";
this.savestate3toolStripMenuItem.Click += new System.EventHandler(this.savestate3toolStripMenuItem_Click);
//
@ -250,7 +250,7 @@
//
this.savestate4toolStripMenuItem.Name = "savestate4toolStripMenuItem";
this.savestate4toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F4)));
this.savestate4toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate4toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate4toolStripMenuItem.Text = "4";
this.savestate4toolStripMenuItem.Click += new System.EventHandler(this.savestate4toolStripMenuItem_Click);
//
@ -258,7 +258,7 @@
//
this.savestate5toolStripMenuItem.Name = "savestate5toolStripMenuItem";
this.savestate5toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F5)));
this.savestate5toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate5toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate5toolStripMenuItem.Text = "5";
this.savestate5toolStripMenuItem.Click += new System.EventHandler(this.savestate5toolStripMenuItem_Click);
//
@ -266,7 +266,7 @@
//
this.savestate6toolStripMenuItem.Name = "savestate6toolStripMenuItem";
this.savestate6toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F6)));
this.savestate6toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate6toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate6toolStripMenuItem.Text = "6";
this.savestate6toolStripMenuItem.Click += new System.EventHandler(this.savestate6toolStripMenuItem_Click);
//
@ -274,7 +274,7 @@
//
this.savestate7toolStripMenuItem.Name = "savestate7toolStripMenuItem";
this.savestate7toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F7)));
this.savestate7toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate7toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate7toolStripMenuItem.Text = "7";
this.savestate7toolStripMenuItem.Click += new System.EventHandler(this.savestate7toolStripMenuItem_Click);
//
@ -282,7 +282,7 @@
//
this.savestate8toolStripMenuItem.Name = "savestate8toolStripMenuItem";
this.savestate8toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F8)));
this.savestate8toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate8toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate8toolStripMenuItem.Text = "8";
this.savestate8toolStripMenuItem.Click += new System.EventHandler(this.savestate8toolStripMenuItem_Click);
//
@ -290,7 +290,7 @@
//
this.savestate9toolStripMenuItem.Name = "savestate9toolStripMenuItem";
this.savestate9toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F9)));
this.savestate9toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate9toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate9toolStripMenuItem.Text = "9";
this.savestate9toolStripMenuItem.Click += new System.EventHandler(this.savestate9toolStripMenuItem_Click);
//
@ -298,10 +298,22 @@
//
this.savestate0toolStripMenuItem.Name = "savestate0toolStripMenuItem";
this.savestate0toolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F10)));
this.savestate0toolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.savestate0toolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.savestate0toolStripMenuItem.Text = "0";
this.savestate0toolStripMenuItem.Click += new System.EventHandler(this.savestate0toolStripMenuItem_Click);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(206, 6);
//
// saveNamedStateToolStripMenuItem
//
this.saveNamedStateToolStripMenuItem.Name = "saveNamedStateToolStripMenuItem";
this.saveNamedStateToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.saveNamedStateToolStripMenuItem.Size = new System.Drawing.Size(209, 22);
this.saveNamedStateToolStripMenuItem.Text = "Save Named State";
//
// loadStateToolStripMenuItem
//
this.loadStateToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -318,14 +330,14 @@
this.toolStripSeparator7,
this.loadNamedStateToolStripMenuItem});
this.loadStateToolStripMenuItem.Name = "loadStateToolStripMenuItem";
this.loadStateToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.loadStateToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.loadStateToolStripMenuItem.Text = "Load State";
//
// loadstate1toolStripMenuItem
//
this.loadstate1toolStripMenuItem.Name = "loadstate1toolStripMenuItem";
this.loadstate1toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.loadstate1toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate1toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate1toolStripMenuItem.Text = "1";
this.loadstate1toolStripMenuItem.Click += new System.EventHandler(this.loadstate1toolStripMenuItem_Click);
//
@ -333,7 +345,7 @@
//
this.loadstate2toolStripMenuItem.Name = "loadstate2toolStripMenuItem";
this.loadstate2toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F2;
this.loadstate2toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate2toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate2toolStripMenuItem.Text = "2";
this.loadstate2toolStripMenuItem.Click += new System.EventHandler(this.loadstate2toolStripMenuItem_Click);
//
@ -341,7 +353,7 @@
//
this.loadstate3toolStripMenuItem.Name = "loadstate3toolStripMenuItem";
this.loadstate3toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
this.loadstate3toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate3toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate3toolStripMenuItem.Text = "3";
this.loadstate3toolStripMenuItem.Click += new System.EventHandler(this.loadstate3toolStripMenuItem_Click);
//
@ -349,7 +361,7 @@
//
this.loadstate4toolStripMenuItem.Name = "loadstate4toolStripMenuItem";
this.loadstate4toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F4;
this.loadstate4toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate4toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate4toolStripMenuItem.Text = "4";
this.loadstate4toolStripMenuItem.Click += new System.EventHandler(this.loadstate4toolStripMenuItem_Click);
//
@ -357,7 +369,7 @@
//
this.loadstate5toolStripMenuItem.Name = "loadstate5toolStripMenuItem";
this.loadstate5toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
this.loadstate5toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate5toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate5toolStripMenuItem.Text = "5";
this.loadstate5toolStripMenuItem.Click += new System.EventHandler(this.loadstate5toolStripMenuItem_Click);
//
@ -365,7 +377,7 @@
//
this.loadstate6toolStripMenuItem.Name = "loadstate6toolStripMenuItem";
this.loadstate6toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F6;
this.loadstate6toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate6toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate6toolStripMenuItem.Text = "6";
this.loadstate6toolStripMenuItem.Click += new System.EventHandler(this.loadstate6toolStripMenuItem_Click);
//
@ -373,7 +385,7 @@
//
this.loadstate7toolStripMenuItem.Name = "loadstate7toolStripMenuItem";
this.loadstate7toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F7;
this.loadstate7toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate7toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate7toolStripMenuItem.Text = "7";
this.loadstate7toolStripMenuItem.Click += new System.EventHandler(this.loadstate7toolStripMenuItem_Click);
//
@ -381,7 +393,7 @@
//
this.loadstate8toolStripMenuItem.Name = "loadstate8toolStripMenuItem";
this.loadstate8toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F8;
this.loadstate8toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate8toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate8toolStripMenuItem.Text = "8";
this.loadstate8toolStripMenuItem.Click += new System.EventHandler(this.loadstate8toolStripMenuItem_Click);
//
@ -389,7 +401,7 @@
//
this.loadstate9toolStripMenuItem.Name = "loadstate9toolStripMenuItem";
this.loadstate9toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F9;
this.loadstate9toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate9toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate9toolStripMenuItem.Text = "9";
this.loadstate9toolStripMenuItem.Click += new System.EventHandler(this.loadstate9toolStripMenuItem_Click);
//
@ -397,10 +409,22 @@
//
this.loadstate0toolStripMenuItem.Name = "loadstate0toolStripMenuItem";
this.loadstate0toolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F10;
this.loadstate0toolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadstate0toolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadstate0toolStripMenuItem.Text = "0";
this.loadstate0toolStripMenuItem.Click += new System.EventHandler(this.loadstate0toolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(208, 6);
//
// loadNamedStateToolStripMenuItem
//
this.loadNamedStateToolStripMenuItem.Name = "loadNamedStateToolStripMenuItem";
this.loadNamedStateToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.L)));
this.loadNamedStateToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
this.loadNamedStateToolStripMenuItem.Text = "Load Named State";
//
// saveSlotToolStripMenuItem
//
this.saveSlotToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -420,135 +444,135 @@
this.saveToCurrentSlotToolStripMenuItem,
this.loadCurrentSlotToolStripMenuItem});
this.saveSlotToolStripMenuItem.Name = "saveSlotToolStripMenuItem";
this.saveSlotToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.saveSlotToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.saveSlotToolStripMenuItem.Text = "SaveSlot";
//
// selectSlot10ToolStripMenuItem
//
this.selectSlot10ToolStripMenuItem.Name = "selectSlot10ToolStripMenuItem";
this.selectSlot10ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot10ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot10ToolStripMenuItem.Text = "Select Slot 0";
this.selectSlot10ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot10ToolStripMenuItem_Click);
//
// selectSlot1ToolStripMenuItem
//
this.selectSlot1ToolStripMenuItem.Name = "selectSlot1ToolStripMenuItem";
this.selectSlot1ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot1ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot1ToolStripMenuItem.Text = "Select Slot 1";
this.selectSlot1ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot1ToolStripMenuItem_Click);
//
// selectSlot2ToolStripMenuItem
//
this.selectSlot2ToolStripMenuItem.Name = "selectSlot2ToolStripMenuItem";
this.selectSlot2ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot2ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot2ToolStripMenuItem.Text = "Select Slot 2";
this.selectSlot2ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot2ToolStripMenuItem_Click);
//
// selectSlot3ToolStripMenuItem
//
this.selectSlot3ToolStripMenuItem.Name = "selectSlot3ToolStripMenuItem";
this.selectSlot3ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot3ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot3ToolStripMenuItem.Text = "Select Slot 3";
this.selectSlot3ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot3ToolStripMenuItem_Click);
//
// selectSlot4ToolStripMenuItem
//
this.selectSlot4ToolStripMenuItem.Name = "selectSlot4ToolStripMenuItem";
this.selectSlot4ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot4ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot4ToolStripMenuItem.Text = "Select Slot 4";
this.selectSlot4ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot4ToolStripMenuItem_Click);
//
// selectSlot5ToolStripMenuItem
//
this.selectSlot5ToolStripMenuItem.Name = "selectSlot5ToolStripMenuItem";
this.selectSlot5ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot5ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot5ToolStripMenuItem.Text = "Select Slot 5";
this.selectSlot5ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot5ToolStripMenuItem_Click);
//
// selectSlot6ToolStripMenuItem
//
this.selectSlot6ToolStripMenuItem.Name = "selectSlot6ToolStripMenuItem";
this.selectSlot6ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot6ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot6ToolStripMenuItem.Text = "Select Slot 6";
this.selectSlot6ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot6ToolStripMenuItem_Click);
//
// selectSlot7ToolStripMenuItem
//
this.selectSlot7ToolStripMenuItem.Name = "selectSlot7ToolStripMenuItem";
this.selectSlot7ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot7ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot7ToolStripMenuItem.Text = "Select Slot 7";
this.selectSlot7ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot7ToolStripMenuItem_Click);
//
// selectSlot8ToolStripMenuItem
//
this.selectSlot8ToolStripMenuItem.Name = "selectSlot8ToolStripMenuItem";
this.selectSlot8ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot8ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot8ToolStripMenuItem.Text = "Select Slot 8";
this.selectSlot8ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot8ToolStripMenuItem_Click);
//
// selectSlot9ToolStripMenuItem
//
this.selectSlot9ToolStripMenuItem.Name = "selectSlot9ToolStripMenuItem";
this.selectSlot9ToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.selectSlot9ToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.selectSlot9ToolStripMenuItem.Text = "Select Slot 9";
this.selectSlot9ToolStripMenuItem.Click += new System.EventHandler(this.selectSlot9ToolStripMenuItem_Click);
//
// previousSlotToolStripMenuItem
//
this.previousSlotToolStripMenuItem.Name = "previousSlotToolStripMenuItem";
this.previousSlotToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.previousSlotToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.previousSlotToolStripMenuItem.Text = "Previous Slot";
this.previousSlotToolStripMenuItem.Click += new System.EventHandler(this.previousSlotToolStripMenuItem_Click);
//
// nextSlotToolStripMenuItem
//
this.nextSlotToolStripMenuItem.Name = "nextSlotToolStripMenuItem";
this.nextSlotToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.nextSlotToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.nextSlotToolStripMenuItem.Text = "Next Slot";
this.nextSlotToolStripMenuItem.Click += new System.EventHandler(this.nextSlotToolStripMenuItem_Click);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(180, 6);
this.toolStripSeparator5.Size = new System.Drawing.Size(175, 6);
//
// saveToCurrentSlotToolStripMenuItem
//
this.saveToCurrentSlotToolStripMenuItem.Name = "saveToCurrentSlotToolStripMenuItem";
this.saveToCurrentSlotToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.saveToCurrentSlotToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.saveToCurrentSlotToolStripMenuItem.Text = "Save to Current Slot";
this.saveToCurrentSlotToolStripMenuItem.Click += new System.EventHandler(this.saveToCurrentSlotToolStripMenuItem_Click);
//
// loadCurrentSlotToolStripMenuItem
//
this.loadCurrentSlotToolStripMenuItem.Name = "loadCurrentSlotToolStripMenuItem";
this.loadCurrentSlotToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
this.loadCurrentSlotToolStripMenuItem.Size = new System.Drawing.Size(178, 22);
this.loadCurrentSlotToolStripMenuItem.Text = "Load Current Slot";
this.loadCurrentSlotToolStripMenuItem.Click += new System.EventHandler(this.loadCurrentSlotToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(174, 6);
this.toolStripMenuItem2.Size = new System.Drawing.Size(173, 6);
//
// screenshotF12ToolStripMenuItem
//
this.screenshotF12ToolStripMenuItem.Name = "screenshotF12ToolStripMenuItem";
this.screenshotF12ToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F12;
this.screenshotF12ToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.screenshotF12ToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.screenshotF12ToolStripMenuItem.Text = "Screenshot";
this.screenshotF12ToolStripMenuItem.Click += new System.EventHandler(this.screenshotF12ToolStripMenuItem_Click);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(174, 6);
this.toolStripSeparator4.Size = new System.Drawing.Size(173, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.exitToolStripMenuItem.Size = new System.Drawing.Size(177, 22);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(176, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@ -560,33 +584,33 @@
this.powerToolStripMenuItem,
this.resetToolStripMenuItem});
this.emulationToolStripMenuItem.Name = "emulationToolStripMenuItem";
this.emulationToolStripMenuItem.Size = new System.Drawing.Size(65, 20);
this.emulationToolStripMenuItem.Size = new System.Drawing.Size(73, 20);
this.emulationToolStripMenuItem.Text = "&Emulation";
this.emulationToolStripMenuItem.DropDownOpened += new System.EventHandler(this.emulationToolStripMenuItem_DropDownOpened);
//
// pauseToolStripMenuItem
//
this.pauseToolStripMenuItem.Name = "pauseToolStripMenuItem";
this.pauseToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.pauseToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.pauseToolStripMenuItem.Text = "&Pause";
this.pauseToolStripMenuItem.Click += new System.EventHandler(this.pauseToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(141, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(136, 6);
//
// powerToolStripMenuItem
//
this.powerToolStripMenuItem.Name = "powerToolStripMenuItem";
this.powerToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.powerToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.powerToolStripMenuItem.Text = "Power Cycle";
this.powerToolStripMenuItem.Click += new System.EventHandler(this.powerToolStripMenuItem_Click);
//
// resetToolStripMenuItem
//
this.resetToolStripMenuItem.Name = "resetToolStripMenuItem";
this.resetToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.resetToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.resetToolStripMenuItem.Text = "&Reset";
this.resetToolStripMenuItem.Click += new System.EventHandler(this.resetToolStripMenuItem_Click);
//
@ -601,7 +625,7 @@
this.displayInputToolStripMenuItem,
this.displayLagCounterToolStripMenuItem});
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(41, 20);
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.viewToolStripMenuItem.Text = "&View";
//
// xToolStripMenuItem
@ -661,14 +685,14 @@
this.controllersToolStripMenuItem,
this.hotkeysToolStripMenuItem});
this.configToolStripMenuItem.Name = "configToolStripMenuItem";
this.configToolStripMenuItem.Size = new System.Drawing.Size(50, 20);
this.configToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
this.configToolStripMenuItem.Text = "&Config";
//
// controllersToolStripMenuItem
//
this.controllersToolStripMenuItem.Enabled = false;
this.controllersToolStripMenuItem.Name = "controllersToolStripMenuItem";
this.controllersToolStripMenuItem.Size = new System.Drawing.Size(137, 22);
this.controllersToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
this.controllersToolStripMenuItem.Text = "&Controllers";
this.controllersToolStripMenuItem.Click += new System.EventHandler(this.controllersToolStripMenuItem_Click);
//
@ -676,7 +700,7 @@
//
this.hotkeysToolStripMenuItem.Enabled = false;
this.hotkeysToolStripMenuItem.Name = "hotkeysToolStripMenuItem";
this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(137, 22);
this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
this.hotkeysToolStripMenuItem.Text = "&Hotkeys";
this.hotkeysToolStripMenuItem.Click += new System.EventHandler(this.hotkeysToolStripMenuItem_Click);
//
@ -689,20 +713,20 @@
this.hexEditorToolStripMenuItem,
this.luaConsoleToolStripMenuItem});
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20);
this.toolsToolStripMenuItem.Text = "&Tools";
//
// rAMWatchToolStripMenuItem
//
this.rAMWatchToolStripMenuItem.Name = "rAMWatchToolStripMenuItem";
this.rAMWatchToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.rAMWatchToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.rAMWatchToolStripMenuItem.Text = "RAM &Watch";
this.rAMWatchToolStripMenuItem.Click += new System.EventHandler(this.RAMWatchToolStripMenuItem_Click);
//
// rAMSearchToolStripMenuItem
//
this.rAMSearchToolStripMenuItem.Name = "rAMSearchToolStripMenuItem";
this.rAMSearchToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.rAMSearchToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.rAMSearchToolStripMenuItem.Text = "RAM &Search";
this.rAMSearchToolStripMenuItem.Click += new System.EventHandler(this.rAMSearchToolStripMenuItem_Click);
//
@ -710,21 +734,21 @@
//
this.debuggerToolStripMenuItem.Enabled = false;
this.debuggerToolStripMenuItem.Name = "debuggerToolStripMenuItem";
this.debuggerToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.debuggerToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.debuggerToolStripMenuItem.Text = "&Debugger";
//
// hexEditorToolStripMenuItem
//
this.hexEditorToolStripMenuItem.Enabled = false;
this.hexEditorToolStripMenuItem.Name = "hexEditorToolStripMenuItem";
this.hexEditorToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.hexEditorToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.hexEditorToolStripMenuItem.Text = "&Hex Editor";
//
// luaConsoleToolStripMenuItem
//
this.luaConsoleToolStripMenuItem.Enabled = false;
this.luaConsoleToolStripMenuItem.Name = "luaConsoleToolStripMenuItem";
this.luaConsoleToolStripMenuItem.Size = new System.Drawing.Size(143, 22);
this.luaConsoleToolStripMenuItem.Size = new System.Drawing.Size(139, 22);
this.luaConsoleToolStripMenuItem.Text = "Lua Console";
//
// helpToolStripMenuItem
@ -733,14 +757,14 @@
this.helpToolStripMenuItem1,
this.aboutToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.helpToolStripMenuItem.Text = "&Help";
//
// helpToolStripMenuItem1
//
this.helpToolStripMenuItem1.Enabled = false;
this.helpToolStripMenuItem1.Name = "helpToolStripMenuItem1";
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(114, 22);
this.helpToolStripMenuItem1.Size = new System.Drawing.Size(107, 22);
this.helpToolStripMenuItem1.Text = "&Help";
this.helpToolStripMenuItem1.Click += new System.EventHandler(this.helpToolStripMenuItem1_Click);
//
@ -748,41 +772,19 @@
//
this.aboutToolStripMenuItem.Enabled = false;
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
this.aboutToolStripMenuItem.Text = "&About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
// saveNamedStateToolStripMenuItem
//
this.saveNamedStateToolStripMenuItem.Name = "saveNamedStateToolStripMenuItem";
this.saveNamedStateToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.saveNamedStateToolStripMenuItem.Size = new System.Drawing.Size(212, 22);
this.saveNamedStateToolStripMenuItem.Text = "Save Named State";
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(209, 6);
//
// loadNamedStateToolStripMenuItem
//
this.loadNamedStateToolStripMenuItem.Name = "loadNamedStateToolStripMenuItem";
this.loadNamedStateToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.L)));
this.loadNamedStateToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.loadNamedStateToolStripMenuItem.Text = "Load Named State";
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(207, 6);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(932, 561);
this.ClientSize = new System.Drawing.Size(827, 561);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MainMenuStrip = this.menuStrip1;
this.MaximizeBox = false;
this.Name = "MainForm";
this.Text = "BizHawk";
this.Load += new System.EventHandler(this.MainForm_Load);

View File

@ -355,7 +355,7 @@ namespace BizHawk.MultiClient
Global.ClientControls.UnpressButton("Frame Advance");
}
Global.Sound.UpdateSound(Global.Emulator.SoundProvider);
Global.RenderPanel.Render(Global.Emulator.VideoProvider);
Render();
//RamWatch1.UpdateValues(); //TODO: Create framecounter object, run this in the SetFrameCount() method of this object
}
@ -823,17 +823,53 @@ namespace BizHawk.MultiClient
RamSearch1.Show();
}
public void SignalFrameBufferResized()
private int lastWidth = -1;
private int lastHeight = -1;
private void Render()
{
var video = Global.Emulator.VideoProvider;
if (video.BufferHeight != lastHeight || video.BufferWidth != lastWidth)
{
lastWidth = video.BufferWidth;
lastHeight = video.BufferHeight;
FrameBufferResized();
Global.RenderPanel.Resized = true;
}
int targetZoom = 3;
Global.RenderPanel.Render(Global.Emulator.VideoProvider);
}
int borderWidth = this.Size.Width - renderTarget.Size.Width;
int borderHeight = this.Size.Height - renderTarget.Size.Height;
private void FrameBufferResized()
{
var video = Global.Emulator.VideoProvider;
int zoom = Global.Config.TargetZoomFactor;
var area = Screen.FromControl(this).WorkingArea;
ClientSize = new Size((video.BufferWidth*targetZoom) + borderWidth, (video.BufferHeight*targetZoom + borderHeight));
this.Invalidate();
int borderWidth = Size.Width - renderTarget.Size.Width;
int borderHeight = Size.Height - renderTarget.Size.Height;
// start at target zoom and work way down until we find acceptable zoom
for (; zoom >= 1; zoom--)
{
if ((((video.BufferWidth * zoom) + borderWidth) < area.Width) && (((video.BufferHeight * zoom) + borderHeight) < area.Height))
break;
}
// Change size
Size = new Size((video.BufferWidth*zoom) + borderWidth, (video.BufferHeight*zoom + borderHeight));
PerformLayout();
// Is window off the screen at this size?
if (area.Contains(Bounds) == false)
{
if (Bounds.Right > area.Right) // Window is off the right edge
Location = new Point(area.Right - Size.Width, Location.Y);
if (Bounds.Bottom > area.Bottom) // Window is off the bottom edge
Location = new Point(Location.X, area.Bottom - Size.Height);
}
}
}
}

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3615
// Runtime Version:2.0.50727.4952
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

View File

@ -162,7 +162,7 @@ namespace BizHawk.MultiClient
Global.Emulator.FrameAdvance(true);
Global.Sound.UpdateSound(Global.Emulator.SoundProvider);
Global.RenderPanel.Render(Global.Emulator.VideoProvider);
Render();
}
public void ResetRewindBuffer()