MCPcopy Create free account
hub / github.com/clementgallet/libTAS / updateStatus

Method updateStatus

src/program/ui/MainWindow.cpp:780–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780void MainWindow::updateStatus(int status)
781{
782 /* Update game status (active/inactive) */
783
784 switch (status) {
785
786 case Context::INACTIVE:
787 for (QWidget* w : disabledWidgetsOnStart) {
788 if (!w->actions().empty())
789 for (QAction* a : w->actions())
790 a->setEnabled(true);
791 else
792 w->setEnabled(true);
793 }
794 for (QAction* a : disabledActionsOnStart)
795 a->setEnabled(true);
796
797 if (context->config.sc.recording == SharedConfig::NO_RECORDING) {
798 movieBox->setEnabled(true);
799 }
800 movieBox->setCheckable(true);
801 movieBox->setChecked(context->config.sc.recording != SharedConfig::NO_RECORDING);
802
803 elapsedTimeSec->setValue(context->config.sc.initial_monotonic_time_sec);
804 elapsedTimeNsec->setValue(context->config.sc.initial_monotonic_time_nsec);
805 realTimeSec->setValue(context->config.sc.initial_time_sec);
806 realTimeNsec->setValue(context->config.sc.initial_time_nsec);
807
808 launchGdbButton->setEnabled(true);
809 launchGdbAction->setText(tr("Launch with GDB"));
810 launchLldbAction->setText(tr("Launch with LLDB"));
811 launchStraceAction->setText(tr("Launch with strace"));
812
813 if (context->config.sc.av_dumping) {
814 context->config.sc.av_dumping = false;
815 configEncodeAction->setEnabled(true);
816 toggleEncodeAction->setText("Start encode");
817 }
818
819 frameCount->setText("0");
820 currentLength->setText("Current Time: -");
821 fpsValues->setText("Current FPS: - / -");
822
823 stopButton->setText("Stop");
824 stopButton->setEnabled(false);
825
826 updateMovieParams();
827 break;
828
829 case Context::STARTING:
830 for (QWidget* w : disabledWidgetsOnStart) {
831 if (!w->actions().empty())
832 for (QAction* a : w->actions())
833 a->setEnabled(false);
834 else
835 w->setEnabled(false);
836 }
837 for (QAction* a : disabledActionsOnStart)

Callers

nothing calls this directly

Calls 2

startHexViewIfOpenMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected