void TextureFilterHandler::init() { if (isInited()) return; m_inited = config.textureFilter.txFilterMode | config.textureFilter.txEnhancementMode | config.textureFilter.txHiresEnable; if (m_inited == 0) return; m_options = _getConfigOptions(); s32 maxTextureSize = gfxContext.getMaxTextureSize(); wchar_t wRomName[32]; ::mbstowcs(wRomName, RSP.romname, 32); wchar_t txPath[PLUGIN_PATH_SIZE + 16]; wchar_t * pTexPackPath = config.textureFilter.txPath; if (::wcslen(config.textureFilter.txPath) == 0) { api().GetUserDataPath(txPath); gln_wcscat(txPath, wst("/hires_texture")); pTexPackPath = txPath; } wchar_t txCachePath[PLUGIN_PATH_SIZE]; api().GetUserCachePath(txCachePath); m_inited = txfilter_init(maxTextureSize, // max texture width supported by hardware maxTextureSize, // max texture height supported by hardware 32, // max texture bpp supported by hardware m_options, config.textureFilter.txCacheSize, // cache texture to system memory txCachePath, // path to store cache files pTexPackPath, // path to texture packs folder wRomName, // name of ROM. must be no longer than 256 characters displayLoadProgress); }
boolean ext_ghq_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize, wchar_t *path, wchar_t *ident, dispInfoFuncExt callback) { boolean bRet = 0; bRet = txfilter_init(maxwidth, maxheight, maxbpp, options, cachesize, path, ident, callback); return bRet; }
bool ext_ghq_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize, const char *path, const char *ident, dispInfoFuncExt callback) { return txfilter_init(maxwidth, maxheight, maxbpp, options, cachesize, path, ident, callback); }