Pioneer
OS.h
Go to the documentation of this file.
1 // Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2 // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3 
4 #ifndef _OS_H
5 #define _OS_H
6 /*
7  * Operating system specific functionality, such as
8  * raising a message dialog
9  */
10 
11 #include <string>
12 
13 namespace OS {
14 
15  void NotifyLoadBegin();
16  void NotifyLoadEnd();
17 
18  const char *GetIconFilename();
19 
20  // Enable and disable floating point exceptions. Disabled is usually default.
21  void EnableFPE();
22  void DisableFPE();
23 
24  // http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine
25  uint32_t GetNumCores();
26 
27  // return a string describing the operating system that the game is running on, useful!
28  const std::string GetOSInfoString();
29 
30  // return a two-character language code detected from the OS environment
31  // If the OS environment language cannot be detected, returns "en"
32  const std::string GetUserLangCode();
33 
34  // Enable Google breakpad for crash minidumps
35  void EnableBreakpad();
36 
37  // Open the Explorer/Finder/etc
38  bool SupportsFolderBrowser();
39  void OpenUserFolderBrowser();
40 
41  // Mark application as DPI-aware
42  void SetDPIAware();
43 } // namespace OS
44 
45 #endif
Definition: OS.h:13
void SetDPIAware()
Definition: OSPosix.cpp:131
void EnableBreakpad()
Definition: OSPosix.cpp:113
void DisableFPE()
Definition: OSPosix.cpp:49
const char * GetIconFilename()
Definition: OSPosix.cpp:34
void EnableFPE()
Definition: OSPosix.cpp:39
const std::string GetOSInfoString()
Definition: OSPosix.cpp:84
const std::string GetUserLangCode()
Definition: OSPosix.cpp:106
void OpenUserFolderBrowser()
Definition: OSPosix.cpp:124
bool SupportsFolderBrowser()
Definition: OSPosix.cpp:119
void NotifyLoadEnd()
Definition: OSPosix.cpp:30
uint32_t GetNumCores()
Definition: OSPosix.cpp:56
void NotifyLoadBegin()
Definition: OSPosix.cpp:26