Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1580,12 +1580,18 @@ void Config::RestoreDefaults(RestoreSettingsBits whatToRestore, bool log) {
}

bool Config::HasGameConfig(std::string_view gameId) {
if (gameId.empty()) {
return false;
}
bool exists = false;
Path fullIniFilePath = GetGameConfigFilePath(searchPath_, gameId, &exists);
return exists;
}

bool Config::CreateGameConfig(std::string_view gameId) {
if (gameId.empty()) {
return false;
}
bool exists;
Path fullIniFilePath = GetGameConfigFilePath(searchPath_, gameId, &exists);

Expand Down
36 changes: 20 additions & 16 deletions UI/PauseScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ SaveSlotView::SaveSlotView(const Path &gameFilename, int slot, UI::LayoutParams
std::string number = StringFromFormat("%d", slot + 1);
Add(new Spacer(5));

Add(new TextView(number, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT, 0.0f, Gravity::G_VCENTER)))->SetBig(true);
Add(new TextView(number, new LinearLayoutParams(40.0f, WRAP_CONTENT, 0.0f, Gravity::G_VCENTER)))->SetBig(true);

AsyncImageFileView *fv = Add(new AsyncImageFileView(screenshotFilename_, IS_DEFAULT, new UI::LayoutParams(82 * 2, 47 * 2)));

Expand Down Expand Up @@ -571,6 +571,12 @@ void GamePauseScreen::CreateViews() {

if (g_paramSFO.IsValid() && g_Config.HasGameConfig(g_paramSFO.GetDiscID())) {
rightColumnItems->Add(new Choice(pa->T("Game Settings"), ImageID("I_GEAR")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings);
auto pa = GetI18NCategory(I18NCat::PAUSE);
if (g_Config.HasGameConfig(g_paramSFO.GetValueString("DISC_ID"))) {
Choice *delGameConfig = rightColumnItems->Add(new Choice(pa->T("Delete Game Config")));
delGameConfig->OnClick.Handle(this, &GamePauseScreen::OnDeleteConfig);
delGameConfig->SetEnabled(!bootPending_);
}
} else if (PSP_CoreParameter().fileType != IdentifiedFileType::PPSSPP_GE_DUMP) {
rightColumnItems->Add(new Choice(pa->T("Settings"), ImageID("I_GEAR")))->OnClick.Handle(this, &GamePauseScreen::OnGameSettings);
Choice *createGameConfig = rightColumnItems->Add(new Choice(pa->T("Create Game Config"), ImageID("I_GEAR_STAR")));
Expand Down Expand Up @@ -601,9 +607,8 @@ void GamePauseScreen::CreateViews() {

// TODO, also might be nice to show overall compat rating here?
// Based on their platform or even cpu/gpu/config. Would add an API for it.
if (!portrait && Reporting::IsSupported() && g_paramSFO.GetValueString("DISC_ID").size()) {
auto rp = GetI18NCategory(I18NCat::REPORTING);
rightColumnItems->Add(new Choice(rp->T("ReportButton", "Report Feedback")))->OnClick.Handle(this, &GamePauseScreen::OnReportFeedback);
if (!portrait) {
AddExtraOptions(rightColumnItems);
}
rightColumnItems->Add(new Spacer(20.0));
Choice *exit;
Expand Down Expand Up @@ -680,23 +685,22 @@ void GamePauseScreen::ShowContextMenu(UI::View *menuButton, bool portrait) {
}
});

auto pa = GetI18NCategory(I18NCat::PAUSE);

Choice *delGameConfig = parent->Add(new Choice(pa->T("Delete Game Config")));
delGameConfig->OnClick.Handle(this, &GamePauseScreen::OnDeleteConfig);
delGameConfig->SetEnabled(!bootPending_);

if (portrait) {
// Add some other options that are removed from the main screen in portrait mode.
if (Reporting::IsSupported() && g_paramSFO.GetValueString("DISC_ID").size()) {
auto rp = GetI18NCategory(I18NCat::REPORTING);
parent->Add(new Choice(rp->T("ReportButton", "Report Feedback")))->OnClick.Handle(this, &GamePauseScreen::OnReportFeedback);
}
AddExtraOptions(parent);
}
}, menuButton);
screenManager()->push(contextMenu);
}

void GamePauseScreen::AddExtraOptions(UI::ViewGroup *parent) {
using namespace UI;
// Add some other options that are removed from the main screen in portrait mode.
if (Reporting::IsSupported() && g_paramSFO.GetValueString("DISC_ID").size()) {
auto rp = GetI18NCategory(I18NCat::REPORTING);
parent->Add(new Choice(rp->T("ReportButton", "Report Feedback")))->OnClick.Handle(this, &GamePauseScreen::OnReportFeedback);
}
}

void GamePauseScreen::OnGameSettings(UI::EventParams &e) {
screenManager()->push(new GameSettingsScreen(gamePath_));
}
Expand Down Expand Up @@ -829,7 +833,7 @@ void GamePauseScreen::OnCreateConfig(UI::EventParams &e) {
if (info) {
info->hasConfig = true;
}
screenManager()->topScreen()->RecreateViews();
RecreateViews();
}
}

Expand Down
2 changes: 2 additions & 0 deletions UI/PauseScreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class GamePauseScreen : public UIBaseDialogScreen {
void OnState(UI::EventParams &e);
void ShowContextMenu(UI::View *menuButton, bool portrait);

void AddExtraOptions(UI::ViewGroup *parent);

// hack
bool finishNextFrame_ = false;
DialogResult finishNextFrameResult_ = DR_CANCEL;
Expand Down
6 changes: 4 additions & 2 deletions UI/SystemInfoScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,17 +410,19 @@ void SystemInfoScreen::CreateDriverBugsTab(UI::LinearLayout *driverBugs) {

auto si = GetI18NCategory(I18NCat::SYSINFO);

driverBugs->Add(new ItemHeader(si->T("Driver bugs")));

bool anyDriverBugs = false;
Draw::DrawContext *draw = screenManager()->getDrawContext();
for (int i = 0; i < (int)draw->GetBugs().MaxBugIndex(); i++) {
if (draw->GetBugs().Has(i)) {
anyDriverBugs = true;
driverBugs->Add(new InfoItem(draw->GetBugs().GetBugName(i), "", new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
driverBugs->Add(new InfoItem(draw->GetBugs().GetBugName(i), ""));
}
}

if (!anyDriverBugs) {
driverBugs->Add(new InfoItem(si->T("No GPU driver bugs detected"), "", new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
driverBugs->Add(new InfoItem(si->T("No GPU driver bugs detected"), ""));
}
}

Expand Down
Loading