mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Framedump test screen. Downloads a list of framedumps.
This commit is contained in:
1 parent
ce2e47f353
commit
e15064b2fc
5 files changed
+63
-3
No files matched your search
@@ -24,6 +24,7 @@
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/GPU/OpenGL/GLFeatures.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Net/HTTPClient.h"
|
||||
#include "Common/UI/Context.h"
|
||||
#include "Common/UI/View.h"
|
||||
#include "Common/UI/ViewGroup.h"
|
||||
@@ -1105,3 +1106,37 @@ void ShaderViewScreen::CreateViews() {
|
||||
|
||||
layout->Add(new Button(di->T("Back")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
}
|
||||
|
||||
const std::string framedumpsBaseUrl = "http://framedumps.ppsspp.org/";
|
||||
|
||||
FrameDumpTestScreen::FrameDumpTestScreen() {
|
||||
|
||||
}
|
||||
|
||||
FrameDumpTestScreen::~FrameDumpTestScreen() {
|
||||
g_DownloadManager.CancelAll();
|
||||
}
|
||||
|
||||
void FrameDumpTestScreen::CreateViews() {
|
||||
for (auto &file : files_) {
|
||||
std::string url = framedumpsBaseUrl + file;
|
||||
}
|
||||
}
|
||||
|
||||
void FrameDumpTestScreen::update() {
|
||||
if (!listing_) {
|
||||
listing_ = g_DownloadManager.StartDownload(framedumpsBaseUrl, "");
|
||||
}
|
||||
|
||||
if (listing_ && listing_->Done() && files_.empty()) {
|
||||
if (listing_->ResultCode() == 200) {
|
||||
std::string listingHtml;
|
||||
listing_->buffer().TakeAll(&listingHtml);
|
||||
INFO_LOG(COMMON, "Listing: %s", listingHtml.c_str());
|
||||
} else {
|
||||
// something went bad. Too lazy to make UI, so let's just finish this screen.
|
||||
TriggerFinish(DialogResult::DR_CANCEL);
|
||||
}
|
||||
RecreateViews();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user