- os::Path wrapper;
-
- wrapper = findFile("wrappers/" CLI_TRACE_WRAPPER, APITRACE_WRAPPER_INSTALL_DIR CLI_TRACE_WRAPPER, verbose);
-
- if (!wrapper.length()) {
+ const char **wrapperFilenames;
+ unsigned numWrappers;
+ int status = 1;
+
+ /*
+ * TODO: simplify code
+ */
+
+ switch (api) {
+ case API_GL:
+ wrapperFilenames = glWrappers;
+ break;
+#ifdef EGL_TRACE_WRAPPER
+ case API_EGL:
+ wrapperFilenames = eglWrappers;
+ break;
+#endif
+#ifdef _WIN32
+ case API_D3D7:
+ wrapperFilenames = d3d7Wrappers;
+ break;
+ case API_D3D8:
+ wrapperFilenames = d3d8Wrappers;
+ break;
+ case API_D3D9:
+ wrapperFilenames = d3d9Wrappers;
+ break;
+ case API_D3D10:
+ case API_D3D10_1:
+ case API_D3D11:
+ wrapperFilenames = dxgiWrappers;
+ break;
+#endif
+ default:
+ std::cerr << "error: unsupported API\n";