Fix some texture stuff.

This commit is contained in:
Ottermandias 2022-08-09 22:12:40 +02:00
parent 8fdd173388
commit c0542d0e94
4 changed files with 6 additions and 49 deletions

View file

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Numerics;
using System.Reflection;
using System.Threading.Tasks;
using Dalamud.Interface;
using Dalamud.Interface.ImGuiFileDialog;
@ -165,16 +164,6 @@ public partial class ModEditWindow
{
try
{
if( fromDisk )
{
var tmp = new TmpTexFile();
using var stream = File.OpenRead( path );
using var br = new BinaryReader( stream );
tmp.Load(br);
return (tmp.RgbaData, tmp.Header.Width, tmp.Header.Height);
}
var tex = fromDisk ? Dalamud.GameData.GameData.GetFileFromDisk< TexFile >( path ) : Dalamud.GameData.GetFile< TexFile >( path );
if( tex == null )
{