From 68e47d3ae2365fff31015cca7c8f8aecae0e3c80 Mon Sep 17 00:00:00 2001 From: Baldur Karlsson Date: Mon, 4 Aug 2014 15:52:00 +0100 Subject: [PATCH] Skip hooking fraps via IAT for compatibility reasons --- renderdoc/os/win32/win32_hook.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/renderdoc/os/win32/win32_hook.cpp b/renderdoc/os/win32/win32_hook.cpp index c54ac647f..244972f77 100644 --- a/renderdoc/os/win32/win32_hook.cpp +++ b/renderdoc/os/win32/win32_hook.cpp @@ -93,6 +93,13 @@ struct CachedHookData { string name = strlower(string(modName)); + // fraps seems to non-safely modify the assembly around the hook function, if + // we modify its import descriptors it leads to a crash as it hooks OUR functions. + // instead, skip modifying the import descriptors, it will hook the 'real' d3d functions + // and we can call them and have fraps + renderdoc playing nicely together + if(name.find("fraps") != string::npos) + return; + // set module pointer if we are hooking exports from this module for(auto it=DllHooks.begin(); it != DllHooks.end(); ++it) if(it->first == name)