Merge pull request #390 from kogaki/fix/less_32bit_dependencies

Fix not to crash on 32bit modules because of lack of dependencies
This commit is contained in:
shun-iwasawa 2016-06-02 20:31:36 +09:00
commit 28b077c7c6
2 changed files with 11 additions and 3 deletions

View file

@ -85,7 +85,11 @@ if(WIN32)
endif()
endif()
if(PLATFORM EQUAL 32)
_find_toonz_library(TNZLIBS "tnzcore;tnzbase")
else()
_find_toonz_library(TNZLIBS "tnzcore;tnzbase;toonzlib")
endif()
if(WIN32)
set(EXTRA_LIBS

View file

@ -1,9 +1,10 @@
#include "tiio_psd.h"
#include "trasterimage.h"
#include "timageinfo.h"
#if (defined(x64) || defined(__LP64__))
#include "toonz/preferences.h"
#include <QtCore>
#endif
// forward declaration
//class TImageReaderLayerPsd;
@ -39,12 +40,15 @@ TLevelReaderPsd::TLevelReaderPsd(const TFilePath &path)
const QString &layerStr = list.at(1);
#ifdef REF_LAYER_BY_NAME
#if (defined(x64) || defined(__LP64__))
if (layerStr != "frames") {
QTextCodec* layerNameCodec = QTextCodec::codecForName( Preferences::instance()->getLayerNameEncoding().c_str() );
TPSDParser psdparser(m_path);
m_layerId = psdparser.getLevelIdByName(layerNameCodec->fromUnicode(layerStr).toStdString());
} else
} else {
m_layerId = layerStr.toInt();
}
#endif
#else
m_layerId = layerName.toInt();
#endif