2014-10-04 22:12:15 +03:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2021-07-05 04:22:19 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2014-10-04 22:12:15 +03:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-04-14 17:42:54 +03:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2014-10-04 22:12:15 +03:00
|
|
|
namespace UICommon
|
|
|
|
{
|
|
|
|
void Init();
|
|
|
|
void Shutdown();
|
|
|
|
|
2021-02-03 02:25:06 +02:00
|
|
|
#ifdef HAVE_X11
|
2020-10-18 21:06:11 +03:00
|
|
|
void InhibitScreenSaver(unsigned long win, bool enable);
|
2018-01-01 23:03:50 +02:00
|
|
|
#else
|
2020-10-18 21:06:11 +03:00
|
|
|
void InhibitScreenSaver(bool enable);
|
2018-01-01 23:03:50 +02:00
|
|
|
#endif
|
|
|
|
|
2017-07-21 13:46:12 +03:00
|
|
|
// Calls std::locale::global, selecting a fallback locale if the
|
|
|
|
// requested locale isn't available
|
|
|
|
void SetLocale(std::string locale_name);
|
|
|
|
|
2014-10-04 22:12:15 +03:00
|
|
|
void CreateDirectories();
|
2021-11-22 04:44:33 +02:00
|
|
|
void SetUserDirectory(std::string custom_path);
|
2014-10-04 22:12:15 +03:00
|
|
|
|
2017-06-24 22:41:53 +03:00
|
|
|
bool TriggerSTMPowerEvent();
|
|
|
|
|
2017-05-09 19:49:10 +03:00
|
|
|
void SaveWiimoteSources();
|
2017-12-31 21:33:36 +02:00
|
|
|
|
|
|
|
// Return a pretty file size string from byte count.
|
|
|
|
// e.g. 1134278 -> "1.08 MiB"
|
2020-04-10 16:14:03 +03:00
|
|
|
std::string FormatSize(u64 bytes, int decimals = 2);
|
2014-10-04 22:12:15 +03:00
|
|
|
} // namespace UICommon
|