UI: Fixed warnings found by xbuild 14.0

This commit is contained in:
Sour 2018-06-11 19:27:35 -04:00
parent ebd6ff72ba
commit 718b671730
30 changed files with 5 additions and 53 deletions

View file

@ -52,7 +52,7 @@ namespace Mesen.GUI.Config
private static DebugWorkspace Deserialize(string path) private static DebugWorkspace Deserialize(string path)
{ {
DebugWorkspace config = config = new DebugWorkspace(); DebugWorkspace config = new DebugWorkspace();
if(File.Exists(path)) { if(File.Exists(path)) {
try { try {

View file

@ -80,7 +80,6 @@ namespace Mesen.GUI.Controls
var item = this.Items[e.Item]; var item = this.Items[e.Item];
AfterEdit?.Invoke(this, new LabelEditEventArgs(item.Index, text)); AfterEdit?.Invoke(this, new LabelEditEventArgs(item.Index, text));
} else if(_pressedEsc) { } else if(_pressedEsc) {
string text = _originalText;
var originalItem = this.Items[e.Item]; var originalItem = this.Items[e.Item];
var newItem = new ListViewItem(_originalText); var newItem = new ListViewItem(_originalText);
newItem.SubItems.Add(originalItem.SubItems[1].Text); newItem.SubItems.Add(originalItem.SubItems[1].Text);

View file

@ -30,7 +30,6 @@
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.ctrlDataViewer = new Mesen.GUI.Debugger.ctrlScrollableTextbox(); this.ctrlDataViewer = new Mesen.GUI.Debugger.ctrlScrollableTextbox();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -75,6 +74,5 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private ctrlScrollableTextbox ctrlDataViewer; private ctrlScrollableTextbox ctrlDataViewer;
private System.Windows.Forms.ToolTip toolTip;
} }
} }

View file

@ -420,7 +420,6 @@ namespace Mesen.GUI.Debugger.Controls
private void ctxMenu_Opening(object sender, CancelEventArgs e) private void ctxMenu_Opening(object sender, CancelEventArgs e)
{ {
int baseAddress = _bottomBank ? 0x1000 : 0x0000; int baseAddress = _bottomBank ? 0x1000 : 0x0000;
bool ppuMemory = this.cboChrSelection.SelectedIndex == 0;
if(this.cboChrSelection.SelectedIndex > 1) { if(this.cboChrSelection.SelectedIndex > 1) {
baseAddress += (this.cboChrSelection.SelectedIndex - 1) * 0x2000; baseAddress += (this.cboChrSelection.SelectedIndex - 1) * 0x2000;
} }

View file

@ -35,8 +35,6 @@ namespace Mesen.GUI.Debugger
public void InitializeGrid() public void InitializeGrid()
{ {
HashSet<string> keyCombinations = new HashSet<string>();
gridShortcuts.Rows.Clear(); gridShortcuts.Rows.Clear();
foreach(FieldInfo shortcut in _shortcuts) { foreach(FieldInfo shortcut in _shortcuts) {

View file

@ -28,7 +28,6 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.ctrlCodeViewer = new Mesen.GUI.Debugger.ctrlScrollableTextbox(); this.ctrlCodeViewer = new Mesen.GUI.Debugger.ctrlScrollableTextbox();
this.contextMenuMargin = new System.Windows.Forms.ContextMenuStrip(this.components); this.contextMenuMargin = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnuEditBreakpoint = new System.Windows.Forms.ToolStripMenuItem(); this.mnuEditBreakpoint = new System.Windows.Forms.ToolStripMenuItem();
@ -151,7 +150,6 @@
#endregion #endregion
private System.Windows.Forms.ToolTip toolTip;
private Mesen.GUI.Debugger.ctrlScrollableTextbox ctrlCodeViewer; private Mesen.GUI.Debugger.ctrlScrollableTextbox ctrlCodeViewer;
private System.Windows.Forms.ContextMenuStrip contextMenuMargin; private System.Windows.Forms.ContextMenuStrip contextMenuMargin;
private System.Windows.Forms.ToolStripMenuItem mnuRemoveBreakpoint; private System.Windows.Forms.ToolStripMenuItem mnuRemoveBreakpoint;

View file

@ -36,7 +36,6 @@ namespace Mesen.GUI.Debugger
private UInt32? _currentActiveAddress { get; set; } = null; private UInt32? _currentActiveAddress { get; set; } = null;
private Point _previousLocation;
private DebugViewInfo _config; private DebugViewInfo _config;
private CodeTooltipManager _tooltipManager = null; private CodeTooltipManager _tooltipManager = null;
private CodeViewerActions _codeViewerActions; private CodeViewerActions _codeViewerActions;
@ -365,7 +364,6 @@ namespace Mesen.GUI.Debugger
this.ctrlCodeViewer.ContextMenuStrip = _codeViewerActions.contextMenu; this.ctrlCodeViewer.ContextMenuStrip = _codeViewerActions.contextMenu;
} }
_previousLocation = e.Location;
_tooltipManager.ProcessMouseMove(e.Location); _tooltipManager.ProcessMouseMove(e.Location);
} }

View file

@ -183,7 +183,6 @@ namespace Mesen.GUI.Debugger.Controls
private void mnuAddBreakpoint_Click(object sender, EventArgs e) private void mnuAddBreakpoint_Click(object sender, EventArgs e)
{ {
if(lstFunctions.SelectedIndices.Count > 0) { if(lstFunctions.SelectedIndices.Count > 0) {
CodeLabel label = GetSelectedItem().Tag as CodeLabel;
int absoluteAddress = (int)GetSelectedItem().SubItems[2].Tag; int absoluteAddress = (int)GetSelectedItem().SubItems[2].Tag;
BreakpointManager.AddBreakpoint(new Breakpoint() { BreakpointManager.AddBreakpoint(new Breakpoint() {
MemoryType = DebugMemoryType.PrgRom, MemoryType = DebugMemoryType.PrgRom,

View file

@ -43,7 +43,6 @@
this.chkTextSearch = new System.Windows.Forms.CheckBox(); this.chkTextSearch = new System.Windows.Forms.CheckBox();
this.chkMatchCase = new System.Windows.Forms.CheckBox(); this.chkMatchCase = new System.Windows.Forms.CheckBox();
this.ctrlHexBox = new Be.Windows.Forms.HexBox(); this.ctrlHexBox = new Be.Windows.Forms.HexBox();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.statusStrip = new System.Windows.Forms.StatusStrip(); this.statusStrip = new System.Windows.Forms.StatusStrip();
this.lblLocation = new System.Windows.Forms.ToolStripStatusLabel(); this.lblLocation = new System.Windows.Forms.ToolStripStatusLabel();
this.ctxMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.ctxMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
@ -495,7 +494,6 @@
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label lblNumberOfColumns; private System.Windows.Forms.Label lblNumberOfColumns;
private System.Windows.Forms.ComboBox cboNumberColumns; private System.Windows.Forms.ComboBox cboNumberColumns;
private System.Windows.Forms.ToolTip toolTip;
private Be.Windows.Forms.HexBox ctrlHexBox; private Be.Windows.Forms.HexBox ctrlHexBox;
private System.Windows.Forms.Panel panelSearch; private System.Windows.Forms.Panel panelSearch;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;

View file

@ -118,8 +118,6 @@ namespace Mesen.GUI.Debugger.Controls
float pixelsPerByte = (float)rect.Width / totalSize; float pixelsPerByte = (float)rect.Width / totalSize;
StringFormat verticalFormat = new StringFormat(StringFormatFlags.DirectionVertical);
float currentPosition = 1; float currentPosition = 1;
int byteOffset = 0; int byteOffset = 0;
foreach(MemoryRegionInfo region in _regions) { foreach(MemoryRegionInfo region in _regions) {

View file

@ -422,7 +422,6 @@ namespace Mesen.GUI.Debugger.Controls
class ScrollbarColorProvider : IScrollbarColorProvider class ScrollbarColorProvider : IScrollbarColorProvider
{ {
private Color _nesRamColor = Color.FromArgb(163, 222, 171);
private Dictionary<int, Color> _breakpointColors = new Dictionary<int, Color>(); private Dictionary<int, Color> _breakpointColors = new Dictionary<int, Color>();
private ctrlSourceViewer _viewer; private ctrlSourceViewer _viewer;

View file

@ -260,8 +260,6 @@ namespace Mesen.GUI.Debugger.Controls
_selectedSprite = -1; _selectedSprite = -1;
for(int i = 0x100 - 4; i >= 0; i-=4) { for(int i = 0x100 - 4; i >= 0; i-=4) {
int spriteY = _spriteRam[i]; int spriteY = _spriteRam[i];
int tileIndex = _spriteRam[i + 1];
int attributes = _spriteRam[i + 2];
int spriteX = _spriteRam[i + 3]; int spriteX = _spriteRam[i + 3];
if(xPos >= spriteX && xPos < spriteX + 8 && yPos >= spriteY && yPos < spriteY + (_largeSprites ? 16 : 8)) { if(xPos >= spriteX && xPos < spriteX + 8 && yPos >= spriteY && yPos < spriteY + (_largeSprites ? 16 : 8)) {

View file

@ -58,7 +58,6 @@ namespace Mesen.GUI.Debugger
private string[] _contentNotes = new string[0]; private string[] _contentNotes = new string[0];
private string[] _compareContents = null; private string[] _compareContents = null;
private int[] _lineNumbers = new int[0]; private int[] _lineNumbers = new int[0];
private int[] _lineMargins = new int[0];
private string[] _lineNumberNotes = new string[0]; private string[] _lineNumberNotes = new string[0];
private Dictionary<int, int> _lineNumberIndex = new Dictionary<int,int>(); private Dictionary<int, int> _lineNumberIndex = new Dictionary<int,int>();
private bool _showLineNumbers = false; private bool _showLineNumbers = false;
@ -889,7 +888,6 @@ namespace Mesen.GUI.Debugger
codeString = "--------" + codeString.Substring(2, codeString.Length - 4) + "--------"; codeString = "--------" + codeString.Substring(2, codeString.Length - 4) + "--------";
} }
string commentString = Comments?[i].Trim() ?? "";
int padding = Math.Max(CommentSpacingCharCount, codeString.Length); int padding = Math.Max(CommentSpacingCharCount, codeString.Length);
if(codeString.Length == 0) { if(codeString.Length == 0) {
padding = 0; padding = 0;

View file

@ -4831,7 +4831,6 @@ namespace FastColoredTextBoxNS
e.Graphics.FillRectangle(paddingBrush, LeftIndent - HorizontalScroll.Value - 2, 0, e.Graphics.FillRectangle(paddingBrush, LeftIndent - HorizontalScroll.Value - 2, 0,
Math.Max(0, Paddings.Left - 1), ClientSize.Height); Math.Max(0, Paddings.Left - 1), ClientSize.Height);
// //
int leftTextIndent = Math.Max(LeftIndent, LeftIndent + Paddings.Left - HorizontalScroll.Value);
int textWidth = textAreaRect.Width; int textWidth = textAreaRect.Width;
//draw indent area //draw indent area
e.Graphics.FillRectangle(indentBrush, 0, 0, LeftIndentLine, ClientSize.Height); e.Graphics.FillRectangle(indentBrush, 0, 0, LeftIndentLine, ClientSize.Height);
@ -5083,7 +5082,6 @@ namespace FastColoredTextBoxNS
var state = graphics.Save(); var state = graphics.Save();
graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.TranslateTransform(rect.Left + h/2, rect.Top + h/2); graphics.TranslateTransform(rect.Left + h/2, rect.Top + h/2);
var ts = new TimeSpan(DateTime.Now.Ticks);
graphics.RotateTransform(180 * (DateTime.Now.Millisecond/1000f)); graphics.RotateTransform(180 * (DateTime.Now.Millisecond/1000f));
using (var pen = new Pen(Color.Red, 2)) using (var pen = new Pen(Color.Red, 2))
{ {
@ -6770,7 +6768,6 @@ namespace FastColoredTextBoxNS
/// </summary> /// </summary>
public virtual void InsertLinePrefix(string prefix) public virtual void InsertLinePrefix(string prefix)
{ {
Range old = Selection.Clone();
int from = Math.Min(Selection.Start.iLine, Selection.End.iLine); int from = Math.Min(Selection.Start.iLine, Selection.End.iLine);
int to = Math.Max(Selection.Start.iLine, Selection.End.iLine); int to = Math.Max(Selection.Start.iLine, Selection.End.iLine);
BeginUpdate(); BeginUpdate();
@ -6798,7 +6795,6 @@ namespace FastColoredTextBoxNS
/// </summary> /// </summary>
public virtual void RemoveLinePrefix(string prefix) public virtual void RemoveLinePrefix(string prefix)
{ {
Range old = Selection.Clone();
int from = Math.Min(Selection.Start.iLine, Selection.End.iLine); int from = Math.Min(Selection.Start.iLine, Selection.End.iLine);
int to = Math.Max(Selection.Start.iLine, Selection.End.iLine); int to = Math.Max(Selection.Start.iLine, Selection.End.iLine);
BeginUpdate(); BeginUpdate();

View file

@ -54,7 +54,6 @@ namespace FastColoredTextBoxNS
private void UnloadUnusedLines() private void UnloadUnusedLines()
{ {
const int margin = 2000; const int margin = 2000;
var iStartVisibleLine = CurrentTB.VisibleRange.Start.iLine;
var iFinishVisibleLine = CurrentTB.VisibleRange.End.iLine; var iFinishVisibleLine = CurrentTB.VisibleRange.End.iLine;
int count = 0; int count = 0;

View file

@ -30,13 +30,11 @@ namespace FastColoredTextBoxNS
class FCTBTypeDescriptor : CustomTypeDescriptor class FCTBTypeDescriptor : CustomTypeDescriptor
{ {
ICustomTypeDescriptor parent;
object instance; object instance;
public FCTBTypeDescriptor(ICustomTypeDescriptor parent, object instance) public FCTBTypeDescriptor(ICustomTypeDescriptor parent, object instance)
: base(parent) : base(parent)
{ {
this.parent = parent;
this.instance = instance; this.instance = instance;
} }

View file

@ -1885,7 +1885,6 @@ namespace Be.Windows.Forms
float x = ((float)(p.X - _recHex.X) / _charSize.Width); float x = ((float)(p.X - _recHex.X) / _charSize.Width);
float y = ((float)(p.Y - _recHex.Y) / _charSize.Height); float y = ((float)(p.Y - _recHex.Y) / _charSize.Height);
int iX = (int)x;
int iY = (int)y; int iY = (int)y;
//Offset by half a character to make the selection more intuitive (e.g half the white space belongs to the left byte, the other to the right) //Offset by half a character to make the selection more intuitive (e.g half the white space belongs to the left byte, the other to the right)
@ -2554,9 +2553,6 @@ namespace Be.Windows.Forms
int counter = -1; int counter = -1;
long intern_endByte = Math.Min(_byteProvider.Length - 1, endByte + _iHexMaxHBytes); long intern_endByte = Math.Min(_byteProvider.Length - 1, endByte + _iHexMaxHBytes);
bool isKeyInterpreterActive = _keyInterpreter == null || _keyInterpreter.GetType() == typeof(KeyInterpreter);
bool isStringKeyInterpreterActive = _keyInterpreter != null && _keyInterpreter.GetType() == typeof(StringKeyInterpreter);
int yPrevious = -1; int yPrevious = -1;
float xOffset = 0; float xOffset = 0;
Color defaultForeColor = this.ForeColor; Color defaultForeColor = this.ForeColor;

View file

@ -40,7 +40,6 @@ namespace Mesen.GUI.Debugger
if(data[0].Length % 2 == 0 && Regex.IsMatch(data[0], "[0-9A-Fa-f]+")) { if(data[0].Length % 2 == 0 && Regex.IsMatch(data[0], "[0-9A-Fa-f]+")) {
TblKey key = new TblKey(); TblKey key = new TblKey();
List<byte> bytes = new List<byte>();
for(int j = 0; j < data[0].Length; j+=2) { for(int j = 0; j < data[0].Length; j+=2) {
byte result = byte.Parse(data[0].Substring(j, 2), System.Globalization.NumberStyles.HexNumber); byte result = byte.Parse(data[0].Substring(j, 2), System.Globalization.NumberStyles.HexNumber);
key.Key |= (UInt64)result << (8 * j / 2); key.Key |= (UInt64)result << (8 * j / 2);

View file

@ -393,7 +393,7 @@ namespace Mesen.GUI.Debugger
private void UpdateWorkspace() private void UpdateWorkspace()
{ {
DebugWorkspaceManager.SaveWorkspace(); DebugWorkspaceManager.SaveWorkspace();
DebugWorkspace workspace = DebugWorkspaceManager.GetWorkspace(); DebugWorkspaceManager.GetWorkspace();
ctrlLabelList.UpdateLabelList(); ctrlLabelList.UpdateLabelList();
ctrlFunctionList.UpdateFunctionList(true); ctrlFunctionList.UpdateFunctionList(true);

View file

@ -16,14 +16,12 @@ namespace Mesen.GUI.Debugger
{ {
private DateTime _lastUpdate = DateTime.MinValue; private DateTime _lastUpdate = DateTime.MinValue;
private InteropEmu.NotificationListener _notifListener; private InteropEmu.NotificationListener _notifListener;
private TabPage _selectedTab;
private bool _refreshing = false; private bool _refreshing = false;
public frmEventViewer() public frmEventViewer()
{ {
InitializeComponent(); InitializeComponent();
this._selectedTab = this.tpgPpuView;
this.mnuRefreshOnBreak.Checked = ConfigManager.Config.DebugInfo.EventViewerRefreshOnBreak; this.mnuRefreshOnBreak.Checked = ConfigManager.Config.DebugInfo.EventViewerRefreshOnBreak;
this.chkShowPpuRegisterWrites.Checked = ConfigManager.Config.DebugInfo.EventViewerShowPpuRegisterWrites; this.chkShowPpuRegisterWrites.Checked = ConfigManager.Config.DebugInfo.EventViewerShowPpuRegisterWrites;
this.chkShowPpuRegisterReads.Checked = ConfigManager.Config.DebugInfo.EventViewerShowPpuRegisterReads; this.chkShowPpuRegisterReads.Checked = ConfigManager.Config.DebugInfo.EventViewerShowPpuRegisterReads;
@ -105,7 +103,6 @@ namespace Mesen.GUI.Debugger
private void tabMain_SelectedIndexChanged(object sender, EventArgs e) private void tabMain_SelectedIndexChanged(object sender, EventArgs e)
{ {
this._selectedTab = this.tabMain.SelectedTab;
} }
private void mnuRefreshOnBreak_Click(object sender, EventArgs e) private void mnuRefreshOnBreak_Click(object sender, EventArgs e)

View file

@ -306,7 +306,6 @@ namespace Mesen.GUI.Debugger
List<int> indent = new List<int>(30000); List<int> indent = new List<int>(30000);
bool showByteCode = false; bool showByteCode = false;
char[] splitter = new char[] { ' ' };
while(readLine()) { while(readLine()) {
string[] parts = line.Split('\x1'); string[] parts = line.Split('\x1');
programCounter.Add(Int32.Parse(parts[0], System.Globalization.NumberStyles.HexNumber)); programCounter.Add(Int32.Parse(parts[0], System.Globalization.NumberStyles.HexNumber));

View file

@ -95,7 +95,6 @@ namespace Mesen.GUI.Forms.Cheats
if(string.IsNullOrWhiteSpace(_previousSearch)) { if(string.IsNullOrWhiteSpace(_previousSearch)) {
lstGames.Items.AddRange(_gamesByCrc.Values.ToArray()); lstGames.Items.AddRange(_gamesByCrc.Values.ToArray());
} else { } else {
List<string> gamesToAdd = new List<string>();
lstGames.Items.AddRange(_gamesByCrc.Where(c => c.Value.Name.IndexOf(_previousSearch, StringComparison.InvariantCultureIgnoreCase) >= 0).Select(c => c.Value).ToArray()); lstGames.Items.AddRange(_gamesByCrc.Where(c => c.Value.Name.IndexOf(_previousSearch, StringComparison.InvariantCultureIgnoreCase) >= 0).Select(c => c.Value).ToArray());
} }
} }

View file

@ -124,7 +124,6 @@ namespace Mesen.GUI.Forms.Config
cboPlayer4.SelectedIndexChanged -= cboPlayerController_SelectedIndexChanged; cboPlayer4.SelectedIndexChanged -= cboPlayerController_SelectedIndexChanged;
bool isNes = ((InputInfo)Entity).ConsoleType == ConsoleType.Nes; bool isNes = ((InputInfo)Entity).ConsoleType == ConsoleType.Nes;
bool p3and4visible = (isNes && chkFourScore.Checked) || (!isNes && ((InputInfo)Entity).ExpansionPortDevice == InteropEmu.ExpansionPortDevice.FourPlayerAdapter);
bool isOriginalFamicom = !isNes && !ConfigManager.Config.EmulationInfo.UseNes101Hvc101Behavior; bool isOriginalFamicom = !isNes && !ConfigManager.Config.EmulationInfo.UseNes101Hvc101Behavior;
List<InteropEmu.ControllerType> controllerTypes = new List<InteropEmu.ControllerType>() { InteropEmu.ControllerType.None, InteropEmu.ControllerType.StandardController }; List<InteropEmu.ControllerType> controllerTypes = new List<InteropEmu.ControllerType>() { InteropEmu.ControllerType.None, InteropEmu.ControllerType.StandardController };

View file

@ -138,7 +138,6 @@ namespace Mesen.GUI.Forms.Config
protected override bool ValidateInput() protected override bool ValidateInput()
{ {
VideoFilterType orgFilter = ((VideoInfo)Entity).VideoFilter;
UpdateObject(); UpdateObject();
UpdateCustomRatioVisibility(); UpdateCustomRatioVisibility();
UpdatePalette(); UpdatePalette();

View file

@ -18,8 +18,6 @@ namespace Mesen.GUI.Forms
{ {
public partial class frmConfigWizard : Form public partial class frmConfigWizard : Form
{ {
private PrivateFontCollection _fonts = new PrivateFontCollection();
public frmConfigWizard() public frmConfigWizard()
{ {
InitializeComponent(); InitializeComponent();

View file

@ -128,7 +128,7 @@ namespace Mesen.GUI.Forms
string filename = ofd.FileName; string filename = ofd.FileName;
Task.Run(() => { Task.Run(() => {
int result = InteropEmu.RunAutomaticTest(filename); InteropEmu.RunAutomaticTest(filename);
}); });
} }
} }

View file

@ -48,7 +48,6 @@ namespace Mesen.GUI.Forms
private object _loadRomLock = new object(); private object _loadRomLock = new object();
private int _romLoadCounter = 0; private int _romLoadCounter = 0;
private bool _showUpgradeMessage = false; private bool _showUpgradeMessage = false;
private float _xFactor = 1;
private float _yFactor = 1; private float _yFactor = 1;
private bool _enableResize = false; private bool _enableResize = false;
private bool _overrideWindowSize = false; private bool _overrideWindowSize = false;
@ -345,7 +344,6 @@ namespace Mesen.GUI.Forms
protected override void ScaleControl(SizeF factor, BoundsSpecified specified) protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
{ {
_xFactor = factor.Width;
_yFactor = factor.Height; _yFactor = factor.Height;
base.ScaleControl(factor, specified); base.ScaleControl(factor, specified);
} }

View file

@ -82,7 +82,6 @@ namespace Mesen.GUI.GoogleDriveIntegration
private static bool UploadData() private static bool UploadData()
{ {
using(MemoryStream stream = CloudSyncHelper.GetDataStream()) { using(MemoryStream stream = CloudSyncHelper.GetDataStream()) {
var gdAccessor = new GoogleDriveAccessor();
return _accessor.UploadFile(stream, "MesenData.zip"); return _accessor.UploadFile(stream, "MesenData.zip");
} }
} }

View file

@ -24,7 +24,6 @@ namespace Mesen.GUI.GoogleDriveIntegration
{ {
private const string _contentType = @"application/zip"; private const string _contentType = @"application/zip";
private readonly string[] _scopes = new[] { DriveService.Scope.DriveAppdata }; private readonly string[] _scopes = new[] { DriveService.Scope.DriveAppdata };
private File _driveFile = null;
private UserCredential _credentials = null; private UserCredential _credentials = null;
private DriveService _service = null; private DriveService _service = null;
private bool _connected = false; private bool _connected = false;
@ -184,10 +183,8 @@ namespace Mesen.GUI.GoogleDriveIntegration
var request = _service.Files.Get(driveFile.Id); var request = _service.Files.Get(driveFile.Id);
var progress = await request.DownloadAsync(outStream).ConfigureAwait(false); var progress = await request.DownloadAsync(outStream).ConfigureAwait(false);
if(progress.Status == DownloadStatus.Completed) { if(progress.Status == DownloadStatus.Completed) {
_driveFile = driveFile;
return FileDownloadResult.OK; return FileDownloadResult.OK;
} else { } else {
_driveFile = null;
return FileDownloadResult.Error; return FileDownloadResult.Error;
} }
} }
@ -203,7 +200,6 @@ namespace Mesen.GUI.GoogleDriveIntegration
void Upload_ResponseReceived(File file) void Upload_ResponseReceived(File file)
{ {
_driveFile = file;
} }
void IDisposable.Dispose() void IDisposable.Dispose()

View file

@ -64,8 +64,8 @@ namespace Mesen.GUI
try { try {
Task.Run(() => { Task.Run(() => {
//Cache deserializers in another thread //Cache deserializers in another thread
XmlSerializer xmlSerializer = new XmlSerializer(typeof(Configuration)); new XmlSerializer(typeof(Configuration));
xmlSerializer = new XmlSerializer(typeof(DebugWorkspace)); new XmlSerializer(typeof(DebugWorkspace));
}); });
if(Type.GetType("Mono.Runtime") != null) { if(Type.GetType("Mono.Runtime") != null) {