mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-28 19:00:23 +00:00
Disable reporting when copy framebuffer is used.
Causes too much noise. Also, use a proper interface to enable/disable it. This should prevent future problems with accidentally enabling it.
This commit is contained in:
parent
cfbf83eeab
commit
c0e54735f5
@ -236,9 +236,18 @@ namespace Reporting
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool IsSupported()
|
||||
{
|
||||
// Disabled when using certain hacks, because they make for poor reports.
|
||||
// TODO: Numbers to avoid dependency on GLES code.
|
||||
if (g_Config.iRenderingMode == 2 || g_Config.iRenderingMode == 3)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IsEnabled()
|
||||
{
|
||||
if (g_Config.sReportHost.empty())
|
||||
if (g_Config.sReportHost.empty() || !IsSupported())
|
||||
return false;
|
||||
// Disabled by default for now.
|
||||
if (g_Config.sReportHost.compare("default") == 0)
|
||||
@ -246,6 +255,21 @@ namespace Reporting
|
||||
return true;
|
||||
}
|
||||
|
||||
void Enable(bool flag, std::string host)
|
||||
{
|
||||
if (IsSupported() && IsEnabled() != flag)
|
||||
{
|
||||
// "" means explicitly disabled. Don't ever turn on by default.
|
||||
// "default" means it's okay to turn it on by default.
|
||||
g_Config.sReportHost = flag ? host : "";
|
||||
}
|
||||
}
|
||||
|
||||
void EnableDefault()
|
||||
{
|
||||
g_Config.sReportHost = "default";
|
||||
}
|
||||
|
||||
void ReportMessage(const char *message, ...)
|
||||
{
|
||||
if (!IsEnabled() || CheckSpamLimited())
|
||||
|
@ -16,6 +16,7 @@
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include <string>
|
||||
|
||||
#define ERROR_LOG_REPORT(t,...) { ERROR_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); }
|
||||
#define WARN_LOG_REPORT(t,...) { WARN_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); }
|
||||
@ -34,6 +35,18 @@
|
||||
|
||||
namespace Reporting
|
||||
{
|
||||
// Returns whether or not the reporting system is currently enabled.
|
||||
bool IsEnabled();
|
||||
|
||||
// Returns whether the reporting system can be enabled (based on system or settings.)
|
||||
bool IsSupported();
|
||||
|
||||
// Set the current enabled state of the reporting system and desired reporting server host.
|
||||
void Enable(bool flag, std::string host);
|
||||
|
||||
// Use the default reporting setting (per compiled settings) of host and enabled state.
|
||||
void EnableDefault();
|
||||
|
||||
// Report a message string, using the format string as a key.
|
||||
void ReportMessage(const char *message, ...);
|
||||
}
|
@ -34,6 +34,7 @@
|
||||
#include "math/curves.h"
|
||||
#include "Core/HW/atrac3plus.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Common/KeyMap.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -348,7 +349,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
#endif
|
||||
systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, s->T("Change CPU Clock", "Change CPU Clock (0 = default)"), screenManager()));
|
||||
|
||||
enableReports_ = g_Config.sReportHost != "default";
|
||||
enableReports_ = Reporting::IsEnabled();
|
||||
//#ifndef ANDROID
|
||||
systemSettings->Add(new ItemHeader(s->T("Cheats", "Cheats (experimental, see forums)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bEnableCheats, s->T("Enable Cheats")));
|
||||
@ -368,7 +369,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
systemSettings->Add(new Choice(s->T("Change Nickname")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname);
|
||||
#endif
|
||||
systemSettings->Add(new Choice(s->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents);
|
||||
systemSettings->Add(new CheckBox(&enableReports_, s->T("Enable Compatibility Server Reports")));
|
||||
systemSettings->Add(new CheckBox(&enableReports_, s->T("Enable Compatibility Server Reports")))->SetEnabled(Reporting::IsSupported());
|
||||
systemSettings->Add(new Choice(s->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools);
|
||||
|
||||
|
||||
@ -456,7 +457,7 @@ UI::EventReturn GameSettingsScreen::OnBack(UI::EventParams &e) {
|
||||
Atrac3plus_Decoder::Init();
|
||||
else Atrac3plus_Decoder::Shutdown();
|
||||
}
|
||||
g_Config.sReportHost = enableReports_ ? "report.ppsspp.org" : "default";
|
||||
Reporting::Enable(enableReports_, "report.ppsspp.org");
|
||||
g_Config.Save();
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -473,7 +474,7 @@ void GlobalSettingsScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
root_ = new ScrollView(ORIENT_VERTICAL);
|
||||
|
||||
enableReports_ = g_Config.sReportHost != "";
|
||||
enableReports_ = Reporting::IsEnabled();
|
||||
}*/
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnChangeNickname(UI::EventParams &e) {
|
||||
|
Loading…
Reference in New Issue
Block a user