X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Ftrace_tools_trace.cpp;h=387e2e25b97f562f7579b5eb3cd6b8e713a7499e;hb=5b827e13413d9790981601522eb9fe5070e5615e;hp=36fe735466e104c98fcb4a5afe5902c0ed2a793d;hpb=ab6ded73916c5ea5ffee7a44b5c00eab78626b1c;p=apitrace diff --git a/common/trace_tools_trace.cpp b/common/trace_tools_trace.cpp index 36fe735..387e2e2 100644 --- a/common/trace_tools_trace.cpp +++ b/common/trace_tools_trace.cpp @@ -33,6 +33,7 @@ #include "os_string.hpp" #include "os_process.hpp" #include "trace_tools.hpp" +#include "trace_resource.hpp" @@ -51,50 +52,6 @@ namespace trace { #endif -static os::String -findWrapper(const char *wrapperFilename) -{ - os::String wrapperPath; - - os::String processDir = os::getProcessName(); - processDir.trimFilename(); - - // Try relative build directory - // XXX: Just make build and install directory layout match - wrapperPath = processDir; - wrapperPath.join("wrappers"); - wrapperPath.join(wrapperFilename); - if (wrapperPath.exists()) { - return wrapperPath; - } - - // Try relative install directory - wrapperPath = processDir; -#if defined(_WIN32) - wrapperPath.join("..\\lib\\wrappers"); -#elif defined(__APPLE__) - wrapperPath.join("../lib/wrappers"); -#else - wrapperPath.join("../lib/apitrace/wrappers"); -#endif - wrapperPath.join(wrapperFilename); - if (wrapperPath.exists()) { - return wrapperPath; - } - -#ifndef _WIN32 - // Try absolute install directory - wrapperPath = APITRACE_WRAPPER_INSTALL_DIR; - wrapperPath.join(wrapperFilename); - if (wrapperPath.exists()) { - return wrapperPath; - } -#endif - - return ""; -} - - int traceProgram(API api, char * const *argv, @@ -129,6 +86,12 @@ traceProgram(API api, case API_D3D10: wrapperFilename = "d3d10.dll"; break; + case API_D3D10_1: + wrapperFilename = "d3d10_1.dll"; + break; + case API_D3D11: + wrapperFilename = "d3d11.dll"; + break; #endif default: std::cerr << "error: unsupported API\n";