mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 08:17:59 +01:00
Fix mipmap generation on Wine (Mac/Linux)
This commit is contained in:
parent
bb805345b1
commit
bdef7a5118
2 changed files with 4 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ using OtterTex;
|
|||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.Formats.Png;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using DalamudUtil = Dalamud.Utility.Util;
|
||||
using Image = SixLabors.ImageSharp.Image;
|
||||
|
||||
namespace Penumbra.Import.Textures;
|
||||
|
|
@ -137,7 +138,7 @@ public partial class CombinedTexture : IDisposable
|
|||
}
|
||||
|
||||
var numMips = Math.Min( 13, 1 + BitOperations.Log2( ( uint )Math.Max( input.Meta.Width, input.Meta.Height ) ) );
|
||||
var ec = input.GenerateMipMaps( out var ret, numMips, FilterFlags.SeparateAlpha );
|
||||
var ec = input.GenerateMipMaps( out var ret, numMips, ( DalamudUtil.IsLinux() ? FilterFlags.ForceNonWIC : 0 ) | FilterFlags.SeparateAlpha );
|
||||
if (ec != ErrorCode.Ok)
|
||||
{
|
||||
throw new Exception( $"Could not create the requested {numMips} mip maps, maybe retry with the top-right checkbox unchecked:\n{ec}" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue