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)
|
||||
prohibit = true;
|
||||
|
||||
if (prohibit) continue;
|
||||
var result = LuaImp.ResumeScript(s.Thread);
|
||||
s.FrameWaiting = result.WaitForFrame;
|
||||
if (!prohibit)
|
||||
{
|
||||
var result = LuaImp.ResumeScript(s.Thread);
|
||||
s.FrameWaiting = result.WaitForFrame;
|
||||
}
|
||||
}
|
||||
LuaImp.gui_drawFinishEmu();
|
||||
}
|
||||
|
|
|
@ -23,6 +23,19 @@ namespace BizHawk
|
|||
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)]
|
||||
internal struct RECT {
|
||||
public int left, top, right, bottom;
|
||||
|
@ -216,7 +229,9 @@ namespace BizHawk
|
|||
|
||||
internal enum Notices : int {
|
||||
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 {
|
||||
|
@ -542,6 +557,14 @@ namespace BizHawk
|
|||
OnBeginItemDrag(MouseButtons.Right, ref m);
|
||||
messageProcessed = true;
|
||||
break;
|
||||
//case (int)Notices.NM_CLICK:
|
||||
//case (int)Notices.NM_DBLCLICK:
|
||||
// {
|
||||
// NMITEMACTIVATE test = (NMITEMACTIVATE)m.GetLParam(typeof(NMITEMACTIVATE));
|
||||
// messageProcessed = true;
|
||||
// break;
|
||||
// }
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -559,16 +582,24 @@ namespace BizHawk
|
|||
// if (SelectedIndices.Count > 0 && SelectedIndices[0] >= VirtualListSize)
|
||||
// messageProcessed = true;
|
||||
// break;
|
||||
|
||||
//TRY THIS HACK INSTEAD TO FIX THE EXCEPTION
|
||||
case 0x100C:
|
||||
{
|
||||
base.WndProc(ref m);
|
||||
int num = m.Result.ToInt32();
|
||||
messageProcessed = true;
|
||||
m.Result = new IntPtr(-1);
|
||||
break;
|
||||
}
|
||||
// (( 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();
|
||||
// messageProcessed = true;
|
||||
// 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:
|
||||
if (BlazingFast)
|
||||
|
|
Loading…
Reference in New Issue