mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-12 09:38:20 +00:00
Use consistent names for reporting config settings.
This commit is contained in:
parent
9e02b4307c
commit
7b99561839
@ -23,6 +23,7 @@
|
||||
#include "gfx_es2/gpu_features.h"
|
||||
#include "net/http_client.h"
|
||||
#include "util/text/parsers.h"
|
||||
#include "net/url.h"
|
||||
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/KeyMap.h"
|
||||
@ -170,6 +171,25 @@ struct ConfigSetting {
|
||||
}
|
||||
}
|
||||
|
||||
void Report(UrlEncoder &data, const std::string &prefix) {
|
||||
if (!report_)
|
||||
return;
|
||||
|
||||
switch (type_) {
|
||||
case TYPE_BOOL:
|
||||
return data.Add(prefix + ini_, *(bool *)ptr_);
|
||||
case TYPE_INT:
|
||||
return data.Add(prefix + ini_, *(int *)ptr_);
|
||||
case TYPE_FLOAT:
|
||||
return data.Add(prefix + ini_, *(float *)ptr_);
|
||||
case TYPE_STRING:
|
||||
return data.Add(prefix + ini_, *(std::string *)ptr_);
|
||||
default:
|
||||
_dbg_assert_msg_(LOADER, false, "Unexpected ini setting type");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const char *ini_;
|
||||
Type type_;
|
||||
bool report_;
|
||||
@ -937,3 +957,12 @@ void Config::ResetControlLayout() {
|
||||
g_Config.fAnalogStickY = -1.0;
|
||||
g_Config.fAnalogStickScale = defaultControlScale;
|
||||
}
|
||||
|
||||
void Config::GetReportingInfo(UrlEncoder &data) {
|
||||
for (size_t i = 0; i < ARRAY_SIZE(sections); ++i) {
|
||||
const std::string prefix = std::string("config.") + sections[i].section;
|
||||
for (auto setting = sections[i].settings; setting->HasMore(); ++setting) {
|
||||
setting->Report(data, prefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,8 @@ namespace http {
|
||||
class Downloader;
|
||||
}
|
||||
|
||||
struct UrlEncoder;
|
||||
|
||||
struct Config {
|
||||
public:
|
||||
Config();
|
||||
@ -317,6 +319,8 @@ public:
|
||||
|
||||
void ResetControlLayout();
|
||||
|
||||
void GetReportingInfo(UrlEncoder &data);
|
||||
|
||||
private:
|
||||
std::string iniFilename_;
|
||||
std::string controllerIniFilename_;
|
||||
|
@ -242,44 +242,7 @@ namespace Reporting
|
||||
postdata.Add("pixel_width", PSP_CoreParameter().pixelWidth);
|
||||
postdata.Add("pixel_height", PSP_CoreParameter().pixelHeight);
|
||||
|
||||
postdata.Add("config.sys.jit", g_Config.bJit);
|
||||
postdata.Add("config.sys.cpu_thread", g_Config.bSeparateCPUThread);
|
||||
postdata.Add("config.sys.io_thread", g_Config.bSeparateIOThread);
|
||||
postdata.Add("config.sys.locked_cpu", g_Config.iLockedCPUSpeed);
|
||||
postdata.Add("config.sys.cheats", g_Config.bEnableCheats);
|
||||
postdata.Add("config.sys.lang", g_Config.iLanguage);
|
||||
postdata.Add("config.sys.encrypt_save", g_Config.bEncryptSave);
|
||||
postdata.Add("config.sys.psp_model", g_Config.iPSPModel);
|
||||
postdata.Add("config.sys.firmware_ver", g_Config.iFirmwareVersion);
|
||||
postdata.Add("config.gpu.swrast", g_Config.bSoftwareRendering);
|
||||
postdata.Add("config.gpu.hw_transform", g_Config.bHardwareTransform);
|
||||
postdata.Add("config.gpu.sw_skinning", g_Config.bSoftwareSkinning);
|
||||
postdata.Add("config.gpu.rendering_mode", g_Config.iRenderingMode);
|
||||
postdata.Add("config.gpu.tex_filtering", g_Config.iTexFiltering);
|
||||
postdata.Add("config.gpu.frameskip", g_Config.iFrameSkip);
|
||||
postdata.Add("config.gpu.autoskip", g_Config.bAutoFrameSkip);
|
||||
postdata.Add("config.gpu.vertex_cache", g_Config.bVertexCache);
|
||||
postdata.Add("config.gpu.tex_backoff_cache", g_Config.bTextureBackoffCache);
|
||||
postdata.Add("config.gpu.tex_second_cache", g_Config.bTextureSecondaryCache);
|
||||
postdata.Add("config.gpu.vertex_jit", g_Config.bVertexDecoderJit);
|
||||
postdata.Add("config.gpu.internal_res", g_Config.iInternalResolution);
|
||||
postdata.Add("config.gpu.mipmap", g_Config.bMipMap);
|
||||
postdata.Add("config.gpu.tex_scaling_level", g_Config.iTexScalingLevel);
|
||||
postdata.Add("config.gpu.tex_scaling_type", g_Config.iTexScalingType);
|
||||
postdata.Add("config.gpu.tex_deposterize", g_Config.bTexDeposterize);
|
||||
postdata.Add("config.gpu.fps_limit", g_Config.iFpsLimit);
|
||||
postdata.Add("config.gpu.force_max_fps", g_Config.iForceMaxEmulatedFPS);
|
||||
postdata.Add("config.gpu.lowq_spline_bezier", g_Config.bLowQualitySplineBezier);
|
||||
postdata.Add("config.hack.disable_stencil", g_Config.bDisableStencilTest);
|
||||
postdata.Add("config.hack.always_depth_write", g_Config.bAlwaysDepthWrite);
|
||||
postdata.Add("config.hack.timer_hack", g_Config.bTimerHack);
|
||||
postdata.Add("config.hack.disable_alpha", g_Config.bDisableAlphaTest);
|
||||
postdata.Add("config.hack.prescale_uv", g_Config.bPrescaleUV);
|
||||
postdata.Add("config.hack.discard_regs", g_Config.bDiscardRegsOnJRRA);
|
||||
postdata.Add("config.hack.skip_deadbeef", g_Config.bSkipDeadbeefFilling);
|
||||
postdata.Add("config.hack.func_hash_map", g_Config.bFuncHashMap);
|
||||
postdata.Add("config.audio.low_latency", g_Config.bLowLatencyAudio);
|
||||
postdata.Add("config.net.enable_wlan", g_Config.bEnableWlan);
|
||||
g_Config.GetReportingInfo(postdata);
|
||||
}
|
||||
|
||||
void AddGameplayInfo(UrlEncoder &postdata)
|
||||
|
Loading…
x
Reference in New Issue
Block a user