Fixes for compiling with disabled xcb, or disabled xlib & xcb

This commit is contained in:
baldurk
2017-09-19 16:57:40 +01:00
parent ba64ae6274
commit 86c3ee4086
4 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ struct XlibWindowData
#else
typedef void *Display;
typedef struct _XDisplay Display;
#endif
+5 -1
View File
@@ -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,
+6 -1
View File
@@ -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;
+2
View File
@@ -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);