----------------------------------------------------
| 338 | } |
| 339 | //---------------------------------------------------- |
| 340 | void CodeDataLoggerDialog_t::updatePeriodic(void) |
| 341 | { |
| 342 | char str[768]; |
| 343 | float fcodecount = codecount; |
| 344 | float fdatacount = datacount; |
| 345 | float frendercount = rendercount; |
| 346 | float fvromreadcount = vromreadcount; |
| 347 | float fundefinedcount = undefinedcount; |
| 348 | float fundefinedvromcount = undefinedvromcount; |
| 349 | float fromsize = cdloggerdataSize; |
| 350 | float fvromsize = (cdloggerVideoDataSize != 0) ? cdloggerVideoDataSize : 1; |
| 351 | |
| 352 | if (FCEUI_GetLoggingCD()) |
| 353 | { |
| 354 | startPauseButton->setText(tr("Pause")); |
| 355 | statLabel->setText(tr(" Logger is Running: Press Pause to Stop ")); |
| 356 | statLabel->setStyleSheet("background-color: green; color: white;"); |
| 357 | } |
| 358 | else |
| 359 | { |
| 360 | startPauseButton->setText(tr("Start")); |
| 361 | statLabel->setText(tr(" Logger is Paused: Press Start to Run ")); |
| 362 | statLabel->setStyleSheet("background-color: red; color: white;"); |
| 363 | } |
| 364 | |
| 365 | if (cdloggerdataSize > 0) |
| 366 | { |
| 367 | sprintf(str, "0x%06x %.2f%%", codecount, (fcodecount / fromsize) * 100); |
| 368 | prgLoggedCodeLabel->setText(tr(str)); |
| 369 | |
| 370 | sprintf(str, "0x%06x %.2f%%", datacount, (fdatacount / fromsize) * 100); |
| 371 | prgLoggedDataLabel->setText(tr(str)); |
| 372 | |
| 373 | sprintf(str, "0x%06x %.2f%%", undefinedcount, (fundefinedcount / fromsize) * 100); |
| 374 | prgUnloggedLabel->setText(tr(str)); |
| 375 | |
| 376 | sprintf(str, "0x%06x %.2f%%", rendercount, (frendercount / fvromsize) * 100); |
| 377 | chrLoggedCodeLabel->setText(tr(str)); |
| 378 | |
| 379 | sprintf(str, "0x%06x %.2f%%", vromreadcount, (fvromreadcount / fvromsize) * 100); |
| 380 | chrLoggedDataLabel->setText(tr(str)); |
| 381 | |
| 382 | sprintf(str, "0x%06x %.2f%%", undefinedvromcount, (fundefinedvromcount / fvromsize) * 100); |
| 383 | chrUnloggedLabel->setText(tr(str)); |
| 384 | } |
| 385 | else |
| 386 | { |
| 387 | prgLoggedCodeLabel->setText(tr("------")); |
| 388 | prgLoggedDataLabel->setText(tr("------")); |
| 389 | prgUnloggedLabel->setText(tr("------")); |
| 390 | chrLoggedCodeLabel->setText(tr("------")); |
| 391 | chrLoggedDataLabel->setText(tr("------")); |
| 392 | chrUnloggedLabel->setText(tr("------")); |
| 393 | } |
| 394 | |
| 395 | sprintf(str, "CDL File: %s", loadedcdfile); |
| 396 | |
| 397 | cdlFileLabel->setText(tr(str)); |
nothing calls this directly
no test coverage detected