Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash a bit (see #12594.)
This commit is contained in:
parent
a4ba5d4859
commit
5009698cc0
54 changed files with 244 additions and 240 deletions
|
@ -135,7 +135,7 @@ void MainThreadFunc() {
|
|||
if (g_Config.sFailedGPUBackends.find("ALL") != std::string::npos) {
|
||||
Reporting::ReportMessage("Graphics init error: %s", "ALL");
|
||||
|
||||
I18NCategory *err = GetI18NCategory("Error");
|
||||
auto err = GetI18NCategory("Error");
|
||||
const char *defaultErrorAll = "Failed initializing any graphics. Try upgrading your graphics drivers.";
|
||||
const char *genericError = err->T("GenericAllGraphicsError", defaultErrorAll);
|
||||
std::wstring title = ConvertUTF8ToWString(err->T("GenericGraphicsError", "Graphics Error"));
|
||||
|
@ -163,7 +163,7 @@ void MainThreadFunc() {
|
|||
W32Util::ExitAndRestart();
|
||||
}
|
||||
|
||||
I18NCategory *err = GetI18NCategory("Error");
|
||||
auto err = GetI18NCategory("Error");
|
||||
Reporting::ReportMessage("Graphics init error: %s", error_string.c_str());
|
||||
|
||||
const char *defaultErrorVulkan = "Failed initializing graphics. Try upgrading your graphics drivers.\n\nWould you like to try switching to OpenGL?\n\nError message:";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue