From 17950c77e2e0898f2c03b4c12a77032e8f2c6bc2 Mon Sep 17 00:00:00 2001 From: R2DLiu Date: Thu, 31 Dec 2020 22:25:20 -0500 Subject: [PATCH] Set some defaults for config. look into music bug --- Source/Core/Core/Config/GraphicsSettings.cpp | 2 +- Source/Core/Core/HW/DVD/DVDInterface.cpp | 2 +- Source/Core/Core/HW/DVD/DVDThread.cpp | 4 ++++ Source/Core/Core/HW/DVD/DVDThread.h | 1 + .../DolphinQt/Config/Graphics/HacksWidget.cpp | 2 ++ Source/Core/DolphinQt/Main.cpp | 2 ++ Source/Core/VideoCommon/BPStructs.cpp | 15 --------------- 7 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Source/Core/Core/Config/GraphicsSettings.cpp b/Source/Core/Core/Config/GraphicsSettings.cpp index 5dbbb938c2..d7d350e1d5 100644 --- a/Source/Core/Core/Config/GraphicsSettings.cpp +++ b/Source/Core/Core/Config/GraphicsSettings.cpp @@ -145,7 +145,7 @@ const Info GFX_HACK_SKIP_EFB_COPY_TO_RAM{{System::GFX, "Hacks", "EFBToText const Info GFX_HACK_SKIP_XFB_COPY_TO_RAM{{System::GFX, "Hacks", "XFBToTextureEnable"}, true}; const Info GFX_HACK_DISABLE_COPY_TO_VRAM{{System::GFX, "Hacks", "DisableCopyToVRAM"}, false}; const Info GFX_HACK_DEFER_EFB_COPIES{{System::GFX, "Hacks", "DeferEFBCopies"}, true}; -const Info GFX_HACK_IMMEDIATE_XFB{{System::GFX, "Hacks", "ImmediateXFBEnable"}, false}; +const Info GFX_HACK_IMMEDIATE_XFB{{System::GFX, "Hacks", "ImmediateXFBEnable"}, true}; const Info GFX_HACK_SKIP_DUPLICATE_XFBS{{System::GFX, "Hacks", "SkipDuplicateXFBs"}, true}; const Info GFX_HACK_COPY_EFB_SCALED{{System::GFX, "Hacks", "EFBScaledCopy"}, true}; const Info GFX_HACK_EFB_EMULATE_FORMAT_CHANGES{ diff --git a/Source/Core/Core/HW/DVD/DVDInterface.cpp b/Source/Core/Core/HW/DVD/DVDInterface.cpp index f1793626d3..fdb36654f0 100644 --- a/Source/Core/Core/HW/DVD/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVD/DVDInterface.cpp @@ -1357,7 +1357,7 @@ static void ScheduleReads(u64 offset, u32 length, const DiscIO::Partition& parti u64 dvd_offset = DVDThread::PartitionOffsetToRawOffset(offset, partition); dvd_offset = Common::AlignDown(dvd_offset, DVD_ECC_BLOCK_SIZE); - if (SConfig::GetInstance().bFastDiscSpeed) + if (SConfig::GetInstance().bFastDiscSpeed) // DVDThread::GetFileName(partition, dvd_offset).find("audio") == std::string::npos { // The SUDTR setting makes us act as if all reads are buffered buffer_start = std::numeric_limits::min(); diff --git a/Source/Core/Core/HW/DVD/DVDThread.cpp b/Source/Core/Core/HW/DVD/DVDThread.cpp index 283052eaea..68ce2f36f9 100644 --- a/Source/Core/Core/HW/DVD/DVDThread.cpp +++ b/Source/Core/Core/HW/DVD/DVDThread.cpp @@ -411,4 +411,8 @@ void ReadFile(std::string& fileName, std::vector& buf) INFO_LOG(SLIPPI, "Failed to open file: %s", fileName.c_str()); } } + +std::string GetFileName(const DiscIO::Partition &partition, u64 offset) { + return s_disc->GetFileSystem(partition)->FindFileInfo(offset)->GetName(); +} } // namespace DVDThread diff --git a/Source/Core/Core/HW/DVD/DVDThread.h b/Source/Core/Core/HW/DVD/DVDThread.h index 5168e3c812..83b1cdcc75 100644 --- a/Source/Core/Core/HW/DVD/DVDThread.h +++ b/Source/Core/Core/HW/DVD/DVDThread.h @@ -62,4 +62,5 @@ void StartReadToEmulatedRAM(u32 output_address, u64 dvd_offset, u32 length, s64 ticks_until_completion); void ReadFile(std::string& fileName, std::vector& buf); +std::string GetFileName(const DiscIO::Partition& partition, u64 offset); } // namespace DVDThread diff --git a/Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp index 6d1ac6b0c3..c5a29e539d 100644 --- a/Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/HacksWidget.cpp @@ -88,6 +88,8 @@ void HacksWidget::CreateWidgets() m_store_xfb_copies = new GraphicsBool(tr("Store XFB Copies to Texture Only"), Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM); m_immediate_xfb = new GraphicsBool(tr("Immediately Present XFB"), Config::GFX_HACK_IMMEDIATE_XFB); + // Don't let people touch this + m_immediate_xfb->setEnabled(false); m_skip_duplicate_xfbs = new GraphicsBool(tr("Skip Presenting Duplicate Frames"), Config::GFX_HACK_SKIP_DUPLICATE_XFBS); diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index 7d7643913f..19c4221df7 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -255,10 +255,12 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine } else { +#ifndef IS_PLAYBACK if (Settings::Instance().IsBootDefaultISO() && !Settings::Instance().GetDefaultGame().isEmpty()) { boot = BootParameters::GenerateFromFile(Settings::Instance().GetDefaultGame().toStdString(), save_state_path); } +#endif MainWindow win{std::move(boot), static_cast(options.get("movie"))}; if (options.is_set("debugger")) diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index e5a47e2fd5..fd2130be9e 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -300,28 +300,13 @@ static void BPWritten(const BPCmd& bp) destAddr, srcRect.left, srcRect.top, srcRect.right, srcRect.bottom, bpmem.copyTexSrcWH.x + 1, destStride, height, yScale); -#ifdef IS_PLAYBACK - bool is_depth_copy = bpmem.zcontrol.pixel_format == PEControl::Z24; - auto one = std::chrono::high_resolution_clock::now(); - g_texture_cache->CopyRenderTargetToTexture( - destAddr, EFBCopyFormat::XFB, copy_width, height, destStride, is_depth_copy, srcRect, - false, false, yScale, s_gammaLUT[PE_copy.gamma], bpmem.triggerEFBCopy.clamp_top, - bpmem.triggerEFBCopy.clamp_bottom, bpmem.copyfilter.GetCoefficients()); - auto two = std::chrono::high_resolution_clock::now(); - WARN_LOG(SLIPPI, "timer: %d", (two - one).count()); -#endif - // This stays in to signal end of a "frame" g_renderer->RenderToXFB(destAddr, srcRect, destStride, height, s_gammaLUT[PE_copy.gamma]); if (g_ActiveConfig.bImmediateXFB) { // below div two to convert from bytes to pixels - it expects width, not stride -#ifdef IS_PLAYBACK g_renderer->Swap(destAddr, destStride / 2, destStride, height, CoreTiming::GetTicks(), s_gammaLUT[PE_copy.gamma], srcRect, bpmem.copyfilter.GetCoefficients(), yScale, bpmem.triggerEFBCopy.clamp_top, bpmem.triggerEFBCopy.clamp_bottom); -#else - g_renderer->Swap(destAddr, destStride / 2, destStride, height, CoreTiming::GetTicks(), s_gammaLUT[PE_copy.gamma], srcRect, bpmem.copyfilter.GetCoefficients(), yScale, bpmem.triggerEFBCopy.clamp_top, bpmem.triggerEFBCopy.clamp_bottom); -#endif } else {