mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
9417fc6a3a
After3a83ebc
, the Show System Clock feature started using the unfortunate combination of MM/DD/YY dates (rare outside of the US) and 24-hour time (rare in the US) regardless of the user's locale settings. This commit makes it use the configured locale again. I've noticed one minor difference in behavior between now and before3a83ebc
: The new way of setting the C/C++ locale seems to treat "en" as "en-US", but the wx way of setting the C locale treated it as "en-GB" (at least on Windows).
37 lines
845 B
C++
37 lines
845 B
C++
// Copyright 2014 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
|
#include <X11/extensions/Xrandr.h>
|
|
#endif
|
|
|
|
namespace UICommon
|
|
{
|
|
void Init();
|
|
void Shutdown();
|
|
|
|
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
|
void EnableScreenSaver(Display* display, Window win, bool enable);
|
|
#else
|
|
void EnableScreenSaver(bool enable);
|
|
#endif
|
|
|
|
// Calls std::locale::global, selecting a fallback locale if the
|
|
// requested locale isn't available
|
|
void SetLocale(std::string locale_name);
|
|
|
|
void CreateDirectories();
|
|
void SetUserDirectory(const std::string& custom_path);
|
|
|
|
bool TriggerSTMPowerEvent();
|
|
|
|
void SaveWiimoteSources();
|
|
|
|
// Return a pretty file size string from byte count.
|
|
// e.g. 1134278 -> "1.08 MiB"
|
|
std::string FormatSize(u64 bytes);
|
|
} // namespace UICommon
|