MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / UpdateEmuFolders

Method UpdateEmuFolders

pcsx2/VMManager.cpp:863–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

861}
862
863void VMManager::Internal::UpdateEmuFolders()
864{
865 const std::string old_cheats_directory(EmuFolders::Cheats);
866 const std::string old_patches_directory(EmuFolders::Patches);
867 const std::string old_memcards_directory(EmuFolders::MemoryCards);
868 const std::string old_textures_directory(EmuFolders::Textures);
869 const std::string old_videos_directory(EmuFolders::Videos);
870
871 auto lock = Host::GetSettingsLock();
872 EmuFolders::LoadConfig(*Host::Internal::GetBaseSettingsLayer());
873 EmuFolders::EnsureFoldersExist();
874
875 if (VMManager::HasValidVM())
876 {
877 if (EmuFolders::Cheats != old_cheats_directory || EmuFolders::Patches != old_patches_directory)
878 Patch::ReloadPatches(s_disc_serial, s_current_crc, true, false, true, true);
879
880 if (EmuFolders::MemoryCards != old_memcards_directory)
881 {
882 std::string memcardFilters = "";
883 if (const GameDatabaseSchema::GameEntry* game = GameDatabase::findGame(s_disc_serial))
884 {
885 memcardFilters = game->memcardFiltersAsString();
886 }
887
888 AutoEject::SetAll();
889
890 if (!GSDumpReplayer::IsReplayingDump())
891 FileMcd_Reopen(memcardFilters.empty() ? s_disc_serial : memcardFilters);
892 }
893
894 if (EmuFolders::Textures != old_textures_directory)
895 {
896 MTGS::RunOnGSThread([]() {
897 if (VMManager::HasValidVM())
898 GSTextureReplacements::ReloadReplacementMap();
899 });
900 }
901
902 if (EmuFolders::Videos != old_videos_directory)
903 {
904 if (VMManager::HasValidVM())
905 MTGS::RunOnGSThread(&GSEndCapture);
906 }
907 }
908}
909
910void VMManager::RequestDisplaySize(float scale /*= 0.0f*/)
911{

Callers

nothing calls this directly

Calls 3

FileMcd_ReopenFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected