Ejemplo n.º 1
0
	void AddGameplayInfo(UrlEncoder &postdata)
	{
		// Just to get an idea of how long they played.
		postdata.Add("ticks", (const uint64_t)CoreTiming::GetTicks());

		float vps, fps;
		__DisplayGetAveragedFPS(&vps, &fps);
		postdata.Add("vps", vps);
		postdata.Add("fps", fps);

		postdata.Add("savestate_used", SaveState::HasLoadedState());
	}
Ejemplo n.º 2
0
	int Process(int pos)
	{
		Payload &payload = payloadBuffer[pos];

		std::string gpuPrimary, gpuFull;
		if (gpu)
			gpu->GetReportingInfo(gpuPrimary, gpuFull);

		UrlEncoder postdata;
		postdata.Add("version", PPSSPP_GIT_VERSION);
		// TODO: Maybe ParamSFOData shouldn't include nulls in std::strings?  Don't work to break savedata, though...
		postdata.Add("game", StripTrailingNull(g_paramSFO.GetValueString("DISC_ID")) + "_" + StripTrailingNull(g_paramSFO.GetValueString("DISC_VERSION")));
		postdata.Add("game_title", StripTrailingNull(g_paramSFO.GetValueString("TITLE")));
		postdata.Add("gpu", gpuPrimary);
		postdata.Add("gpu_full", gpuFull);
		postdata.Add("cpu", cpu_info.Summarize());
		postdata.Add("platform", GetPlatformIdentifer());
		postdata.Add("sdkver", sceKernelGetCompiledSdkVersion());
		postdata.Add("pixel_width", PSP_CoreParameter().pixelWidth);
		postdata.Add("pixel_height", PSP_CoreParameter().pixelHeight);
		postdata.Add("ticks", (const uint64_t)CoreTiming::GetTicks());

		if (g_Config.iShowFPSCounter)
		{
			float vps, fps;
			__DisplayGetAveragedFPS(&vps, &fps);
			postdata.Add("vps", vps);
			postdata.Add("fps", fps);
		}

		// TODO: Settings, savestate/savedata status, some measure of speed/fps?

		switch (payload.type)
		{
		case MESSAGE:
			postdata.Add("message", payload.string1);
			postdata.Add("value", payload.string2);
			payload.string1.clear();
			payload.string2.clear();

			SendReportRequest("/report/message", postdata.ToString());
			break;
		}

		return 0;
	}