]> git.cworth.org Git - apitrace/blobdiff - cli/cli_trace.cpp
gltrace: Prevent crash in _glGetDebugMessageLog_length (issue #140).
[apitrace] / cli / cli_trace.cpp
index 2646ffd8a0190c1bd80b621145c3dd1162efb5e5..52843c70703564af811410553a3cfc95dd278fb5 100644 (file)
@@ -126,13 +126,14 @@ traceProgram(trace::API api,
         return 1;
     }
 
-    os::String wrapperPath = findWrapper(wrapperFilename);
+    os::String wrapperPath = findWrapper(wrapperFilename, verbose);
     if (!wrapperPath.length()) {
-        std::cerr << "error: failed to find " << wrapperFilename << "\n";
+        std::cerr << "error: failed to find " << wrapperFilename << " wrapper\n";
         goto exit;
     }
 
 #if defined(_WIN32)
+    useInject = true;
     if (useInject) {
         args.push_back("inject");
         args.push_back(wrapperPath);
@@ -168,7 +169,6 @@ traceProgram(trace::API api,
     for (char * const * arg = argv; *arg; ++arg) {
         args.push_back(*arg);
     }
-    args.push_back(NULL);
 
     if (verbose) {
         const char *sep = "";
@@ -179,6 +179,8 @@ traceProgram(trace::API api,
         std::cerr << "\n";
     }
 
+    args.push_back(NULL);
+
     status = os::execute((char * const *)&args[0]);
 
 exit:
@@ -219,7 +221,7 @@ usage(void)
         "    -v, --verbose       verbose output\n"
         "    -a, --api=API       specify API to trace ("
 #ifdef _WIN32
-                                                      "gl, d3d7, d3d8, d3d9, or d3d10"
+                                                      "gl, d3d7, d3d8, d3d9, or dxgi (for d3d10 and higher) "
 #else
                                                       "gl or egl"
 #endif