X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Ftrace_tools_trace.cpp;h=5c88a25626c91ad77a9ba30ab5532c5dc0e80f65;hb=4a3ccab160b3197933b9fdf02d924370b7e48a79;hp=56258e5b2cb5422c26b255cc951a5a2c02fae9a6;hpb=f7824e5af6bb805e77d204e7cc16d228ea78e764;p=apitrace diff --git a/common/trace_tools_trace.cpp b/common/trace_tools_trace.cpp index 56258e5..5c88a25 100644 --- a/common/trace_tools_trace.cpp +++ b/common/trace_tools_trace.cpp @@ -70,8 +70,10 @@ findWrapper(const char *wrapperFilename) // Try relative install directory wrapperPath = processDir; -#ifdef _WIN32 - wrapperPath.join("..\\lib\\apitrace\\wrappers"); +#if defined(_WIN32) + wrapperPath.join("..\\lib\\wrappers"); +#elif defined(__APPLE__) + wrapperPath.join("../lib/wrappers"); #else wrapperPath.join("../lib/apitrace/wrappers"); #endif @@ -82,7 +84,7 @@ findWrapper(const char *wrapperFilename) #ifndef _WIN32 // Try absolute install directory - wrapperPath = APITRACE_WRAPPER_INSTALL_DIR; + wrapperPath = APITRACE_WRAPPERS_INSTALL_DIR; wrapperPath.join(wrapperFilename); if (wrapperPath.exists()) { return wrapperPath; @@ -127,6 +129,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"; @@ -143,12 +151,9 @@ traceProgram(API api, #if defined(_WIN32) /* On Windows copy the wrapper to the program directory. */ - os::String wrapperName (wrapperPath); - wrapperName.trimDirectory(); - os::String tmpWrapper(argv[0]); tmpWrapper.trimFilename(); - tmpWrapper.join(wrapperName); + tmpWrapper.join(wrapperFilename); if (verbose) { std::cerr << wrapperPath << " -> " << tmpWrapper << "\n";