Remove GlobalWin usage in BmpView, and also use appropriate suffixes in various screenshot saving methods in various graphics tools
This commit is contained in:
parent
707dae93a7
commit
2c7b2a530c
|
@ -96,10 +96,5 @@ namespace BizHawk.Client.EmuHawk
|
|||
Bmp.UnlockBits(lockBits);
|
||||
Refresh();
|
||||
}
|
||||
|
||||
public void SaveFile()
|
||||
{
|
||||
Bmp.SaveAsFile(GlobalWin.Game, "Palettes", GlobalWin.Emulator.SystemId, GlobalWin.Config.PathEntries, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
[RequiredService]
|
||||
public IGameboyCommon Gb { get; private set; }
|
||||
|
||||
[RequiredService]
|
||||
public IEmulator Emulator { get; set; }
|
||||
|
||||
// If we've connected the printer yet
|
||||
private bool _connected;
|
||||
|
||||
|
@ -183,7 +186,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
g.DrawImage(_printerHistory, Point.Empty);
|
||||
g.Flush();
|
||||
}
|
||||
toSave.SaveFile();
|
||||
|
||||
toSave.Bmp.SaveAsFile(Game, "Print", Emulator.SystemId, Config.PathEntries, this);
|
||||
}
|
||||
|
||||
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -16,6 +16,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
[RequiredService]
|
||||
public IPceGpuView Viewer { get; private set; }
|
||||
|
||||
[RequiredService]
|
||||
public IEmulator Emulator { get; set; }
|
||||
|
||||
private int _bgPalNum;
|
||||
private int _spPalNum;
|
||||
|
||||
|
@ -200,14 +203,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void SaveAsFile(Bitmap bmp, string suffix)
|
||||
{
|
||||
bmp.SaveAsFile(Game, suffix, Emulator.SystemId, Config.PathEntries, this);
|
||||
}
|
||||
|
||||
private void SaveBackgroundScreenshotMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
bmpViewBG.SaveFile();
|
||||
SaveAsFile(bmpViewBG.Bmp, "BG");
|
||||
}
|
||||
|
||||
private void SaveSpriteScreenshotMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
bmpViewSP.SaveFile();
|
||||
SaveAsFile(bmpViewBG.Bmp, "Sprites");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
[RequiredService]
|
||||
private ISmsGpuView Vdp { get; set; }
|
||||
|
||||
[RequiredService]
|
||||
private IEmulator Emulator { get; set; }
|
||||
|
||||
private int _palIndex;
|
||||
|
||||
protected override string WindowTitleStatic => "VDP Viewer";
|
||||
|
@ -192,19 +195,24 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void SaveAsFile(Bitmap bmp, string suffix)
|
||||
{
|
||||
bmp.SaveAsFile(Game, suffix, Emulator.SystemId, Config.PathEntries, this);
|
||||
}
|
||||
|
||||
private void saveTilesScreenshotToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
bmpViewTiles.SaveFile();
|
||||
SaveAsFile(bmpViewTiles.Bmp, "Tiles");
|
||||
}
|
||||
|
||||
private void SavePalettesScreenshotMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
bmpViewPalette.SaveFile();
|
||||
SaveAsFile(bmpViewPalette.Bmp, "Palette");
|
||||
}
|
||||
|
||||
private void SaveBgScreenshotMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
bmpViewBG.SaveFile();
|
||||
SaveAsFile(bmpViewBG.Bmp, "BG");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue