mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Set console's default language/country/region based on computer settings
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
|
||||
#include <QAbstractEventDispatcher>
|
||||
#include <QApplication>
|
||||
#include <QLocale>
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
@ -95,6 +96,17 @@ void Host::ResizeSurface(int new_width, int new_height)
|
||||
g_renderer->ResizeSurface();
|
||||
}
|
||||
|
||||
std::vector<std::string> Host_GetPreferredLocales()
|
||||
{
|
||||
const QStringList ui_languages = QLocale::system().uiLanguages();
|
||||
std::vector<std::string> converted_languages(ui_languages.size());
|
||||
|
||||
for (int i = 0; i < ui_languages.size(); ++i)
|
||||
converted_languages[i] = ui_languages[i].toStdString();
|
||||
|
||||
return converted_languages;
|
||||
}
|
||||
|
||||
void Host_Message(HostMessageID id)
|
||||
{
|
||||
if (id == HostMessageID::WMUserStop)
|
||||
|
Reference in New Issue
Block a user