fix lua memory leak (maybe affected today, but the leak is from may 6) and revert some virtuallistview changes which break more things than they fix. it seems .net's listview just happens to blow up internally constantly when its in virtual mode and recover from the exceptions.
This commit is contained in:
parent
da1aebe1ac
commit
34dd2812f6
|
@ -844,9 +844,11 @@ namespace BizHawk.MultiClient
|
||||||
if (s.FrameWaiting && !includeFrameWaiters)
|
if (s.FrameWaiting && !includeFrameWaiters)
|
||||||
prohibit = true;
|
prohibit = true;
|
||||||
|
|
||||||
if (prohibit) continue;
|
if (!prohibit)
|
||||||
var result = LuaImp.ResumeScript(s.Thread);
|
{
|
||||||
s.FrameWaiting = result.WaitForFrame;
|
var result = LuaImp.ResumeScript(s.Thread);
|
||||||
|
s.FrameWaiting = result.WaitForFrame;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LuaImp.gui_drawFinishEmu();
|
LuaImp.gui_drawFinishEmu();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,19 @@ namespace BizHawk
|
||||||
public int code;
|
public int code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
internal struct NMITEMACTIVATE {
|
||||||
|
NMHDR hdr;
|
||||||
|
int iItem;
|
||||||
|
int iSubItem;
|
||||||
|
uint uNewState;
|
||||||
|
uint uOldState;
|
||||||
|
uint uChanged;
|
||||||
|
POINT ptAction;
|
||||||
|
uint lParam;
|
||||||
|
uint uKeyFlags;
|
||||||
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct RECT {
|
internal struct RECT {
|
||||||
public int left, top, right, bottom;
|
public int left, top, right, bottom;
|
||||||
|
@ -216,7 +229,9 @@ namespace BizHawk
|
||||||
|
|
||||||
internal enum Notices : int {
|
internal enum Notices : int {
|
||||||
NM_FIRST = 0,
|
NM_FIRST = 0,
|
||||||
NM_CUSTOMDRAW = NM_FIRST - 12
|
NM_CUSTOMDRAW = NM_FIRST - 12,
|
||||||
|
NM_CLICK = NM_FIRST - 2,
|
||||||
|
NM_DBLCLICK = NM_FIRST - 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum ListViewNotices : int {
|
internal enum ListViewNotices : int {
|
||||||
|
@ -542,6 +557,14 @@ namespace BizHawk
|
||||||
OnBeginItemDrag(MouseButtons.Right, ref m);
|
OnBeginItemDrag(MouseButtons.Right, ref m);
|
||||||
messageProcessed = true;
|
messageProcessed = true;
|
||||||
break;
|
break;
|
||||||
|
//case (int)Notices.NM_CLICK:
|
||||||
|
//case (int)Notices.NM_DBLCLICK:
|
||||||
|
// {
|
||||||
|
// NMITEMACTIVATE test = (NMITEMACTIVATE)m.GetLParam(typeof(NMITEMACTIVATE));
|
||||||
|
// messageProcessed = true;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -559,16 +582,24 @@ namespace BizHawk
|
||||||
// if (SelectedIndices.Count > 0 && SelectedIndices[0] >= VirtualListSize)
|
// if (SelectedIndices.Count > 0 && SelectedIndices[0] >= VirtualListSize)
|
||||||
// messageProcessed = true;
|
// messageProcessed = true;
|
||||||
// break;
|
// break;
|
||||||
|
|
||||||
//TRY THIS HACK INSTEAD TO FIX THE EXCEPTION
|
//TRY THIS HACK INSTEAD TO FIX THE EXCEPTION
|
||||||
case 0x100C:
|
// (( NOPE, THEY ALL BREAK ONE THING OR ANOTHER. WINFORMS LISTVIEW JUST THROWS EXCEPTIONS, WHAT CAN WE DO? ))
|
||||||
{
|
//case 0x100C:
|
||||||
base.WndProc(ref m);
|
// {
|
||||||
int num = m.Result.ToInt32();
|
// base.WndProc(ref m);
|
||||||
messageProcessed = true;
|
// int num = m.Result.ToInt32();
|
||||||
m.Result = new IntPtr(-1);
|
// messageProcessed = true;
|
||||||
break;
|
// m.Result = new IntPtr(-1);
|
||||||
}
|
// break;
|
||||||
|
// }
|
||||||
|
//case 0x1012:
|
||||||
|
// {
|
||||||
|
// base.WndProc(ref m);
|
||||||
|
// int num = m.Result.ToInt32();
|
||||||
|
// messageProcessed = true;
|
||||||
|
// m.Result = new IntPtr(-1);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
|
||||||
case (int)WindowsMessage.WM_ERASEBKGND:
|
case (int)WindowsMessage.WM_ERASEBKGND:
|
||||||
if (BlazingFast)
|
if (BlazingFast)
|
||||||
|
|
Loading…
Reference in New Issue