MCPcopy Create free account
hub / github.com/TASEmulators/fceux / toggleLoggingOnOff

Method toggleLoggingOnOff

src/drivers/Qt/TraceLogger.cpp:510–542  ·  view source on GitHub ↗

----------------------------------------------------

Source from the content-addressed store, hash-verified

508}
509//----------------------------------------------------
510void TraceLoggerDialog_t::toggleLoggingOnOff(void)
511{
512 if (logging)
513 {
514 logging = 0;
515 msleep(1);
516 pushMsgToLogBuffer("Logging Finished");
517 startStopButton->setText(tr("Start Logging"));
518 startStopButton->setIcon( style()->standardIcon( QStyle::SP_MediaPlay ) );
519
520 diskThread->requestInterruption();
521 diskThread->quit();
522 diskThread->wait(1000);
523
524 traceView->update();
525 }
526 else
527 {
528 if (logFileCbox->isChecked())
529 {
530 if ( logFilePath.size() == 0 )
531 {
532 openLogFile();
533 }
534 diskThread->start();
535 msleep(100);
536 }
537 pushMsgToLogBuffer("Log Start");
538 startStopButton->setText(tr("Stop Logging"));
539 startStopButton->setIcon( style()->standardIcon( QStyle::SP_MediaStop ) );
540 logging = 1;
541 }
542}
543//----------------------------------------------------
544void TraceLoggerDialog_t::showBufferWarning(void)
545{

Callers 1

FCEUD_TraceLoggerStopFunction · 0.80

Calls 7

msleepFunction · 0.85
pushMsgToLogBufferFunction · 0.85
setTextMethod · 0.80
startMethod · 0.80
trFunction · 0.50
updateMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected