20 "83 F8 ?? 7C ?? D9 43 ?? D8 1D ?? ?? ?? ?? DF E0 F6 C4 41 0F ?? ?? ?? ??",
31 "8B 08 EB ?? A1 ?? ?? ?? ?? 8B 0D ?? ?? ?? ?? 3B C1",
38 "83 C1 14 4E 75 ?? A1 ?? ?? ?? ?? 8B 0D ?? ?? ?? ?? 3B C1",
64 "8D AE ?? ?? ?? ?? DB 44 24 30 D9 1F",
71 "8D AE ?? ?? ?? ?? DB 44 24 30",
80 "8B 54 24 18 89 44 24 30",
90 "8B 54 24 18 89 44 24 30",
118 const SIZE_T slot_size =
sizeof(*slot);
120 if (!VirtualProtect(slot, slot_size, PAGE_READWRITE, &old)) {
122 "VirtualProtect failed for slot=%p error=%lu",
130 VirtualProtect(slot, slot_size, old, &old);
144 return E_OUTOFMEMORY;
152 "Failed to publish DirectDraw object: %s",
174 "DirectDrawEnumerateExA intercepted - callback=%p context=%p flags=0x%x",
184 lpCallback(
NULL,
"DTTR Virtual Display",
"display", lpContext,
NULL);
212 "sidecar/graphics-import-thunk",
213 graphics_import_thunk_patches,
223 "sidecar/graphics-byte-patch",
DTTR_Graphics_COM_DirectDraw7 * dttr_graphics_com_create_directdraw7()
DTTR_Graphics_COM_DirectDrawSurface7 DWORD flags void NULL
@ DTTR_VERTEX_PRECISION_SUBPIXEL
DTTR_Result DTTR_Core_PatchGroupRelease(DTTR_Core_PatchGroup **group)
#define DTTR_ARRAY_COUNT(array_)
struct DTTR_Core_PatchGroup DTTR_Core_PatchGroup
#define DTTR_LOG_DEBUG(...)
#define DTTR_LOG_ERROR(...)
DTTR_PCDOGS_API const struct dttr_pcdogs_function_accessor_DDraw_CreateEx *const DTTR_PCDOGS_F_DDraw_CreateEx
Accessor object for DDraw_CreateEx.
DTTR_PCDOGS_API const struct DTTR_PCDOGS_D_D3D_CreateTextureSurface_DDrawObject_type *const DTTR_PCDOGS_D_D3D_CreateTextureSurface_DDrawObject
DTTR_PCDOGS_API const struct dttr_pcdogs_function_accessor_DDraw_EnumerateExA *const DTTR_PCDOGS_F_DDraw_EnumerateExA
Accessor object for DDraw_EnumerateExA.
GUID DTTR_PCDOGS_T_Win32_GUID
Win32 GUID value used by DirectDraw import entries.
struct DTTR_PCDOGS_T_DDraw_IDirectDraw7 DTTR_PCDOGS_T_DDraw_IDirectDraw7
#define DTTR_PCDOGS_PATCH_SPEC_AOB_BYTES(required_, aob_, offset_,...)
struct DTTR_PCDOGS_T_COM_IUnknown DTTR_PCDOGS_T_COM_IUnknown
bool DTTR_ResultOK(DTTR_Result result)
static HWND graphics_hook_hwnd
HRESULT dttr_hook_directdraw_create_ex_callback(DTTR_PCDOGS_T_Win32_GUID *guid, void **ddraw_out, DTTR_PCDOGS_T_Win32_GUID *iid, DTTR_PCDOGS_T_COM_IUnknown *outer)
static DTTR_Graphics_COM_DirectDraw7 * graphics_hook_ddraw7
static DTTR_Core_PatchGroup * graphics_import_thunk_patch_group
static const DTTR_PCDOGS_T_Patch_Spec graphics_byte_patches[]
static void store_pointer(void **slot, void *value)
static DTTR_Core_PatchGroup * graphics_byte_patch_group
static DTTR_Graphics_COM_DirectDraw7 * get_or_create_ddraw7()
void dttr_graphics_hooks_cleanup(const DTTR_Mods_Context *ctx)
bool dttr_graphics_hooks_init(const DTTR_Mods_Context *ctx)
HRESULT dttr_hook_directdraw_enumerate_ex_a_callback(DDraw_EnumCallbackExA lpCallback, LPVOID lpContext, DWORD dwFlags)
BOOL(* DDraw_EnumCallbackExA)(GUID *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, HMONITOR hm)
HWND dttr_graphics_init()
static const char * dttr_sidecar_result_detail(DTTR_Result result)
static bool dttr_sidecar_install_pcdogs_patch_group(const DTTR_Mods_Context *ctx, const char *label, const DTTR_PCDOGS_T_Patch_Spec *patches, size_t patch_count, DTTR_Core_PatchGroup **group)
DTTR_Graphics_COM_DirectDraw7_VT * vtbl