2020-01-05 20:40:18 +00:00
|
|
|
#ifndef __I_SYSTEM__
|
|
|
|
#define __I_SYSTEM__
|
|
|
|
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
|
|
|
|
#if defined(__sun) || defined(__sun__) || defined(__SRV4) || defined(__srv4__)
|
|
|
|
#define __solaris__ 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <thread>
|
|
|
|
#include <algorithm>
|
2020-01-07 00:11:19 +00:00
|
|
|
#include "tarray.h"
|
|
|
|
#include "zstring.h"
|
2020-01-05 20:40:18 +00:00
|
|
|
|
|
|
|
struct ticcmd_t;
|
|
|
|
struct WadStuff;
|
|
|
|
|
|
|
|
#ifndef SHARE_DIR
|
|
|
|
#define SHARE_DIR "/usr/local/share/"
|
|
|
|
#endif
|
|
|
|
|
2020-04-23 19:18:40 +00:00
|
|
|
void CalculateCPUSpeed(void);
|
2020-01-05 20:40:18 +00:00
|
|
|
|
|
|
|
// Return a seed value for the RNG.
|
|
|
|
unsigned int I_MakeRNGSeed();
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-23 20:58:02 +00:00
|
|
|
void I_StartFrame (void);
|
2020-01-05 20:40:18 +00:00
|
|
|
|
2020-04-23 20:58:02 +00:00
|
|
|
void I_StartTic (void);
|
2020-01-05 20:40:18 +00:00
|
|
|
|
|
|
|
// Print a console string
|
|
|
|
void I_PrintStr (const char *str);
|
|
|
|
|
|
|
|
// Set the title string of the startup window
|
|
|
|
void I_SetIWADInfo ();
|
|
|
|
|
|
|
|
// Pick from multiple IWADs to use
|
|
|
|
int I_PickIWad (WadStuff *wads, int numwads, bool queryiwad, int defaultiwad);
|
|
|
|
|
|
|
|
// [RH] Checks the registry for Steam's install path, so we can scan its
|
|
|
|
// directories for IWADs if the user purchased any through Steam.
|
|
|
|
TArray<FString> I_GetSteamPath();
|
|
|
|
|
|
|
|
TArray<FString> I_GetGogPaths();
|
|
|
|
|
2021-09-22 08:20:39 +00:00
|
|
|
TArray<FString> I_GetBethesdaPath();
|
|
|
|
|
2020-01-05 20:40:18 +00:00
|
|
|
// The ini could not be saved at exit
|
|
|
|
bool I_WriteIniFailed ();
|
|
|
|
|
2020-05-25 21:59:07 +00:00
|
|
|
class FGameTexture;
|
|
|
|
bool I_SetCursor(FGameTexture *);
|
2020-01-05 20:40:18 +00:00
|
|
|
|
|
|
|
static inline char *strlwr(char *str)
|
|
|
|
{
|
|
|
|
char *ptr = str;
|
|
|
|
while(*ptr)
|
|
|
|
{
|
|
|
|
*ptr = tolower(*ptr);
|
|
|
|
++ptr;
|
|
|
|
}
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline int I_GetNumaNodeCount() { return 1; }
|
2021-10-30 09:38:55 +00:00
|
|
|
inline int I_GetNumaNodeThreadCount(int numaNode) { return std::max<int>(std::thread::hardware_concurrency(), 1); }
|
2020-01-05 20:40:18 +00:00
|
|
|
inline void I_SetThreadNumaNode(std::thread &thread, int numaNode) { }
|
|
|
|
|
2022-08-26 16:28:22 +00:00
|
|
|
FString I_GetCWD();
|
|
|
|
bool I_ChDir(const char* path);
|
|
|
|
void I_OpenShellFolder(const char*);
|
|
|
|
|
2020-01-05 20:40:18 +00:00
|
|
|
#endif
|