private void ApplyRom() { if (listView1.SelectedItems.Count > 0) { this.Close(); Mame.exit_pending = true; Thread.Sleep(100); RomInfo.Rom = RomInfo.GetRomByName(listView1.SelectedItems[0].SubItems[2].Text); this._myParentForm.LoadRom(); if (Machine.bRom) { m68000Form.iStatus = 0; m68000Form.iRAddress = 0; m68000Form.iROp = 0; m68000Form.iValue = 0; z80Form.iStatus = 0; Mame.exit_pending = false; this._myParentForm.resetToolStripMenuItem.Enabled = true; this._myParentForm.gameStripMenuItem.Enabled = true; UI.ui_init(this._myParentForm); mainForm.t1 = new Thread(Mame.mame_execute); mainForm.t1.Start(); } } }