cleanup
This commit is contained in:
parent
47eeba5053
commit
67419c980a
|
@ -1,6 +1,4 @@
|
|||
using System.Windows.Forms;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
partial class LogWindow
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@ using BizHawk.Common;
|
|||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Client.EmuHawk.WinFormExtensions;
|
||||
|
||||
// todo - perks - pause, copy to clipboard, backlog length limiting
|
||||
|
||||
|
@ -20,6 +21,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
private readonly List<string> _lines = new List<string>();
|
||||
private LogStream _logStream;
|
||||
|
||||
[RequiredService]
|
||||
private IEmulator Emulator { get; set; }
|
||||
|
||||
public LogWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -139,7 +143,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void HideShowGameDbButton()
|
||||
{
|
||||
AddToGameDbBtn.Visible = Global.Emulator.CanGenerateGameDBEntries()
|
||||
AddToGameDbBtn.Visible = Emulator.CanGenerateGameDBEntries()
|
||||
&& (Global.Game.Status == RomStatus.Unknown || Global.Game.Status == RomStatus.NotInDatabase);
|
||||
}
|
||||
|
||||
|
@ -147,9 +151,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
using var picker = new RomStatusPicker();
|
||||
var result = picker.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
if (result.IsOk())
|
||||
{
|
||||
var gameDbEntry = Global.Emulator.AsGameDBEntryGenerator().GenerateGameDbEntry();
|
||||
var gameDbEntry = Emulator.AsGameDBEntryGenerator().GenerateGameDbEntry();
|
||||
var userDb = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "gamedb_user.txt");
|
||||
Global.Game.Status = gameDbEntry.Status = picker.PickedStatus;
|
||||
Database.SaveDatabaseEntry(userDb, gameDbEntry);
|
||||
|
|
Loading…
Reference in New Issue