Only scale if it needs to be. Checking prevents slight delay in user selection menu.
This commit is contained in:
parent
19f46a7f2c
commit
f18b631fc6
1 changed files with 5 additions and 1 deletions
|
@ -32,7 +32,11 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
using MemoryStream mem = new(buffer);
|
using MemoryStream mem = new(buffer);
|
||||||
var bitmap = new Bitmap(mem).CreateScaledBitmap(new PixelSize(256, 256));
|
var bitmap = new Bitmap(mem);
|
||||||
|
if (bitmap.Size.Width > 256)
|
||||||
|
{
|
||||||
|
bitmap = bitmap.CreateScaledBitmap(new PixelSize(256, 256));
|
||||||
|
}
|
||||||
cache.Set(hash, bitmap, options);
|
cache.Set(hash, bitmap, options);
|
||||||
return bitmap;
|
return bitmap;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue