| 119 | static float s_perf_sum_gpu_usage = 0.0f; |
| 120 | |
| 121 | bool 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 | |
| 164 | void Host::CommitBaseSettingChanges() |
| 165 | { |
nothing calls this directly
no test coverage detected