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

Method InitializeConfig

pcsx2-gsrunner/Main.cpp:121–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119static float s_perf_sum_gpu_usage = 0.0f;
120
121bool GSRunner::InitializeConfig()
122{
123 EmuFolders::SetAppRoot();
124 if (!EmuFolders::SetResourcesDirectory() || !EmuFolders::SetDataDirectory(nullptr))
125 return false;
126
127 CrashHandler::SetWriteDirectory(EmuFolders::DataRoot);
128
129 const char* error;
130 if (!VMManager::PerformEarlyHardwareChecks(&error))
131 return false;
132
133 {
134 const std::string roboto_path =
135 EmuFolders::GetOverridableResourcePath("fonts" FS_OSPATH_SEPARATOR_STR "Roboto-Regular.ttf");
136 const auto roboto_data = FileSystem::MapBinaryFileForRead(roboto_path.c_str());
137 if (roboto_data.empty())
138 {
139 Console.ErrorFmt("Failed to load font file '{}'.", roboto_path);
140 return false;
141 }
142
143 std::vector<ImGuiManager::FontInfo> fonts;
144 ImGuiManager::FontInfo fi{};
145 fi.data = roboto_data;
146 fi.exclude_ranges = {};
147 fi.face_name = nullptr;
148 fi.is_emoji_font = false;
149 fonts.push_back(fi);
150
151 ImGuiManager::SetFonts(std::move(fonts));
152 }
153
154 // don't provide an ini path, or bother loading. we'll store everything in memory.
155 MemorySettingsInterface& si = s_settings_interface;
156 Host::Internal::SetBaseSettingsLayer(&si);
157
158 VMManager::SetDefaultSettings(si, true, true, true, true, true);
159
160 VMManager::Internal::LoadStartupSettings();
161 return true;
162}
163
164void Host::CommitBaseSettingChanges()
165{

Callers

nothing calls this directly

Calls 6

MapBinaryFileForReadFunction · 0.85
c_strMethod · 0.45
emptyMethod · 0.45
ErrorFmtMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected