From f42bcae2b51e0a67487e3a6cfc532decf037a3d2 Mon Sep 17 00:00:00 2001 From: dgis Date: Wed, 3 Apr 2019 23:56:48 +0200 Subject: [PATCH] - Add a patch from Christoph G. to prevent loosing data when going from v1.2 with sizeof(BOOL)==1 to v1.3 with sizeof(BOOL)==4! --- app/src/main/cpp/core/files.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/cpp/core/files.c b/app/src/main/cpp/core/files.c index fc4b71f..bb87c04 100644 --- a/app/src/main/cpp/core/files.c +++ b/app/src/main/cpp/core/files.c @@ -1072,6 +1072,14 @@ BOOL OpenDocument(LPCTSTR szFilename) goto restore; } + // Temporary patch for going from v1.2 with sizeof(BOOL)==1 to v1.3 with sizeof(BOOL)==4! + //--> begin of modification by cg + if (lSizeofChipset == 8632) // fix for Emu48 for Android v1.2 or earlier + { + ZeroMemory(&((BYTE *)&Chipset)[offsetof(CHIPSET,SoftInt)],sizeof(Chipset) - offsetof(CHIPSET,SoftInt)); + } + //<-- end of modification + SetWindowLocation(hWnd,Chipset.nPosX,Chipset.nPosY); while (TRUE)