Memory Viewer & VirtualListView - ControlStyles.OptimziedDoubleBuffer seems to be a small speedup compared to ControlStyles.DoubleBuffer

This commit is contained in:
andres.delikat 2011-08-21 20:28:22 +00:00
parent b6424aa1b7
commit f22e9fb60d
3 changed files with 23 additions and 20 deletions

View File

@ -43,7 +43,7 @@ namespace BizHawk.MultiClient
{
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
this.BorderStyle = BorderStyle.Fixed3D;
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MemoryViewer_MouseMove);
this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.MemoryViewer_MouseClick);

View File

@ -70,28 +70,31 @@ namespace BizHawk.MultiClient
public void UpdateValues()
{
if (!this.IsHandleCreated || this.IsDisposed) return;
if (searchList.Count > 8)
SearchListView.BlazingFast = true;
sortReverse = false;
sortedCol = "";
for (int x = 0; x < searchList.Count; x++)
unchecked
{
searchList[x].prev = searchList[x].value;
searchList[x].PeekAddress(Domain);
if (!this.IsHandleCreated || this.IsDisposed) return;
if (searchList[x].prev != searchList[x].value)
searchList[x].changecount++;
if (searchList.Count > 8)
SearchListView.BlazingFast = true;
sortReverse = false;
sortedCol = "";
for (int x = 0; x < searchList.Count; x++)
{
searchList[x].prev = searchList[x].value;
searchList[x].PeekAddress(Domain);
if (searchList[x].prev != searchList[x].value)
searchList[x].changecount++;
}
if (AutoSearchCheckBox.Checked)
DoSearch();
else if (Global.Config.RamSearchPreviewMode)
DoPreview();
SearchListView.Refresh();
SearchListView.BlazingFast = false;
}
if (AutoSearchCheckBox.Checked)
DoSearch();
else if (Global.Config.RamSearchPreviewMode)
DoPreview();
SearchListView.Refresh();
SearchListView.BlazingFast = false;
}
private void RamSearch_Load(object sender, EventArgs e)

View File

@ -383,7 +383,7 @@ namespace BizHawk
ptrlvhti = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(LVHITTESTINFO)));
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.Opaque, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
}