fixed cleanup, fixed unused context

This commit is contained in:
Alexey Ershov
2015-06-29 11:46:31 +03:00
parent 3f68787051
commit 8ed45609d0
2 changed files with 21 additions and 20 deletions

View File

@@ -116,6 +116,16 @@ public:
return init();
}
virtual void cleanup()
{
#if defined(WIN32) || defined(_WIN32)
::DestroyWindow(m_hWnd);
#elif defined(__linux__)
XDestroyWindow(m_display, m_window);
XCloseDisplay(m_display);
#endif
}
#if defined(WIN32) || defined(_WIN32)
virtual LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) = 0;
#endif