BOOL CLoadDirectDraw::IsDirectDrawVersion1() { if (m_pDirectDraw == NULL) return FALSE; IDirectDraw2 *p = NULL; HRESULT hr = m_pDirectDraw->QueryInterface(IID_IDirectDraw2, (void **)&p); if (p) p->Release(); if (hr == NOERROR) { DbgLog((LOG_TRACE,3,TEXT("Direct Draw Version 2 or greater"))); return FALSE; } else { DbgLog((LOG_TRACE,3,TEXT("Direct Draw Version 1"))); return TRUE; } }
~wxDisplayInfo() { if ( m_pDD2 ) m_pDD2->Release(); }