Skip to content

Commit b28108d

Browse files
committed
Detours: Clean up a bit.
1 parent 43da3d2 commit b28108d

1 file changed

Lines changed: 7 additions & 35 deletions

File tree

src/d2dx/Detours.cpp

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -426,41 +426,13 @@ void d2dx::AttachLateDetours(
426426

427427
DetourTransactionBegin();
428428
DetourUpdateThread(GetCurrentThread());
429-
430-
if (D2Gfx_DrawImage_Real)
431-
{
432-
DetourAttach(&(PVOID&)D2Gfx_DrawImage_Real, D2Gfx_DrawImage_Hooked);
433-
}
434-
435-
if (D2Gfx_DrawShiftedImage_Real)
436-
{
437-
DetourAttach(&(PVOID&)D2Gfx_DrawShiftedImage_Real, D2Gfx_DrawShiftedImage_Hooked);
438-
}
439-
440-
if (D2Gfx_DrawVerticalCropImage_Real)
441-
{
442-
DetourAttach(&(PVOID&)D2Gfx_DrawVerticalCropImage_Real, D2Gfx_DrawVerticalCropImage_Hooked);
443-
}
444-
445-
if (D2Gfx_DrawClippedImage_Real)
446-
{
447-
DetourAttach(&(PVOID&)D2Gfx_DrawClippedImage_Real, D2Gfx_DrawClippedImage_Hooked);
448-
}
449-
450-
if (D2Gfx_DrawImageFast_Real)
451-
{
452-
DetourAttach(&(PVOID&)D2Gfx_DrawImageFast_Real, D2Gfx_DrawImageFast_Hooked);
453-
}
454-
455-
if (D2Gfx_DrawShadow_Real)
456-
{
457-
DetourAttach(&(PVOID&)D2Gfx_DrawShadow_Real, D2Gfx_DrawShadow_Hooked);
458-
}
459-
460-
if (D2Win_DrawText_Real)
461-
{
462-
DetourAttach(&(PVOID&)D2Win_DrawText_Real, D2Win_DrawText_Hooked);
463-
}
429+
DetourAttach(&(PVOID&)D2Gfx_DrawImage_Real, D2Gfx_DrawImage_Hooked);
430+
DetourAttach(&(PVOID&)D2Gfx_DrawShiftedImage_Real, D2Gfx_DrawShiftedImage_Hooked);
431+
DetourAttach(&(PVOID&)D2Gfx_DrawVerticalCropImage_Real, D2Gfx_DrawVerticalCropImage_Hooked);
432+
DetourAttach(&(PVOID&)D2Gfx_DrawClippedImage_Real, D2Gfx_DrawClippedImage_Hooked);
433+
DetourAttach(&(PVOID&)D2Gfx_DrawImageFast_Real, D2Gfx_DrawImageFast_Hooked);
434+
DetourAttach(&(PVOID&)D2Gfx_DrawShadow_Real, D2Gfx_DrawShadow_Hooked);
435+
DetourAttach(&(PVOID&)D2Win_DrawText_Real, D2Win_DrawText_Hooked);
464436

465437
LONG lError = DetourTransactionCommit();
466438

0 commit comments

Comments
 (0)