mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 00:03:37 +01:00
When what we need is a shared_ptr, we should just go ahead and use one.
One of the top crashes reported in the Play Console is a ManagedTexture crash, so seeing if this might help.
This commit is contained in:
1 parent
60378a0dcb
commit
df6ce90c84
16 files changed
+73
-81
No files matched your search
+3
-4
@@ -175,7 +175,7 @@ private:
|
||||
};
|
||||
|
||||
void GameButton::Draw(UIContext &dc) {
|
||||
GameInfo *ginfo = g_gameInfoCache->GetInfo(dc.GetDrawContext(), gamePath_, 0);
|
||||
std::shared_ptr<GameInfo> ginfo = g_gameInfoCache->GetInfo(dc.GetDrawContext(), gamePath_, 0);
|
||||
Draw::Texture *texture = 0;
|
||||
u32 color = 0, shadowColor = 0;
|
||||
using namespace UI;
|
||||
@@ -1008,7 +1008,7 @@ void MainScreen::DrawBackground(UIContext &dc) {
|
||||
bool MainScreen::DrawBackgroundFor(UIContext &dc, const std::string &gamePath, float progress) {
|
||||
dc.Flush();
|
||||
|
||||
GameInfo *ginfo = 0;
|
||||
std::shared_ptr<GameInfo> ginfo;
|
||||
if (!gamePath.empty()) {
|
||||
ginfo = g_gameInfoCache->GetInfo(dc.GetDrawContext(), gamePath, GAMEINFO_WANTBG);
|
||||
// Loading texture data may bind a texture.
|
||||
@@ -1042,8 +1042,7 @@ UI::EventReturn MainScreen::OnGameSelected(UI::EventParams &e) {
|
||||
#else
|
||||
std::string path = e.s;
|
||||
#endif
|
||||
GameInfo *ginfo = 0;
|
||||
ginfo = g_gameInfoCache->GetInfo(nullptr, path, GAMEINFO_WANTBG);
|
||||
std::shared_ptr<GameInfo> ginfo = g_gameInfoCache->GetInfo(nullptr, path, GAMEINFO_WANTBG);
|
||||
if (ginfo && ginfo->fileType == IdentifiedFileType::PSP_SAVEDATA_DIRECTORY) {
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user