mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 02:52:30 +02:00
Android: Invalidate Picasso screenshot cache every time a screenshot is displayed.
This commit is contained in:
parent
a028805626
commit
8ca620db7f
@ -127,13 +127,6 @@ public final class MainActivity extends AppCompatActivity implements LoaderManag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onResume()
|
|
||||||
{
|
|
||||||
super.onResume();
|
|
||||||
mAdapter.notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu)
|
public boolean onCreateOptionsMenu(Menu menu)
|
||||||
{
|
{
|
||||||
|
@ -79,9 +79,13 @@ public final class GameAdapter extends RecyclerView.Adapter<GameViewHolder> impl
|
|||||||
{
|
{
|
||||||
if (mCursor.moveToPosition(position))
|
if (mCursor.moveToPosition(position))
|
||||||
{
|
{
|
||||||
|
String screenPath = mCursor.getString(GameDatabase.GAME_COLUMN_SCREENSHOT_PATH);
|
||||||
|
Picasso.with(holder.imageScreenshot.getContext())
|
||||||
|
.invalidate(screenPath);
|
||||||
|
|
||||||
// Fill in the view contents.
|
// Fill in the view contents.
|
||||||
Picasso.with(holder.imageScreenshot.getContext())
|
Picasso.with(holder.imageScreenshot.getContext())
|
||||||
.load(mCursor.getString(GameDatabase.GAME_COLUMN_SCREENSHOT_PATH))
|
.load(screenPath)
|
||||||
.fit()
|
.fit()
|
||||||
.centerCrop()
|
.centerCrop()
|
||||||
.error(R.drawable.no_banner)
|
.error(R.drawable.no_banner)
|
||||||
|
@ -678,10 +678,10 @@ void SaveScreenShot(std::string name)
|
|||||||
SetState(CORE_PAUSE);
|
SetState(CORE_PAUSE);
|
||||||
|
|
||||||
const std::string& gameId = SConfig::GetInstance().GetUniqueID();
|
const std::string& gameId = SConfig::GetInstance().GetUniqueID();
|
||||||
std::string path = File::GetUserPath(D_SCREENSHOTS_IDX) + gameId + DIR_SEP_CHR;
|
|
||||||
|
|
||||||
name = StringFromFormat("%s%s.png", path.c_str(), name.c_str());
|
std::string filePath = File::GetUserPath(D_SCREENSHOTS_IDX) + gameId + DIR_SEP_CHR + name + ".png";
|
||||||
g_video_backend->Video_Screenshot(name);
|
|
||||||
|
g_video_backend->Video_Screenshot(filePath);
|
||||||
|
|
||||||
if (!bPaused)
|
if (!bPaused)
|
||||||
SetState(CORE_RUN);
|
SetState(CORE_RUN);
|
||||||
|
Loading…
Reference in New Issue
Block a user