From 568334cdd4829c04ac980e9920f6effc2d19d4be Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Fri, 7 Oct 2022 12:19:13 +0200 Subject: [PATCH] Switch to the v141_xp toolset for XP support --- TitanEngine/Global.Debugger.cpp | 3 +++ TitanEngine/Global.Engine.Context.cpp | 8 ++++++++ TitanEngine/TitanEngine.rc | 4 ++-- TitanEngine/TitanEngine.vcxproj | 9 +++++---- scylla_wrapper_dll | 2 +- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/TitanEngine/Global.Debugger.cpp b/TitanEngine/Global.Debugger.cpp index 56655a3..b4b3d69 100644 --- a/TitanEngine/Global.Debugger.cpp +++ b/TitanEngine/Global.Debugger.cpp @@ -54,6 +54,9 @@ DWORD ContextControlFlags = [] USHORT nativeMachine = 0; if (p_IsWow64Process2(GetCurrentProcess(), &processMachine, &nativeMachine)) { +#ifndef IMAGE_FILE_MACHINE_ARM64 +#define IMAGE_FILE_MACHINE_ARM64 0xAA64 +#endif // IMAGE_FILE_MACHINE_ARM64 if (nativeMachine == IMAGE_FILE_MACHINE_ARM || nativeMachine == IMAGE_FILE_MACHINE_ARM64) { flags = CONTEXT_ALL; diff --git a/TitanEngine/Global.Engine.Context.cpp b/TitanEngine/Global.Engine.Context.cpp index ae4a898..5830384 100644 --- a/TitanEngine/Global.Engine.Context.cpp +++ b/TitanEngine/Global.Engine.Context.cpp @@ -214,7 +214,11 @@ bool _SetFullContextDataEx(HANDLE hActiveThread, TITAN_ENGINE_CONTEXT_t* titcont DBGContext.FloatSave.ErrorOffset = titcontext->x87fpu.ErrorOffset; DBGContext.FloatSave.DataSelector = titcontext->x87fpu.DataSelector; DBGContext.FloatSave.DataOffset = titcontext->x87fpu.DataOffset; +#ifdef NTDDI_WIN8 DBGContext.FloatSave.Spare0 = titcontext->x87fpu.Cr0NpxState; +#else + DBGContext.FloatSave.Cr0NpxState = titcontext->x87fpu.Cr0NpxState; +#endif memcpy(DBGContext.FloatSave.RegisterArea, titcontext->RegisterArea, 80); @@ -312,7 +316,11 @@ bool _GetFullContextDataEx(HANDLE hActiveThread, TITAN_ENGINE_CONTEXT_t* titcont titcontext->x87fpu.ErrorOffset = DBGContext.FloatSave.ErrorOffset; titcontext->x87fpu.DataSelector = DBGContext.FloatSave.DataSelector; titcontext->x87fpu.DataOffset = DBGContext.FloatSave.DataOffset; +#ifdef NTDDI_WIN8 titcontext->x87fpu.Cr0NpxState = DBGContext.FloatSave.Spare0; +#else + titcontext->x87fpu.Cr0NpxState = DBGContext.FloatSave.Cr0NpxState; +#endif memcpy(titcontext->RegisterArea, DBGContext.FloatSave.RegisterArea, 80); diff --git a/TitanEngine/TitanEngine.rc b/TitanEngine/TitanEngine.rc index 07504c9..c1b5a89 100644 --- a/TitanEngine/TitanEngine.rc +++ b/TitanEngine/TitanEngine.rc @@ -7,7 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -32,7 +32,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""winres.h""\r\n" "\0" END diff --git a/TitanEngine/TitanEngine.vcxproj b/TitanEngine/TitanEngine.vcxproj index e01a540..d4759fe 100644 --- a/TitanEngine/TitanEngine.vcxproj +++ b/TitanEngine/TitanEngine.vcxproj @@ -22,31 +22,32 @@ {9C7B8246-FDDA-48C7-9634-044969701E40} TitanEngine Win32Proj + 10.0 DynamicLibrary Unicode true - v142 + v141_xp DynamicLibrary Unicode true - v142 + v141_xp DynamicLibrary Unicode true - v142 + v141_xp DynamicLibrary Unicode true - v142 + v141_xp diff --git a/scylla_wrapper_dll b/scylla_wrapper_dll index bcfacd8..4f7892b 160000 --- a/scylla_wrapper_dll +++ b/scylla_wrapper_dll @@ -1 +1 @@ -Subproject commit bcfacd85018a9457944e665c0570a2c32509e6ba +Subproject commit 4f7892b43dfcf4fda041b03b992541cac1367c2c