Exemplo n.º 1
0
inline bool AttemptToHookSomething()
{
    bool bFoundSomethingToHook = false;
    if(!bD3D9Hooked && InitD3D9Capture())
    {
        logOutput << "D3D9 Present" << endl;
        bFoundSomethingToHook = true;
        bD3D9Hooked = true;
    }
    if(!bDXGIHooked && InitDXGICapture())
    {
        logOutput << "DXGI Present" << endl;
        bFoundSomethingToHook = true;
        bDXGIHooked = true;
    }
    if(!bGLHooked && InitGLCapture())
    {
        logOutput << "GL Present" << endl;
        bFoundSomethingToHook = true;
        bGLHooked = true;
    }
    /*
    if(!bDirectDrawHooked && InitDDrawCapture())
    {
        OutputDebugString(TEXT("DirectDraw Present\r\n"));
        bFoundSomethingToHook = true;
        bDirectDrawfHooked = true;
    }*/

    return bFoundSomethingToHook;
}
Exemplo n.º 2
0
inline bool AttemptToHookSomething()
{
    bool bFoundSomethingToHook = false;
    if(!bD3D11Hooked && InitD3D11Capture())
    {
        OutputDebugString(TEXT("D3D11 Present\r\n"));
        bFoundSomethingToHook = true;
        bD3D11Hooked = true;
    }
    if(!bD3D9Hooked && InitD3D9Capture())
    {
        OutputDebugString(TEXT("D3D9 Present\r\n"));
        bFoundSomethingToHook = true;
        bD3D9Hooked = true;
    }
    if(!bD3D101Hooked && InitD3D101Capture())
    {
        OutputDebugString(TEXT("D3D10.1 Present\r\n"));
        bFoundSomethingToHook = true;
        bD3D101Hooked = true;
    }
    if(!bD3D10Hooked && InitD3D10Capture())
    {
        OutputDebugString(TEXT("D3D10 Present\r\n"));
        bFoundSomethingToHook = true;
        bD3D10Hooked = true;
    }
    if(!bGLHooked && InitGLCapture())
    {
        OutputDebugString(TEXT("GL Present\r\n"));
        bFoundSomethingToHook = true;
        bGLHooked = true;
    }
    /*
    if(!bDirectDrawHooked && InitDDrawCapture())
    {
        OutputDebugString(TEXT("DirectDraw Present\r\n"));
        bFoundSomethingToHook = true;
        bDirectDrawfHooked = true;
    }*/

    return bFoundSomethingToHook;
}
Exemplo n.º 3
0
inline bool AttemptToHookSomething()
{
    if (!hwndSender || !hwndD3DDummyWindow || !hwndOpenGLSetupWindow)
        return false;

    bool bFoundSomethingToHook = false;
    if(!bD3D9Hooked) {
        if (InitD3D9Capture()) {
            logOutput << CurrentTimeString() << "D3D9 Present" << endl;
            bFoundSomethingToHook = true;
            bD3D9Hooked = true;
        }
    } else {
        //occasionally, certain applications can reset the d3d9 hook, or clear it, or something.
        //so, we forcibly make sure that the d3d9 function is still hooked.
        CheckD3D9Capture();
    }

    if(!bDXGIHooked && InitDXGICapture())
    {
        logOutput << CurrentTimeString() << "DXGI Present" << endl;
        bFoundSomethingToHook = true;
        bDXGIHooked = true;
    }
    if(!bGLHooked && InitGLCapture()) {
        logOutput << CurrentTimeString() << "GL Present" << endl;
        bFoundSomethingToHook = true;
        bGLHooked = true;
    } else {
        CheckGLCapture();
    }
    /*
    if(!bDirectDrawHooked && InitDDrawCapture())
    {
        OutputDebugString(TEXT("DirectDraw Present\r\n"));
        bFoundSomethingToHook = true;
        bDirectDrawfHooked = true;
    }*/

    return bFoundSomethingToHook;
}