[host] mingw-w64 compile fixes (#44)

* [host] rename min() to LG_MIN()

* [host] format string type fixes, %Ix doesn't exist in mingw

* [host] DXGI minor fixes

* [host] mingw lacks media foundation api headers and QISearch
This commit is contained in:
arcnmx
2018-01-30 05:07:46 -05:00
committed by Geoffrey McRae
parent d7321d5f5f
commit 35b4d75eea
6 changed files with 48 additions and 29 deletions

View File

@@ -86,13 +86,14 @@ namespace Capture
*/
STDMETHODIMP QueryInterface(REFIID riid, void ** ppv)
{
static const QITAB qit[] =
{
QITABENT(DXGI, IMFAsyncCallback),
{ NULL }
};
return QISearch(this, qit, riid, ppv);
if (riid == __uuidof(IUnknown) || riid == __uuidof(IMFAsyncCallback)) {
*ppv = static_cast<IMFAsyncCallback*>(this);
AddRef();
return S_OK;
} else {
*ppv = NULL;
return E_NOINTERFACE;
}
}
STDMETHODIMP_(ULONG) AddRef()
@@ -115,9 +116,9 @@ namespace Capture
bool InitRawCapture();
bool InitH264Capture();
GrabStatus DXGI::GrabFrameTexture(FrameInfo & frame, ID3D11Texture2DPtr & texture, bool & timeout);
GrabStatus DXGI::GrabFrameRaw (FrameInfo & frame);
GrabStatus DXGI::GrabFrameH264 (FrameInfo & frame);
GrabStatus GrabFrameTexture(FrameInfo & frame, ID3D11Texture2DPtr & texture, bool & timeout);
GrabStatus GrabFrameRaw (FrameInfo & frame);
GrabStatus GrabFrameH264 (FrameInfo & frame);
void WaitForDesktop();