MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetLocaleTemperatureFormat

Function GetLocaleTemperatureFormat

src/openrct2/platform/Platform.Posix.cpp:342–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340 }
341
342 TemperatureUnit GetLocaleTemperatureFormat()
343 {
344 // LC_MEASUREMENT is GNU specific.
345 #ifdef LC_MEASUREMENT
346 const char* langstring = setlocale(LC_MEASUREMENT, "");
347 #else
348 const char* langstring = setlocale(LC_ALL, "");
349 #endif
350
351 if (langstring != nullptr)
352 {
353 if (!fnmatch("*_US*", langstring, 0) || !fnmatch("*_BS*", langstring, 0) || !fnmatch("*_BZ*", langstring, 0)
354 || !fnmatch("*_PW*", langstring, 0))
355 {
356 return TemperatureUnit::fahrenheit;
357 }
358 }
359 return TemperatureUnit::celsius;
360 }
361
362 bool ProcessIsElevated()
363 {

Callers 1

ReadGeneralFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected