mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-26 11:45:26 +00:00
Merge pull request #9766 from unknownbrackets/screenshot
Fix Take Screenshot
This commit is contained in:
commit
dba22e255a
@ -19,6 +19,7 @@
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/MemMap.h"
|
||||
|
@ -954,6 +954,10 @@ bool SoftGPU::GetCurrentFramebuffer(GPUDebugBuffer &buffer, GPUDebugFramebufferT
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SoftGPU::GetOutputFramebuffer(GPUDebugBuffer &buffer) {
|
||||
return GetCurrentFramebuffer(buffer, GPU_DBG_FRAMEBUF_DISPLAY, 1);
|
||||
}
|
||||
|
||||
bool SoftGPU::GetCurrentDepthbuffer(GPUDebugBuffer &buffer)
|
||||
{
|
||||
const int w = gstate.getRegionX2() - gstate.getRegionX1() + 1;
|
||||
|
@ -85,6 +85,7 @@ public:
|
||||
}
|
||||
|
||||
bool GetCurrentFramebuffer(GPUDebugBuffer &buffer, GPUDebugFramebufferType type, int maxRes = -1) override;
|
||||
bool GetOutputFramebuffer(GPUDebugBuffer &buffer) override;
|
||||
bool GetCurrentDepthbuffer(GPUDebugBuffer &buffer) override;
|
||||
bool GetCurrentStencilbuffer(GPUDebugBuffer &buffer) override;
|
||||
bool GetCurrentTexture(GPUDebugBuffer &buffer, int level) override;
|
||||
|
@ -743,27 +743,25 @@ void TakeScreenshot() {
|
||||
void RenderOverlays(UIContext *dc, void *userdata) {
|
||||
// Thin bar at the top of the screen like Chrome.
|
||||
std::vector<float> progress = g_DownloadManager.GetCurrentProgress();
|
||||
if (progress.empty()) {
|
||||
return;
|
||||
}
|
||||
if (!progress.empty()) {
|
||||
static const uint32_t colors[4] = {
|
||||
0xFFFFFFFF,
|
||||
0xFFCCCCCC,
|
||||
0xFFAAAAAA,
|
||||
0xFF777777,
|
||||
};
|
||||
|
||||
static const uint32_t colors[4] = {
|
||||
0xFFFFFFFF,
|
||||
0xFFCCCCCC,
|
||||
0xFFAAAAAA,
|
||||
0xFF777777,
|
||||
};
|
||||
|
||||
dc->Begin();
|
||||
int h = 5;
|
||||
for (size_t i = 0; i < progress.size(); i++) {
|
||||
float barWidth = 10 + (dc->GetBounds().w - 10) * progress[i];
|
||||
Bounds bounds(0, h * i, barWidth, h);
|
||||
UI::Drawable solid(colors[i & 3]);
|
||||
dc->FillRect(solid, bounds);
|
||||
dc->Begin();
|
||||
int h = 5;
|
||||
for (size_t i = 0; i < progress.size(); i++) {
|
||||
float barWidth = 10 + (dc->GetBounds().w - 10) * progress[i];
|
||||
Bounds bounds(0, h * i, barWidth, h);
|
||||
UI::Drawable solid(colors[i & 3]);
|
||||
dc->FillRect(solid, bounds);
|
||||
}
|
||||
dc->End();
|
||||
dc->Flush();
|
||||
}
|
||||
dc->End();
|
||||
dc->Flush();
|
||||
|
||||
if (g_TakeScreenshot) {
|
||||
TakeScreenshot();
|
||||
|
Loading…
x
Reference in New Issue
Block a user