x11: Use the default x11 display (not always 0)

This commit is contained in:
Jan Holthuis 2015-08-20 17:15:06 +02:00
parent fc2d1edea9
commit dc6758d847
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ void x11_window_create()
int i32Depth; int i32Depth;
// Initializes the display and screen // Initializes the display and screen
x11Display = XOpenDisplay(0); x11Display = XOpenDisplay(NULL);
if (!x11Display && !(x11Display = XOpenDisplay(":0"))) if (!x11Display && !(x11Display = XOpenDisplay(":0")))
{ {
printf("Error: Unable to open X display\n"); printf("Error: Unable to open X display\n");