mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
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/System/System.h"
|
||||||
#include "Common/GPU/OpenGL/GLFeatures.h"
|
#include "Common/GPU/OpenGL/GLFeatures.h"
|
||||||
#include "Common/Data/Text/I18n.h"
|
#include "Common/Data/Text/I18n.h"
|
||||||
|
#include "Common/Net/HTTPClient.h"
|
||||||
#include "Common/UI/Context.h"
|
#include "Common/UI/Context.h"
|
||||||
#include "Common/UI/View.h"
|
#include "Common/UI/View.h"
|
||||||
#include "Common/UI/ViewGroup.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);
|
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 <vector>
|
||||||
|
|
||||||
#include "Common/Data/Text/I18n.h"
|
#include "Common/Data/Text/I18n.h"
|
||||||
|
#include "Common/Net/HTTPClient.h"
|
||||||
#include "Common/UI/UIScreen.h"
|
#include "Common/UI/UIScreen.h"
|
||||||
|
|
||||||
#include "UI/MiscScreens.h"
|
#include "UI/MiscScreens.h"
|
||||||
|
@ -181,5 +182,18 @@ private:
|
||||||
DebugShaderType type_;
|
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);
|
void DrawProfile(UIContext &ui);
|
||||||
const char *GetCompilerABI();
|
const char *GetCompilerABI();
|
||||||
|
|
|
@ -1643,6 +1643,7 @@ void DeveloperToolsScreen::CreateViews() {
|
||||||
if (g_Config.iGPUBackend == (int)GPUBackend::VULKAN || g_Config.iGPUBackend == (int)GPUBackend::OPENGL) {
|
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("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);
|
list->Add(new Choice(dev->T("Touchscreen Test")))->OnClick.Handle(this, &DeveloperToolsScreen::OnTouchscreenTest);
|
||||||
|
|
||||||
allowDebugger_ = !WebServerStopped(WebServerFlags::DEBUGGER);
|
allowDebugger_ = !WebServerStopped(WebServerFlags::DEBUGGER);
|
||||||
|
@ -1752,6 +1753,11 @@ UI::EventReturn DeveloperToolsScreen::OnGPUDriverTest(UI::EventParams &e) {
|
||||||
return UI::EVENT_DONE;
|
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) {
|
UI::EventReturn DeveloperToolsScreen::OnTouchscreenTest(UI::EventParams &e) {
|
||||||
screenManager()->push(new TouchTestScreen());
|
screenManager()->push(new TouchTestScreen());
|
||||||
return UI::EVENT_DONE;
|
return UI::EVENT_DONE;
|
||||||
|
|
|
@ -178,6 +178,7 @@ private:
|
||||||
UI::EventReturn OnJitDebugTools(UI::EventParams &e);
|
UI::EventReturn OnJitDebugTools(UI::EventParams &e);
|
||||||
UI::EventReturn OnRemoteDebugger(UI::EventParams &e);
|
UI::EventReturn OnRemoteDebugger(UI::EventParams &e);
|
||||||
UI::EventReturn OnGPUDriverTest(UI::EventParams &e);
|
UI::EventReturn OnGPUDriverTest(UI::EventParams &e);
|
||||||
|
UI::EventReturn OnFramedumpTest(UI::EventParams &e);
|
||||||
UI::EventReturn OnTouchscreenTest(UI::EventParams &e);
|
UI::EventReturn OnTouchscreenTest(UI::EventParams &e);
|
||||||
UI::EventReturn OnCopyStatesToRoot(UI::EventParams &e);
|
UI::EventReturn OnCopyStatesToRoot(UI::EventParams &e);
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
<ClCompile Include="InstallZipScreen.cpp">
|
<ClCompile Include="InstallZipScreen.cpp">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Store.cpp" />
|
|
||||||
<ClCompile Include="BackgroundAudio.cpp" />
|
<ClCompile Include="BackgroundAudio.cpp" />
|
||||||
<ClCompile Include="ReportScreen.cpp">
|
<ClCompile Include="ReportScreen.cpp">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
|
@ -76,6 +75,9 @@
|
||||||
<ClCompile Include="ChatScreen.cpp">
|
<ClCompile Include="ChatScreen.cpp">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Store.cpp">
|
||||||
|
<Filter>Screens</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="GameInfoCache.h" />
|
<ClInclude Include="GameInfoCache.h" />
|
||||||
|
@ -120,7 +122,6 @@
|
||||||
<ClInclude Include="InstallZipScreen.h">
|
<ClInclude Include="InstallZipScreen.h">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Store.h" />
|
|
||||||
<ClInclude Include="BackgroundAudio.h" />
|
<ClInclude Include="BackgroundAudio.h" />
|
||||||
<ClInclude Include="ReportScreen.h">
|
<ClInclude Include="ReportScreen.h">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
|
@ -153,6 +154,9 @@
|
||||||
<ClInclude Include="ChatScreen.h">
|
<ClInclude Include="ChatScreen.h">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Store.h">
|
||||||
|
<Filter>Screens</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Screens">
|
<Filter Include="Screens">
|
||||||
|
|
Loading…
Add table
Reference in a new issue