mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Fixes for compiling with disabled xcb, or disabled xlib & xcb
This commit is contained in:
@@ -139,7 +139,7 @@ struct XlibWindowData
|
||||
|
||||
#else
|
||||
|
||||
typedef void *Display;
|
||||
typedef struct _XDisplay Display;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ VkBool32 WrappedVulkan::vkGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalD
|
||||
namespace Keyboard
|
||||
{
|
||||
void UseConnection(xcb_connection_t *conn);
|
||||
void CloneDisplay(Display *dpy);
|
||||
}
|
||||
|
||||
VkResult WrappedVulkan::vkCreateXcbSurfaceKHR(VkInstance instance,
|
||||
@@ -199,6 +198,11 @@ VkBool32 WrappedVulkan::vkGetPhysicalDeviceXlibPresentationSupportKHR(
|
||||
visualID);
|
||||
}
|
||||
|
||||
namespace Keyboard
|
||||
{
|
||||
void CloneDisplay(Display *dpy);
|
||||
}
|
||||
|
||||
VkResult WrappedVulkan::vkCreateXlibSurfaceKHR(VkInstance instance,
|
||||
const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
|
||||
const VkAllocationCallbacks *pAllocator,
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(RDOC_XCB)
|
||||
#include <X11/keysym.h>
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
#endif
|
||||
|
||||
@@ -137,6 +138,10 @@ bool GetXlibKeyState(int key)
|
||||
|
||||
// if RENDERDOC_WINDOWING_XLIB is not enabled
|
||||
|
||||
void CloneDisplay(Display *dpy)
|
||||
{
|
||||
}
|
||||
|
||||
bool GetXlibKeyState(int key)
|
||||
{
|
||||
return false;
|
||||
@@ -160,7 +165,7 @@ bool GetXCBKeyState(int key)
|
||||
if(symbols == NULL)
|
||||
return false;
|
||||
|
||||
KeySym ks = 0;
|
||||
xcb_keysym_t ks = 0;
|
||||
|
||||
if(key >= eRENDERDOC_Key_A && key <= eRENDERDOC_Key_Z)
|
||||
ks = key;
|
||||
|
||||
@@ -372,11 +372,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
GlobalEnvironment env;
|
||||
|
||||
#if defined(RENDERDOC_WINDOWING_XLIB) || defined(RENDERDOC_WINDOWING_XCB)
|
||||
// call XInitThreads - although we don't use xlib concurrently the driver might need to.
|
||||
XInitThreads();
|
||||
|
||||
// we don't check if display successfully opened, it's only a problem if it's needed later.
|
||||
display = env.xlibDisplay = XOpenDisplay(NULL);
|
||||
#endif
|
||||
|
||||
#if defined(RENDERDOC_SUPPORT_VULKAN)
|
||||
VerifyVulkanLayer(env, argc, argv);
|
||||
|
||||
Reference in New Issue
Block a user