mirror of https://github.com/bkaradzic/bgfx
Cleanup.
This commit is contained in:
parent
cbbaba4099
commit
408988946d
|
@ -332,7 +332,13 @@ namespace entry
|
||||||
int32_t run(int _argc, const char* const* _argv)
|
int32_t run(int _argc, const char* const* _argv)
|
||||||
{
|
{
|
||||||
XInitThreads();
|
XInitThreads();
|
||||||
|
|
||||||
m_display = XOpenDisplay(NULL);
|
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);
|
int32_t screen = DefaultScreen(m_display);
|
||||||
m_depth = DefaultDepth(m_display, screen);
|
m_depth = DefaultDepth(m_display, screen);
|
||||||
|
@ -558,6 +564,9 @@ namespace entry
|
||||||
XUnmapWindow(m_display, m_window[0]);
|
XUnmapWindow(m_display, m_window[0]);
|
||||||
XDestroyWindow(m_display, m_window[0]);
|
XDestroyWindow(m_display, m_window[0]);
|
||||||
|
|
||||||
|
XCloseDisplay(m_display);
|
||||||
|
m_display = NULL;
|
||||||
|
|
||||||
return thread.getExitCode();
|
return thread.getExitCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -749,20 +749,22 @@ namespace bgfx { namespace d3d12
|
||||||
|
|
||||||
m_nvapi.init();
|
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);
|
const char* d3d12DllName =
|
||||||
goto error;
|
#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;
|
errorState = ErrorState::LoadedD3D12;
|
||||||
|
|
Loading…
Reference in New Issue