X11: Workaround DISPLAY not being set.
This commit is contained in:
parent
87fd766c33
commit
da5f27f9ce
@ -335,10 +335,15 @@ namespace entry
|
||||
|
||||
m_display = XOpenDisplay(NULL);
|
||||
if (NULL == m_display)
|
||||
{
|
||||
// Use `DISPLAY` enviroment variable to pick display. If `DISPLAY` is not set try ":0"
|
||||
m_display = XOpenDisplay(":0");
|
||||
if (NULL == m_display)
|
||||
{
|
||||
bx::printf("XOpenDisplay failed: DISPLAY environment variable must be set.\n\n");
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
}
|
||||
|
||||
int32_t screen = DefaultScreen(m_display);
|
||||
m_depth = DefaultDepth(m_display, screen);
|
||||
|
Loading…
Reference in New Issue
Block a user