void GraphicsCaptureSource::EndScene()
{
    if(capture)
    {
        capture->Destroy();
        delete capture;
        capture = NULL;
    }

    delete invertShader;
    invertShader = NULL;

    delete drawShader;
    drawShader = NULL;

    delete cursorTexture;
    cursorTexture = NULL;

    if (hotkeyID)
    {
        OBSDeleteHotkey(hotkeyID);
        hotkeyID = 0;
    }

    if(!bCapturing)
        return;

    bCapturing = false;

    SetEvent(hSignalEnd);
    EndCapture();
}
void SceneSwitcherSettings::ApplyConfig(HWND hWnd) {
	thePlugin->ApplyConfig(hWnd);

	// Redefine the hotkey
	if (hotkeyID)
		OBSDeleteHotkey(hotkeyID);

	if (thePlugin->GetToggleHotkey() != 0)
		hotkeyID = OBSCreateHotkey((DWORD)thePlugin->GetToggleHotkey(), ToggleHotkeyProc, 0);
}
Beispiel #3
0
void UnloadPlugin()
{
	if(thePlugin)
	{
        if (thePlugin->GetSettings()->hotkeyID)
            OBSDeleteHotkey(thePlugin->GetSettings()->hotkeyID);
        
        delete thePlugin;
		thePlugin = NULL;
	}
}