Framedump test screen. Downloads a list of framedumps.
This commit is contained in:
parent
ce2e47f353
commit
e15064b2fc
5 changed files with 63 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Net/HTTPClient.h"
|
||||
#include "Common/UI/UIScreen.h"
|
||||
|
||||
#include "UI/MiscScreens.h"
|
||||
|
@ -181,5 +182,18 @@ private:
|
|||
DebugShaderType type_;
|
||||
};
|
||||
|
||||
class FrameDumpTestScreen : public UIScreenWithBackground {
|
||||
public:
|
||||
FrameDumpTestScreen();
|
||||
~FrameDumpTestScreen();
|
||||
|
||||
void CreateViews() override;
|
||||
void update() override;
|
||||
|
||||
private:
|
||||
std::vector<std::string> files_;
|
||||
std::shared_ptr<http::Download> listing_;
|
||||
};
|
||||
|
||||
void DrawProfile(UIContext &ui);
|
||||
const char *GetCompilerABI();
|
||||
|
|
|
@ -1643,6 +1643,7 @@ void DeveloperToolsScreen::CreateViews() {
|
|||
if (g_Config.iGPUBackend == (int)GPUBackend::VULKAN || g_Config.iGPUBackend == (int)GPUBackend::OPENGL) {
|
||||
list->Add(new Choice(dev->T("GPU Driver Test")))->OnClick.Handle(this, &DeveloperToolsScreen::OnGPUDriverTest);
|
||||
}
|
||||
list->Add(new Choice(dev->T("Framedump tests")))->OnClick.Handle(this, &DeveloperToolsScreen::OnFramedumpTest);
|
||||
list->Add(new Choice(dev->T("Touchscreen Test")))->OnClick.Handle(this, &DeveloperToolsScreen::OnTouchscreenTest);
|
||||
|
||||
allowDebugger_ = !WebServerStopped(WebServerFlags::DEBUGGER);
|
||||
|
@ -1752,6 +1753,11 @@ UI::EventReturn DeveloperToolsScreen::OnGPUDriverTest(UI::EventParams &e) {
|
|||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnFramedumpTest(UI::EventParams &e) {
|
||||
screenManager()->push(new FrameDumpTestScreen());
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnTouchscreenTest(UI::EventParams &e) {
|
||||
screenManager()->push(new TouchTestScreen());
|
||||
return UI::EVENT_DONE;
|
||||
|
|
|
@ -178,6 +178,7 @@ private:
|
|||
UI::EventReturn OnJitDebugTools(UI::EventParams &e);
|
||||
UI::EventReturn OnRemoteDebugger(UI::EventParams &e);
|
||||
UI::EventReturn OnGPUDriverTest(UI::EventParams &e);
|
||||
UI::EventReturn OnFramedumpTest(UI::EventParams &e);
|
||||
UI::EventReturn OnTouchscreenTest(UI::EventParams &e);
|
||||
UI::EventReturn OnCopyStatesToRoot(UI::EventParams &e);
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
<ClCompile Include="InstallZipScreen.cpp">
|
||||
<Filter>Screens</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Store.cpp" />
|
||||
<ClCompile Include="BackgroundAudio.cpp" />
|
||||
<ClCompile Include="ReportScreen.cpp">
|
||||
<Filter>Screens</Filter>
|
||||
|
@ -76,6 +75,9 @@
|
|||
<ClCompile Include="ChatScreen.cpp">
|
||||
<Filter>Screens</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Store.cpp">
|
||||
<Filter>Screens</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="GameInfoCache.h" />
|
||||
|
@ -120,7 +122,6 @@
|
|||
<ClInclude Include="InstallZipScreen.h">
|
||||
<Filter>Screens</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Store.h" />
|
||||
<ClInclude Include="BackgroundAudio.h" />
|
||||
<ClInclude Include="ReportScreen.h">
|
||||
<Filter>Screens</Filter>
|
||||
|
@ -153,6 +154,9 @@
|
|||
<ClInclude Include="ChatScreen.h">
|
||||
<Filter>Screens</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Store.h">
|
||||
<Filter>Screens</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Screens">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue