diff --git a/Core/Config.cpp b/Core/Config.cpp index 0c8fdfdd82..60ff66631c 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -794,7 +794,6 @@ static ConfigSetting graphicsSettings[] = { static ConfigSetting soundSettings[] = { ConfigSetting("Enable", &g_Config.bEnableSound, true, true, true), ConfigSetting("AudioBackend", &g_Config.iAudioBackend, 0, true, true), - ConfigSetting("AudioLatency", &g_Config.iAudioLatency, 1, true, true), ConfigSetting("ExtraAudioBuffering", &g_Config.bExtraAudioBuffering, false, true, false), ConfigSetting("AudioResampler", &g_Config.bAudioResampler, true, true, true), ConfigSetting("GlobalVolume", &g_Config.iGlobalVolume, VOLUME_MAX, true, true), diff --git a/Core/Config.h b/Core/Config.h index ac4e8b73c2..bc719ae38c 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -221,7 +221,6 @@ public: // Sound bool bEnableSound; - int iAudioLatency; // 0 = low , 1 = medium(default) , 2 = high int iAudioBackend; int iGlobalVolume, iSASVolume, iATRACMP3Volume; int iAltSpeedVolume; diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index b6e7179ea1..31573526ad 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -53,12 +53,6 @@ AudioDebugStats g_AudioDebugStats; // atomic locks are used on the lock. TODO: make this lock-free std::atomic_flag atomicLock_; -enum latency { - LOW_LATENCY = 0, - MEDIUM_LATENCY = 1, - HIGH_LATENCY = 2, -}; - int eventAudioUpdate = -1; int eventHostAudioUpdate = -1; int mixFrequency = 44100; @@ -110,27 +104,10 @@ void __AudioInit() { mixFrequency = 44100; srcFrequency = 0; - switch (g_Config.iAudioLatency) { - case LOW_LATENCY: - chanQueueMaxSizeFactor = 1; - chanQueueMinSizeFactor = 1; - hwBlockSize = 16; - hostAttemptBlockSize = 256; - break; - case MEDIUM_LATENCY: - chanQueueMaxSizeFactor = 2; - chanQueueMinSizeFactor = 1; - hwBlockSize = 64; - hostAttemptBlockSize = 512; - break; - case HIGH_LATENCY: - chanQueueMaxSizeFactor = 4; - chanQueueMinSizeFactor = 2; - hwBlockSize = 64; - hostAttemptBlockSize = 512; - break; - - } + chanQueueMaxSizeFactor = 2; + chanQueueMinSizeFactor = 1; + hwBlockSize = 64; + hostAttemptBlockSize = 512; __AudioCPUMHzChange(); diff --git a/Core/MIPS/IR/IRInterpreter.cpp b/Core/MIPS/IR/IRInterpreter.cpp index 052cf9a01c..9a4e491228 100644 --- a/Core/MIPS/IR/IRInterpreter.cpp +++ b/Core/MIPS/IR/IRInterpreter.cpp @@ -708,7 +708,7 @@ u32 IRInterpret(MIPSState *mips, const IRInst *inst, int count) { mips->f[inst->dest] = mips->f[inst->src1] - mips->f[inst->src2]; break; case IROp::FMul: - if ((my_isinf(mips->f[inst->src1]) && mips->f[inst->src2] == 0.0f) || (mips->f[inst->src1] == 0.0f && my_isinf(mips->f[inst->src2]))) { + if ((my_isinf(mips->f[inst->src1]) && mips->f[inst->src2] == 0.0f) || (my_isinf(mips->f[inst->src2]) && mips->f[inst->src1] == 0.0f)) { mips->fi[inst->dest] = 0x7fc00000; } else { mips->f[inst->dest] = mips->f[inst->src1] * mips->f[inst->src2]; diff --git a/Core/MIPS/MIPSInt.cpp b/Core/MIPS/MIPSInt.cpp index 3bd274d270..93372391c8 100644 --- a/Core/MIPS/MIPSInt.cpp +++ b/Core/MIPS/MIPSInt.cpp @@ -975,7 +975,7 @@ namespace MIPSInt case 0: F(fd) = F(fs) + F(ft); break; // add.s case 1: F(fd) = F(fs) - F(ft); break; // sub.s case 2: // mul.s - if ((my_isinf(F(fs)) && F(ft) == 0.0f) || (F(fs) == 0.0f && my_isinf(F(ft)))) { + if ((my_isinf(F(fs)) && F(ft) == 0.0f) || (my_isinf(F(ft)) && F(fs) == 0.0f)) { // Must be positive NAN, see #12519. FI(fd) = 0x7fc00000; } else { diff --git a/GPU/GLES/DepalettizeShaderGLES.cpp b/GPU/GLES/DepalettizeShaderGLES.cpp index 821371a794..5abe33d77c 100644 --- a/GPU/GLES/DepalettizeShaderGLES.cpp +++ b/GPU/GLES/DepalettizeShaderGLES.cpp @@ -54,8 +54,10 @@ void main() { DepalShaderCacheGLES::DepalShaderCacheGLES(Draw::DrawContext *draw) { _assert_(draw); render_ = (GLRenderManager *)draw->GetNativeObject(Draw::NativeObject::RENDER_MANAGER); - // Pre-build the vertex program useGL3_ = gl_extensions.GLES3 || gl_extensions.VersionGEThan(3, 3); +} + +void DepalShaderCacheGLES::Init() { if (!gstate_c.Supports(GPU_SUPPORTS_32BIT_INT_FSHADER)) { // Use the floating point path, it just can't handle the math. useGL3_ = false; diff --git a/GPU/GLES/DepalettizeShaderGLES.h b/GPU/GLES/DepalettizeShaderGLES.h index 9030d7c504..4368780ebd 100644 --- a/GPU/GLES/DepalettizeShaderGLES.h +++ b/GPU/GLES/DepalettizeShaderGLES.h @@ -49,6 +49,7 @@ public: // This also uploads the palette and binds the correct texture. DepalShader *GetDepalettizeShader(uint32_t clutMode, GEBufferFormat pixelFormat); GLRTexture *GetClutTexture(GEPaletteFormat clutFormat, const u32 clutHash, u32 *rawClut); + void Init(); void Clear(); void Decimate(); std::vector DebugGetShaderIDs(DebugShaderType type); diff --git a/GPU/GLES/GPU_GLES.cpp b/GPU/GLES/GPU_GLES.cpp index d21b583997..b956fcabbf 100644 --- a/GPU/GLES/GPU_GLES.cpp +++ b/GPU/GLES/GPU_GLES.cpp @@ -75,6 +75,7 @@ GPU_GLES::GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw) framebufferManagerGL_->SetTextureCache(textureCacheGL_); framebufferManagerGL_->SetShaderManager(shaderManagerGL_); framebufferManagerGL_->SetDrawEngine(&drawEngine_); + depalShaderCache_.Init(); textureCacheGL_->SetFramebufferManager(framebufferManagerGL_); textureCacheGL_->SetDepalShaderCache(&depalShaderCache_); textureCacheGL_->SetShaderManager(shaderManagerGL_); diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 1499cfc909..c580f77b39 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -575,9 +575,6 @@ void GameSettingsScreen::CreateViews() { audioSettings->Add(new CheckBox(&g_Config.bAutoAudioDevice, a->T("Switch on new audio device"))); #endif - static const char *latency[] = { "Low", "Medium", "High" }; - PopupMultiChoice *lowAudio = audioSettings->Add(new PopupMultiChoice(&g_Config.iAudioLatency, a->T("Audio Latency"), latency, 0, ARRAY_SIZE(latency), gr->GetName(), screenManager())); - lowAudio->SetEnabledPtr(&g_Config.bEnableSound); //#if defined(__ANDROID__) CheckBox *extraAudio = audioSettings->Add(new CheckBox(&g_Config.bExtraAudioBuffering, a->T("AudioBufferingForBluetooth", "Bluetooth-friendly buffer (slower)"))); extraAudio->SetEnabledPtr(&g_Config.bEnableSound); diff --git a/build.gradle b/build.gradle index 17457e9c80..40261aa712 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.6.1' + classpath 'com.android.tools.build:gradle:3.6.2' } } diff --git a/headless/Headless.cpp b/headless/Headless.cpp index bc89e04209..790fb463b7 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -394,7 +394,6 @@ int main(int argc, const char* argv[]) g_Config.bHighQualityDepth = true; g_Config.bMemStickInserted = true; g_Config.bFragmentTestCache = true; - g_Config.iAudioLatency = 1; g_Config.bEnableWlan = true; g_Config.sMACAddress = "12:34:56:78:9A:BC"; diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index ea277d64b6..4df14d381a 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -170,7 +170,6 @@ static RetroOption ppsspp_rendering_mode("ppsspp_rendering_mode", "Renderin static RetroOption ppsspp_auto_frameskip("ppsspp_auto_frameskip", "Auto Frameskip", false); static RetroOption ppsspp_frameskip("ppsspp_frameskip", "Frameskip", 0, 10); static RetroOption ppsspp_frameskiptype("ppsspp_frameskiptype", "Frameskip Type", 0, 10); -static RetroOption ppsspp_audio_latency("ppsspp_audio_latency", "Audio latency", { "low", "medium", "high" }); static RetroOption ppsspp_internal_resolution("ppsspp_internal_resolution", "Internal Resolution (restart)", 1, { "480x272", "960x544", "1440x816", "1920x1088", "2400x1360", "2880x1632", "3360x1904", "3840x2176", "4320x2448", "4800x2720" }); static RetroOption ppsspp_button_preference("ppsspp_button_preference", "Confirmation Button", { { "cross", PSP_SYSTEMPARAM_BUTTON_CROSS }, { "circle", PSP_SYSTEMPARAM_BUTTON_CIRCLE } }); static RetroOption ppsspp_fast_memory("ppsspp_fast_memory", "Fast Memory (Speedhack)", true); @@ -196,7 +195,6 @@ void retro_set_environment(retro_environment_t cb) { vars.push_back(ppsspp_auto_frameskip.GetOptions()); vars.push_back(ppsspp_frameskip.GetOptions()); vars.push_back(ppsspp_frameskiptype.GetOptions()); - vars.push_back(ppsspp_audio_latency.GetOptions()); vars.push_back(ppsspp_internal_resolution.GetOptions()); vars.push_back(ppsspp_button_preference.GetOptions()); vars.push_back(ppsspp_fast_memory.GetOptions()); @@ -265,7 +263,6 @@ static void check_variables(CoreParameter &coreParam) { ppsspp_gpu_hardware_transform.Update(&g_Config.bHardwareTransform); ppsspp_frameskip.Update(&g_Config.iFrameSkip); ppsspp_frameskiptype.Update(&g_Config.iFrameSkipType); - ppsspp_audio_latency.Update(&g_Config.iAudioLatency); ppsspp_auto_frameskip.Update(&g_Config.bAutoFrameSkip); ppsspp_block_transfer_gpu.Update(&g_Config.bBlockTransferGPU); ppsspp_texture_filtering.Update(&g_Config.iTexFiltering);