Hi,
as the windows version is nowadays so much better than the linux version (especially in regard to searching for memory values), I have tried to run it with wine and the feature I needed (cheat search) does not work.
The bug for this things lies in both programs (as often the case):
- Wine is a bit too trustful and exposes internal data structures to the programs and it does not rescue things from the stack as soon as the message dispatcher arrives back.
- SNES9x on the other hand does change data structures it should not change and relies on data still being on the stack when the function returns ...
Question now for nitsuja:
Could you incorporate the following changes into a v10?
--- wsnes9x.cpp.old 2006-04-23 20:17:33.000000000 +0200
+++ wsnes9x.cpp 2006-04-23 20:20:36.000000000 +0200
@@ -6608,7 +6608,7 @@
nmlvdi->item.pszText=curr->rmbits;
nmlvdi->item.cchTextMax=11;
}
- nmlvdi->item.mask=LVIF_TEXT;
+ // nmlvdi->item.mask=LVIF_TEXT; // This isbad as wine relies on this to not change.
}
break;
case NM_DBLCLK:
@@ -9822,7 +9822,7 @@
NMHDR * nmh=(NMHDR*)lParam;
if(nmh->hwndFrom == GetDlgItem(hDlg, IDC_ADDYS) && nmh->code == LVN_GETDISPINFO)
{
- TCHAR buf[12];
+ TCHAR* buf=new char[12]; // Or do anything else to have itactually not on the stack ...
int i, j;
NMLVDISPINFO * nmlvdi=(NMLVDISPINFO*)lParam;
j=nmlvdi->item.iItem;
@@ -9945,7 +9945,7 @@
nmlvdi->item.pszText=buf;
nmlvdi->item.cchTextMax=4;
}
- nmlvdi->item.mask=LVIF_TEXT;
+ // nmlvdi->item.mask=LVIF_TEXT; // This is bad as wine relies on this not being changed
}
else if(nmh->hwndFrom == GetDlgItem(hDlg, IDC_ADDYS) && (nmh->code== LVN_ITEMACTIVATE||nmh->code == NM_CLICK))
This will also fix the other Fabian's problems with the memory watcher and will additionally also fix the open dialog under wine.
cu
Fabian
PS: The first issue was reported to the wine team.