mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
GameInfoCache: Don't expose the workqueue.
Was unused anyway.
This commit is contained in:
1 parent
f4a6d291e1
commit
e2e1c677cb
6 files changed
+8
-14
No files matched your search
+1
-1
@@ -1078,7 +1078,7 @@ void EmuScreen::CreateViews() {
|
||||
chatButton_ = nullptr;
|
||||
}
|
||||
|
||||
saveStatePreview_ = new AsyncImageFileView("", IS_FIXED, nullptr, new AnchorLayoutParams(bounds.centerX(), 100, NONE, NONE, true));
|
||||
saveStatePreview_ = new AsyncImageFileView("", IS_FIXED, new AnchorLayoutParams(bounds.centerX(), 100, NONE, NONE, true));
|
||||
saveStatePreview_->SetFixedSize(160, 90);
|
||||
saveStatePreview_->SetColor(0x90FFFFFF);
|
||||
saveStatePreview_->SetVisibility(V_GONE);
|
||||
|
||||
@@ -170,8 +170,6 @@ public:
|
||||
std::shared_ptr<GameInfo> GetInfo(Draw::DrawContext *draw, const std::string &gamePath, int wantFlags);
|
||||
void FlushBGs(); // Gets rid of all BG textures. Also gets rid of bg sounds.
|
||||
|
||||
PrioritizedWorkQueue *WorkQueue() { return gameInfoWQ_; }
|
||||
|
||||
void CancelAll();
|
||||
void WaitUntilDone(std::shared_ptr<GameInfo> &info);
|
||||
|
||||
|
||||
+3
-4
@@ -48,7 +48,7 @@
|
||||
#include "UI/OnScreenDisplay.h"
|
||||
#include "UI/GameInfoCache.h"
|
||||
|
||||
AsyncImageFileView::AsyncImageFileView(const std::string &filename, UI::ImageSizeMode sizeMode, PrioritizedWorkQueue *wq, UI::LayoutParams *layoutParams)
|
||||
AsyncImageFileView::AsyncImageFileView(const std::string &filename, UI::ImageSizeMode sizeMode, UI::LayoutParams *layoutParams)
|
||||
: UI::Clickable(layoutParams), canFocus_(true), filename_(filename), color_(0xFFFFFFFF), sizeMode_(sizeMode), textureFailed_(false), fixedSizeW_(0.0f), fixedSizeH_(0.0f) {}
|
||||
|
||||
AsyncImageFileView::~AsyncImageFileView() {}
|
||||
@@ -179,7 +179,7 @@ protected:
|
||||
UI::LinearLayout *content = new UI::LinearLayout(UI::ORIENT_VERTICAL);
|
||||
parent->Add(content);
|
||||
UI::Margins contentMargins(10, 0);
|
||||
content->Add(new AsyncImageFileView(filename_, UI::IS_KEEP_ASPECT, nullptr, new UI::LinearLayoutParams(480, 272, contentMargins)))->SetCanBeFocused(false);
|
||||
content->Add(new AsyncImageFileView(filename_, UI::IS_KEEP_ASPECT, new UI::LinearLayoutParams(480, 272, contentMargins)))->SetCanBeFocused(false);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -230,10 +230,9 @@ SaveSlotView::SaveSlotView(const std::string &gameFilename, int slot, UI::Layout
|
||||
using namespace UI;
|
||||
|
||||
screenshotFilename_ = SaveState::GenerateSaveSlotFilename(gamePath_, slot, SaveState::SCREENSHOT_EXTENSION);
|
||||
PrioritizedWorkQueue *wq = g_gameInfoCache->WorkQueue();
|
||||
Add(new Spacer(5));
|
||||
|
||||
AsyncImageFileView *fv = Add(new AsyncImageFileView(screenshotFilename_, IS_DEFAULT, wq, new UI::LayoutParams(82 * 2, 47 * 2)));
|
||||
AsyncImageFileView *fv = Add(new AsyncImageFileView(screenshotFilename_, IS_DEFAULT, new UI::LayoutParams(82 * 2, 47 * 2)));
|
||||
fv->SetOverlayText(StringFromFormat("%d", slot_ + 1));
|
||||
|
||||
auto pa = GetI18NCategory("Pause");
|
||||
|
||||
+1
-3
@@ -58,13 +58,11 @@ private:
|
||||
std::string gamePath_;
|
||||
};
|
||||
|
||||
class PrioritizedWorkQueue;
|
||||
|
||||
// AsyncImageFileView loads a texture from a file, and reloads it as necessary.
|
||||
// TODO: Actually make async, doh.
|
||||
class AsyncImageFileView : public UI::Clickable {
|
||||
public:
|
||||
AsyncImageFileView(const std::string &filename, UI::ImageSizeMode sizeMode, PrioritizedWorkQueue *wq, UI::LayoutParams *layoutParams = 0);
|
||||
AsyncImageFileView(const std::string &filename, UI::ImageSizeMode sizeMode, UI::LayoutParams *layoutParams = 0);
|
||||
~AsyncImageFileView();
|
||||
|
||||
void GetContentDimensionsBySpec(const UIContext &dc, UI::MeasureSpec horiz, UI::MeasureSpec vert, float &w, float &h) const override;
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@ void ReportScreen::CreateViews() {
|
||||
|
||||
if (tookScreenshot_ && !screenshotFilename_.empty()) {
|
||||
leftColumnItems->Add(new CheckBox(&includeScreenshot_, rp->T("FeedbackIncludeScreen", "Include a screenshot")))->SetEnabledPtr(&enableReporting_);
|
||||
screenshot_ = leftColumnItems->Add(new AsyncImageFileView(screenshotFilename_, IS_KEEP_ASPECT, nullptr, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(12, 0))));
|
||||
screenshot_ = leftColumnItems->Add(new AsyncImageFileView(screenshotFilename_, IS_KEEP_ASPECT, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(12, 0))));
|
||||
} else {
|
||||
if (tookScreenshot_) {
|
||||
includeScreenshot_ = false;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "Common/Math/curves.h"
|
||||
#include "Common/System/NativeApp.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Thread/PrioritizedWorkQueue.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
#include "Common/UI/Context.h"
|
||||
#include "Common/UI/View.h"
|
||||
#include "Common/UI/ViewGroup.h"
|
||||
@@ -114,8 +114,7 @@ public:
|
||||
} else {
|
||||
std::string image_path = ReplaceAll(savePath_, ".ppst", ".jpg");
|
||||
if (File::Exists(image_path)) {
|
||||
PrioritizedWorkQueue *wq = g_gameInfoCache->WorkQueue();
|
||||
toprow->Add(new AsyncImageFileView(image_path, IS_KEEP_ASPECT, wq, new LinearLayoutParams(480, 272, Margins(10, 0))));
|
||||
toprow->Add(new AsyncImageFileView(image_path, IS_KEEP_ASPECT, new LinearLayoutParams(480, 272, Margins(10, 0))));
|
||||
} else {
|
||||
toprow->Add(new TextView(sa->T("No screenshot"), new LinearLayoutParams(Margins(10, 5))))->SetTextColor(textStyle.fgColor);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user