mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Things link now. Let's see if it works..
This commit is contained in:
parent
c9c1796dff
commit
84e9a85e0f
8 changed files with 78 additions and 35 deletions
|
@ -265,7 +265,7 @@ static bool DefaultSasThread() {
|
|||
}
|
||||
|
||||
static const ConfigSetting achievementSettings[] = {
|
||||
ConfigSetting("Enable", &g_Config.bAchievementsEnable, false, CfgFlag::PER_GAME),
|
||||
ConfigSetting("Enable", &g_Config.bAchievementsEnable, true, CfgFlag::PER_GAME),
|
||||
};
|
||||
|
||||
static const ConfigSetting cpuSettings[] = {
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#include "Common/UI/Screen.h"
|
||||
#include "Common/UI/Context.h"
|
||||
#include "Common/UI/View.h"
|
||||
|
||||
#include "android/jni/app-android.h"
|
||||
|
||||
#include "Common/System/Display.h"
|
||||
|
@ -109,6 +110,7 @@
|
|||
#include "UI/BackgroundAudio.h"
|
||||
#include "UI/ControlMappingScreen.h"
|
||||
#include "UI/DiscordIntegration.h"
|
||||
#include "UI/RetroAchievements.h"
|
||||
#include "UI/EmuScreen.h"
|
||||
#include "UI/GameInfoCache.h"
|
||||
#include "UI/GPUDriverTestScreen.h"
|
||||
|
@ -808,6 +810,9 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
|
|||
SetGPUBackend((GPUBackend) g_Config.iGPUBackend);
|
||||
renderCounter = 0;
|
||||
|
||||
// Initialize retro achievements runtime.
|
||||
Achievements::Initialize();
|
||||
|
||||
// Must be done restarting by now.
|
||||
restarting = false;
|
||||
}
|
||||
|
@ -1368,6 +1373,8 @@ bool NativeIsRestarting() {
|
|||
}
|
||||
|
||||
void NativeShutdown() {
|
||||
Achievements::Shutdown();
|
||||
|
||||
if (g_screenManager) {
|
||||
g_screenManager->shutdown();
|
||||
delete g_screenManager;
|
||||
|
|
|
@ -346,7 +346,7 @@ void GamePauseScreen::CreateViews() {
|
|||
return UI::EVENT_DONE;
|
||||
});
|
||||
}
|
||||
if (g_Config.bEnableRetroAchievements) {
|
||||
if (g_Config.bAchievementsEnable) {
|
||||
rightColumnItems->Add(new Choice(pa->T("Achievements")))->OnClick.Add([&](UI::EventParams &e) {
|
||||
screenManager()->push(new RetroAchievementsListScreen(gamePath_));
|
||||
return UI::EVENT_DONE;
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
#include "RA_Interface.h"
|
||||
#endif
|
||||
|
||||
// Temporarily get rid of some compile errors, wanna do this last
|
||||
// Actually might be better to just make this a full blown wrapper.
|
||||
// Simply wrap our current HTTP backend.
|
||||
// Which will need replacement anyway for HTTPS...
|
||||
namespace Common {
|
||||
class HTTPDownloader {
|
||||
public:
|
||||
|
@ -54,17 +54,38 @@ namespace Common {
|
|||
}
|
||||
class Request {
|
||||
public:
|
||||
typedef std::vector<uint8_t> Data;
|
||||
typedef std::string Data;
|
||||
typedef std::function<void(s32 status_code, std::string content_type, Data data)> Callback;
|
||||
};
|
||||
|
||||
void PollRequests() {}
|
||||
void WaitForAllRequests() {}
|
||||
void CreateRequest(std::string &&url, Request::Callback &&callback) {}
|
||||
void CreatePostRequest(std::string &&url, const char *post_data, Request::Callback &&callback);
|
||||
void PollRequests() {
|
||||
downloader_.Update();
|
||||
}
|
||||
void WaitForAllRequests() {
|
||||
downloader_.WaitForAll();
|
||||
}
|
||||
void CreateRequest(std::string &&url, Request::Callback &&callback) {
|
||||
Request::Callback movedCallback = std::move(callback);
|
||||
downloader_.StartDownloadWithCallback(url, Path(), [=](http::Download &download) {
|
||||
std::string data;
|
||||
download.buffer().TakeAll(&data);
|
||||
movedCallback(download.ResultCode(), "", data);
|
||||
});
|
||||
}
|
||||
void CreatePostRequest(std::string &&url, const char *post_data, Request::Callback &&callback) {
|
||||
Request::Callback movedCallback = std::move(callback);
|
||||
std::string post_data_str(post_data);
|
||||
downloader_.AsyncPostWithCallback(url, post_data_str, "application/x-www-form-urlencoded", [=](http::Download &download) {
|
||||
std::string data;
|
||||
download.buffer().TakeAll(&data);
|
||||
movedCallback(download.ResultCode(), "", data);
|
||||
});
|
||||
}
|
||||
|
||||
private:
|
||||
HTTPDownloader() {}
|
||||
|
||||
http::Downloader downloader_;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
@ -74,9 +95,21 @@ void OSDAddToast(float duration_s, const std::string &text) {
|
|||
}
|
||||
void OSDAddNotification(float duration_s, const std::string &title, const std::string &summary, const std::string &iconImageData) {}
|
||||
|
||||
void OSDOpenBackgroundProgressDialog(const char *str_id, std::string message, s32 min, s32 max, s32 value);
|
||||
void OSDUpdateBackgroundProgressDialog(const char *str_id, std::string message, s32 min, s32 max, s32 value);
|
||||
void OSDCloseBackgroundProgressDialog(const char *str_id);
|
||||
void OSDOpenBackgroundProgressDialog(const char *str_id, std::string message, s32 min, s32 max, s32 value) {
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Progress dialog opened: %s %s", str_id, message.c_str());
|
||||
}
|
||||
void OSDUpdateBackgroundProgressDialog(const char *str_id, std::string message, s32 min, s32 max, s32 value) {
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Progress dialog updated: %s %s %f/(%f->%f)", str_id, message.c_str(), value, min, max);
|
||||
}
|
||||
void OSDCloseBackgroundProgressDialog(const char *str_id) {
|
||||
NOTICE_LOG(ACHIEVEMENTS, "Progress dialog closed: %s", str_id);
|
||||
}
|
||||
|
||||
namespace Host {
|
||||
void OnAchievementsRefreshed() {
|
||||
System_PostUIMessage("achievements_refreshed", "");
|
||||
}
|
||||
}
|
||||
|
||||
namespace Achievements {
|
||||
|
||||
|
@ -507,7 +540,7 @@ void Achievements::Initialize()
|
|||
s_logged_in = (!s_username.empty() && !s_api_token.empty());
|
||||
|
||||
// if (System::IsValid())
|
||||
GameChanged();
|
||||
// GameChanged();
|
||||
}
|
||||
|
||||
void Achievements::UpdateSettings()
|
||||
|
@ -1035,7 +1068,7 @@ void Achievements::DownloadImage(std::string url, std::string cache_filename)
|
|||
if (status_code != HTTP_OK)
|
||||
return;
|
||||
|
||||
if (!File::WriteDataToFile(false, data.data(), data.size(), Path(cache_filename))) {
|
||||
if (!File::WriteDataToFile(false, data.data(), (int)data.size(), Path(cache_filename))) {
|
||||
ERROR_LOG(ACHIEVEMENTS, "Failed to write badge image to '%s'", cache_filename.c_str());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ void UpdateSettings();
|
|||
/// Called when the system is being reset. If it returns false, the reset should be aborted.
|
||||
bool ConfirmSystemReset();
|
||||
|
||||
/// Called when the system is being shut down. If Shutdown() returns false, the shutdown should be aborted.
|
||||
/// Called when the system is being shut down. If Shutdown() returns false, the shutdown should be aborted if possible.
|
||||
bool Shutdown();
|
||||
|
||||
/// Called when the system is being paused and resumed.
|
||||
|
@ -176,9 +176,3 @@ void ActivateMenuItem(int item);
|
|||
} // namespace RAIntegration
|
||||
#endif
|
||||
} // namespace Achievements
|
||||
|
||||
/// Functions implemented in the frontend.
|
||||
namespace Host {
|
||||
void OnAchievementsRefreshed();
|
||||
void OnAchievementsChallengeModeChanged();
|
||||
} // namespace Host
|
||||
|
|
|
@ -111,6 +111,9 @@
|
|||
<ProjectReference Include="..\ext\discord-rpc-build\discord-rpc.vcxproj">
|
||||
<Project>{beb0a821-3c7f-410f-a525-63afbc69bf8f}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ext\rcheevos-build\rcheevos.vcxproj">
|
||||
<Project>{31694510-a8c0-40f6-b09b-e8df825adefa}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}</ProjectGuid>
|
||||
|
|
|
@ -5,14 +5,15 @@ MinimumVisualStudioVersion = 10.0.40219.1
|
|||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPSSPPWindows", "PPSSPP.vcxproj", "{567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{004B8D11-2BE3-4BD9-AB40-2BE04CF2096F} = {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}
|
||||
{D8A71225-178B-424E-96C1-CC3BE2C1B047} = {D8A71225-178B-424E-96C1-CC3BE2C1B047}
|
||||
{129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} = {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}
|
||||
{31694510-A8C0-40F6-B09B-E8DF825ADEFA} = {31694510-A8C0-40F6-B09B-E8DF825ADEFA}
|
||||
{3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE} = {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}
|
||||
{3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195}
|
||||
{457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED}
|
||||
{533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36}
|
||||
{8BFD8150-94D5-4BF9-8A50-7BD9929A0850} = {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}
|
||||
{D8A71225-178B-424E-96C1-CC3BE2C1B047} = {D8A71225-178B-424E-96C1-CC3BE2C1B047}
|
||||
{F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34}
|
||||
{3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE} = {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}
|
||||
{457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED}
|
||||
{3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\Common\Common.vcxproj", "{3FCDBAE2-5103-4350-9A8E-848CE9C73195}"
|
||||
|
@ -25,28 +26,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\ext\zlib\zlib.vc
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPU", "..\GPU\GPU.vcxproj", "{457F45D2-556F-47BC-A31D-AFF0D15BEAED}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195}
|
||||
{4328A62C-F1E9-47ED-B816-A1A81DAF4363} = {4328A62C-F1E9-47ED-B816-A1A81DAF4363}
|
||||
{8BFD8150-94D5-4BF9-8A50-7BD9929A0850} = {8BFD8150-94D5-4BF9-8A50-7BD9929A0850}
|
||||
{3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Core", "..\Core\Core.vcxproj", "{533F1D30-D04D-47CC-AD71-20F658907E36}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} = {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}
|
||||
{F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34}
|
||||
{457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED}
|
||||
{3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195}
|
||||
{457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED}
|
||||
{F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPSSPPHeadless", "..\headless\Headless.vcxproj", "{EE9BD869-CAA3-447D-8328-294D90DE2C1F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D8A71225-178B-424E-96C1-CC3BE2C1B047} = {D8A71225-178B-424E-96C1-CC3BE2C1B047}
|
||||
{129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} = {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}
|
||||
{533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36}
|
||||
{F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34}
|
||||
{3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE} = {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}
|
||||
{457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED}
|
||||
{3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195}
|
||||
{457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED}
|
||||
{533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36}
|
||||
{D8A71225-178B-424E-96C1-CC3BE2C1B047} = {D8A71225-178B-424E-96C1-CC3BE2C1B047}
|
||||
{F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libkirk", "..\ext\libkirk\libkirk.vcxproj", "{3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}"
|
||||
|
@ -54,17 +55,18 @@ EndProject
|
|||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "..\unittest\UnitTests.vcxproj", "{37CBC214-7CE7-4655-B619-F7CEE16E3313}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{004B8D11-2BE3-4BD9-AB40-2BE04CF2096F} = {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}
|
||||
{D8A71225-178B-424E-96C1-CC3BE2C1B047} = {D8A71225-178B-424E-96C1-CC3BE2C1B047}
|
||||
{129E5E2B-39C1-4D84-96FE-DFD22DBB4A25} = {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}
|
||||
{533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36}
|
||||
{D8A71225-178B-424E-96C1-CC3BE2C1B047} = {D8A71225-178B-424E-96C1-CC3BE2C1B047}
|
||||
{F761046E-6C38-4428-A5F1-38391A37BB34} = {F761046E-6C38-4428-A5F1-38391A37BB34}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UI", "..\UI\UI.vcxproj", "{004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36}
|
||||
{457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED}
|
||||
{31694510-A8C0-40F6-B09B-E8DF825ADEFA} = {31694510-A8C0-40F6-B09B-E8DF825ADEFA}
|
||||
{3FCDBAE2-5103-4350-9A8E-848CE9C73195} = {3FCDBAE2-5103-4350-9A8E-848CE9C73195}
|
||||
{457F45D2-556F-47BC-A31D-AFF0D15BEAED} = {457F45D2-556F-47BC-A31D-AFF0D15BEAED}
|
||||
{533F1D30-D04D-47CC-AD71-20F658907E36} = {533F1D30-D04D-47CC-AD71-20F658907E36}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libarmips", "..\ext\libarmips.vcxproj", "{129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}"
|
||||
|
|
|
@ -123,6 +123,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>../rcheevos/include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -140,6 +141,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>../rcheevos/include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -157,6 +159,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>../rcheevos/include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -174,6 +177,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<AdditionalIncludeDirectories>../rcheevos/include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
|
Loading…
Add table
Reference in a new issue