UICommon.h 762 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2014 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <string>
  5. #include "Common/CommonTypes.h"
  6. struct WindowSystemInfo;
  7. namespace UICommon
  8. {
  9. void Init();
  10. void Shutdown();
  11. void InitControllers(const WindowSystemInfo& wsi);
  12. void ShutdownControllers();
  13. void InhibitScreenSaver(bool inhibit);
  14. // Calls std::locale::global, selecting a fallback locale if the
  15. // requested locale isn't available
  16. void SetLocale(std::string locale_name);
  17. void CreateDirectories();
  18. void SetUserDirectory(std::string custom_path);
  19. bool TriggerSTMPowerEvent();
  20. // Return a pretty file size string from byte count.
  21. // e.g. 1134278 -> "1.08 MiB"
  22. std::string FormatSize(u64 bytes, int decimals = 2);
  23. } // namespace UICommon