| 668 | } |
| 669 | |
| 670 | void MainWindow::updateStatusBar() |
| 671 | { |
| 672 | QIcon icon; |
| 673 | QStringList tags; |
| 674 | QStringList toolTipLines; |
| 675 | |
| 676 | switch (DolphinComm::DolphinAccessor::getStatus()) |
| 677 | { |
| 678 | case DolphinComm::DolphinAccessor::DolphinStatus::hooked: |
| 679 | { |
| 680 | static const QIcon s_icon(":/status_hooked.svg"); |
| 681 | icon = s_icon; |
| 682 | |
| 683 | tags << tr("Hooked"); |
| 684 | |
| 685 | const bool mem2{DolphinComm::DolphinAccessor::isMEM2Present()}; |
| 686 | const bool aram{!mem2 && DolphinComm::DolphinAccessor::isARAMAccessible()}; |
| 687 | |
| 688 | tags << QString::fromStdString(DolphinComm::DolphinAccessor::getGameID()); |
| 689 | |
| 690 | toolTipLines |
| 691 | << tr("Hooked to Dolphin successfully. Current start address: ") + |
| 692 | QString::number(DolphinComm::DolphinAccessor::getEmuRAMAddressStart(), 16).toUpper(); |
| 693 | |
| 694 | tags << tr("MEM1"); |
| 695 | if (mem2) |
| 696 | { |
| 697 | tags << tr("MEM2"); |
| 698 | toolTipLines << tr("The extended Wii-only memory is present."); |
| 699 | } |
| 700 | else |
| 701 | { |
| 702 | if (aram) |
| 703 | { |
| 704 | tags << tr("ARAM"); |
| 705 | toolTipLines << tr("Dolphin's ARAM is accessible."); |
| 706 | } |
| 707 | else |
| 708 | { |
| 709 | toolTipLines << tr("Dolphin's ARAM is inaccessible; turn off MMU to use it."); |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | break; |
| 714 | } |
| 715 | case DolphinComm::DolphinAccessor::DolphinStatus::notRunning: |
| 716 | { |
| 717 | static const QIcon s_icon(":/status_absent.svg"); |
| 718 | icon = s_icon; |
| 719 | tags << tr("Dolphin not detected"); |
| 720 | toolTipLines << tr("Unable to hook to Dolphin. Dolphin does not appear to be running."); |
| 721 | break; |
| 722 | } |
| 723 | case DolphinComm::DolphinAccessor::DolphinStatus::noEmu: |
| 724 | { |
| 725 | static const QIcon s_icon(":/status_present.svg"); |
| 726 | icon = s_icon; |
| 727 | tags << tr("No game running"); |
nothing calls this directly
no outgoing calls
no test coverage detected