Ejemplo n.º 1
0
        private static void UpdateStrings()
        {
            switch (OBS.GetStreamingStatus().IsRecording)
            {
            case true: OBSMessages.Recording(); break;

            case false: OBSMessages.NotRecording(); break;
            }
        }
Ejemplo n.º 2
0
        private static void AutoRecordTask(object sender, EventArgs e)
        {
            // Check if connected to the game
            if (!game.IsHooked())
            {
                game.HookGameProcess();
            }

            // Check again if connected. If not, exit the task
            if (!game.IsHooked())
            {
                OBSMessages.FailedToHookGameProcess();
                OBSMessages.NotRecording();
                update_timer.Start();
                return;
            }

            // Now try to connect to OBS
            if (!OBS.IsConnected)
            {
                ConnectToOBS();
            }

            // And recheck if connected
            if (!OBS.IsConnected)
            {
                OBSMessages.FailedToHookOBS();
                OBSMessages.NotRecording();
                update_timer.Start();
                return;
            }

            // Now check for OBS auth
            CheckOBSAuth();
            if (!OBS.IsConnected)
            {
                OBSMessages.FailedToHookOBS();
                OBSMessages.NotRecording();
                update_timer.Start();
                return;
            }

            // At this point both OBS and the game should have been hooked
            OBSMessages.AutoRecordingEnabled();

            // Launch the main update logic
            UpdateLogic();
            UpdateStrings();

            update_timer.Start();
        }