mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +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;
|
||||||
using SixLabors.ImageSharp.Formats.Png;
|
using SixLabors.ImageSharp.Formats.Png;
|
||||||
using SixLabors.ImageSharp.PixelFormats;
|
using SixLabors.ImageSharp.PixelFormats;
|
||||||
|
using DalamudUtil = Dalamud.Utility.Util;
|
||||||
using Image = SixLabors.ImageSharp.Image;
|
using Image = SixLabors.ImageSharp.Image;
|
||||||
|
|
||||||
namespace Penumbra.Import.Textures;
|
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 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)
|
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}" );
|
throw new Exception( $"Could not create the requested {numMips} mip maps, maybe retry with the top-right checkbox unchecked:\n{ec}" );
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ using Penumbra.Interop.Resolver;
|
||||||
using Penumbra.Mods;
|
using Penumbra.Mods;
|
||||||
using Action = System.Action;
|
using Action = System.Action;
|
||||||
using CharacterUtility = Penumbra.Interop.CharacterUtility;
|
using CharacterUtility = Penumbra.Interop.CharacterUtility;
|
||||||
|
using DalamudUtil = Dalamud.Utility.Util;
|
||||||
using ResidentResourceManager = Penumbra.Interop.ResidentResourceManager;
|
using ResidentResourceManager = Penumbra.Interop.ResidentResourceManager;
|
||||||
|
|
||||||
namespace Penumbra;
|
namespace Penumbra;
|
||||||
|
|
@ -367,6 +368,7 @@ public class Penumbra : IDalamudPlugin
|
||||||
sb.Append( $"> **`Commit Hash: `** {CommitHash}\n" );
|
sb.Append( $"> **`Commit Hash: `** {CommitHash}\n" );
|
||||||
sb.Append( $"> **`Enable Mods: `** {Config.EnableMods}\n" );
|
sb.Append( $"> **`Enable Mods: `** {Config.EnableMods}\n" );
|
||||||
sb.Append( $"> **`Enable HTTP API: `** {Config.EnableHttpApi}\n" );
|
sb.Append( $"> **`Enable HTTP API: `** {Config.EnableHttpApi}\n" );
|
||||||
|
sb.Append( $"> **`Operating System: `** {( DalamudUtil.IsLinux() ? "Mac/Linux (Wine)" : "Windows" )}\n" );
|
||||||
sb.Append( $"> **`Root Directory: `** `{Config.ModDirectory}`, {( exists ? "Exists" : "Not Existing" )}\n" );
|
sb.Append( $"> **`Root Directory: `** `{Config.ModDirectory}`, {( exists ? "Exists" : "Not Existing" )}\n" );
|
||||||
sb.Append( $"> **`Free Drive Space: `** {( drive != null ? Functions.HumanReadableSize( drive.AvailableFreeSpace ) : "Unknown" )}\n" );
|
sb.Append( $"> **`Free Drive Space: `** {( drive != null ? Functions.HumanReadableSize( drive.AvailableFreeSpace ) : "Unknown" )}\n" );
|
||||||
sb.Append( $"> **`Auto-Deduplication: `** {Config.AutoDeduplicateOnImport}\n" );
|
sb.Append( $"> **`Auto-Deduplication: `** {Config.AutoDeduplicateOnImport}\n" );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue