diff --git a/core/nullDC.cpp b/core/nullDC.cpp index 7af6f04db..225438e7d 100755 --- a/core/nullDC.cpp +++ b/core/nullDC.cpp @@ -26,6 +26,7 @@ #include "hw/sh4/dyna/blockmanager.h" #include "log/LogManager.h" #include "cheats.h" +#include "rend/CustomTexture.h" void FlushCache(); void LoadCustom(); @@ -919,12 +920,6 @@ void LoadSettings(bool game_specific) settings.dispmanx.Keep_Aspect = cfgLoadBool(game_specific ? cfgGetGameId() : "dispmanx", "maintain_aspect", settings.dispmanx.Keep_Aspect); #endif -#if (HOST_OS != OS_LINUX || defined(__ANDROID__) || defined(TARGET_PANDORA)) - settings.aica.BufferSize=2048; -#else - settings.aica.BufferSize=1024; -#endif - #if USE_OMX settings.omx.Audio_Latency = cfgLoadInt(game_specific ? cfgGetGameId() : "omx", "audio_latency", settings.omx.Audio_Latency); settings.omx.Audio_HDMI = cfgLoadBool(game_specific ? cfgGetGameId() : "omx", "audio_hdmi", settings.omx.Audio_HDMI); @@ -1218,6 +1213,7 @@ void dc_loadstate() data_ptr = data ; + custom_texture.Terminate(); #if FEAT_AREC == DYNAREC_JIT FlushCache(); #endif diff --git a/core/rend/CustomTexture.cpp b/core/rend/CustomTexture.cpp index 6b8b419b3..c1519336c 100644 --- a/core/rend/CustomTexture.cpp +++ b/core/rend/CustomTexture.cpp @@ -30,6 +30,7 @@ // TODO Move this out of gles.cpp u8* loadPNGData(const string& subpath, int &width, int &height); +CustomTexture custom_texture; void CustomTexture::LoaderThread() { diff --git a/core/rend/CustomTexture.h b/core/rend/CustomTexture.h index 1550995d0..0f3537082 100644 --- a/core/rend/CustomTexture.h +++ b/core/rend/CustomTexture.h @@ -34,17 +34,17 @@ public: u8* LoadCustomTexture(u32 hash, int& width, int& height); void LoadCustomTextureAsync(BaseTextureCacheData *texture_data); void DumpTexture(u32 hash, int w, int h, TextureType textype, void *temp_tex_buffer); + void Terminate(); private: bool Init(); - void Terminate(); void LoaderThread(); std::string GetGameId(); static void *loader_thread_func(void *param) { ((CustomTexture *)param)->LoaderThread(); return NULL; } - bool initialized; - bool custom_textures_available; + bool initialized = false; + bool custom_textures_available = false; std::string textures_path; std::set unknown_hashes; #ifndef TARGET_NO_THREADS @@ -54,3 +54,5 @@ private: std::vector work_queue; cMutex work_queue_mutex; }; + +extern CustomTexture custom_texture; diff --git a/core/rend/TexCache.cpp b/core/rend/TexCache.cpp index 0aa54a268..02ed1669f 100644 --- a/core/rend/TexCache.cpp +++ b/core/rend/TexCache.cpp @@ -438,8 +438,6 @@ static const TextureType PAL_TYPE[4] = { TextureType::_5551, TextureType::_565, TextureType::_4444, TextureType::_8888 }; -static CustomTexture custom_texture; - void BaseTextureCacheData::PrintTextureName() { char str[512];