mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Don't show CRC button when we can't get it
This commit is contained in:
1 parent
bc45634ed3
commit
227333f45b
1 file changed
+14
-1
+14
-1
@@ -34,6 +34,7 @@
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Loaders.h"
|
||||
#include "UI/CwCheatScreen.h"
|
||||
#include "UI/EmuScreen.h"
|
||||
#include "UI/GameScreen.h"
|
||||
@@ -178,7 +179,19 @@ void GameScreen::CreateViews() {
|
||||
btnSetBackground_->OnClick.Handle(this, &GameScreen::OnSetBackground);
|
||||
btnSetBackground_->SetVisibility(V_GONE);
|
||||
|
||||
if (!Reporting::HasCRC(gamePath_)) {
|
||||
bool fileTypeSupportCRC = false;
|
||||
if (info) {
|
||||
switch (info->fileType) {
|
||||
case IdentifiedFileType::PSP_PBP:
|
||||
case IdentifiedFileType::PSP_PBP_DIRECTORY:
|
||||
case IdentifiedFileType::PSP_ISO_NP:
|
||||
case IdentifiedFileType::PSP_ISO:
|
||||
fileTypeSupportCRC = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool isHomebrew = info->region > GAMEREGION_MAX;
|
||||
if (fileTypeSupportCRC && !isHomebrew && !Reporting::HasCRC(gamePath_) ) {
|
||||
btnCalcCRC_ = rightColumnItems->Add(new ChoiceWithValueDisplay(&CRC32string, ga->T("Calculate CRC"), (const char*)nullptr));
|
||||
btnCalcCRC_->OnClick.Handle(this, &GameScreen::OnDoCRC32);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user