Use SDL locale

This commit is contained in:
2024-12-28 13:31:37 +02:00
committed by Ari Vuollet
parent 006d261d6c
commit b56edeb956
6 changed files with 43 additions and 6 deletions

View File

@@ -690,11 +690,13 @@ bool WindowsPlatform::Init()
DWORD tmp;
Char buffer[256];
#if !PLATFORM_SDL
// Get user locale string
if (GetUserDefaultLocaleName(buffer, LOCALE_NAME_MAX_LENGTH))
{
UserLocale = String(buffer);
}
#endif
// Get computer name string
if (GetComputerNameW(buffer, &tmp))
@@ -871,6 +873,7 @@ BatteryInfo WindowsPlatform::GetBatteryInfo()
return info;
}
#if !PLATFORM_SDL
int32 WindowsPlatform::GetDpi()
{
return SystemDpi;
@@ -880,6 +883,7 @@ String WindowsPlatform::GetUserLocaleName()
{
return UserLocale;
}
#endif
String WindowsPlatform::GetComputerName()
{
@@ -1250,12 +1254,10 @@ int32 WindowsPlatform::CreateProcess(CreateProcessSettings& settings)
}
#if !PLATFORM_SDL
Window* WindowsPlatform::CreateWindow(const CreateWindowSettings& settings)
{
return New<WindowsWindow>(settings);
}
#endif
void* WindowsPlatform::LoadLibrary(const Char* filename)