This commit is contained in:
Branimir Karadžić 2022-09-16 20:12:31 -07:00
parent cbbaba4099
commit 408988946d
2 changed files with 24 additions and 13 deletions

View File

@ -332,7 +332,13 @@ namespace entry
int32_t run(int _argc, const char* const* _argv)
{
XInitThreads();
m_display = XOpenDisplay(NULL);
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);
@ -558,6 +564,9 @@ namespace entry
XUnmapWindow(m_display, m_window[0]);
XDestroyWindow(m_display, m_window[0]);
XCloseDisplay(m_display);
m_display = NULL;
return thread.getExitCode();
}

View File

@ -749,20 +749,22 @@ namespace bgfx { namespace d3d12
m_nvapi.init();
const char* d3d12DllName =
#if BX_PLATFORM_LINUX
"libd3d12.so"
#else
"d3d12.dll"
#endif // BX_PLATFORM_LINUX
;
m_d3d12Dll = bx::dlopen(d3d12DllName);
if (NULL == m_d3d12Dll)
{
BX_TRACE("Init error: Failed to load %s.", d3d12DllName);
goto error;
const char* d3d12DllName =
#if BX_PLATFORM_LINUX
"libd3d12.so"
#else
"d3d12.dll"
#endif // BX_PLATFORM_LINUX
;
m_d3d12Dll = bx::dlopen(d3d12DllName);
if (NULL == m_d3d12Dll)
{
BX_TRACE("Init error: Failed to load %s.", d3d12DllName);
goto error;
}
}
errorState = ErrorState::LoadedD3D12;