diff --git a/renderdoc/api/app/renderdoc_app.h b/renderdoc/api/app/renderdoc_app.h index f6eedbf92..4666d1e4c 100644 --- a/renderdoc/api/app/renderdoc_app.h +++ b/renderdoc/api/app/renderdoc_app.h @@ -29,29 +29,11 @@ #endif #if defined(WIN32) - -#if defined(RENDERDOC_EXPORTS) -#define RENDERDOC_API __declspec(dllexport) -#else -#define RENDERDOC_API __declspec(dllimport) -#endif - -#define RENDERDOC_CC __cdecl - + #define RENDERDOC_CC __cdecl #elif defined(__linux__) - -#ifdef RENDERDOC_EXPORTS -#define RENDERDOC_API __attribute__ ((visibility ("default"))) + #define RENDERDOC_CC #else -#define RENDERDOC_API -#endif - -#define RENDERDOC_CC - -#else - -#error "Unknown platform" - + #error "Unknown platform" #endif #ifdef __cplusplus @@ -508,6 +490,8 @@ typedef struct // RenderDoc API entry point // // This entry point can be obtained via GetProcAddress/dlsym if RenderDoc is available. +// +// The name is the same as the typedef - "RENDERDOC_GetAPI" // // This function is not thread safe, and should not be called on multiple threads at once. // Ideally, call this once as early as possible in your application's startup, before doing @@ -524,7 +508,7 @@ typedef struct // 1 - if the outAPIPointers has been filled with a pointer to the API struct requested // 0 - if the requested version is not supported or the arguments are invalid. // -RENDERDOC_API int RENDERDOC_CC RENDERDOC_GetAPI(RENDERDOC_Version version, void **outAPIPointers); +typedef int (RENDERDOC_CC *pRENDERDOC_GetAPI)(RENDERDOC_Version version, void **outAPIPointers); #ifdef __cplusplus } // extern "C" diff --git a/renderdoc/replay/app_api.cpp b/renderdoc/replay/app_api.cpp index e193c05b3..8dc229070 100644 --- a/renderdoc/replay/app_api.cpp +++ b/renderdoc/replay/app_api.cpp @@ -28,6 +28,7 @@ #include "core/core.h" #include "hooks/hooks.h" #include "api/app/renderdoc_app.h" +#include "api/replay/renderdoc_replay.h" // for RENDERDOC_API to export the RENDERDOC_GetAPI function static void SetFocusToggleKeys(RENDERDOC_InputButton *keys, int num) {