mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 18:21:06 +00:00
- backend update from GZDoom.
mainly TAngle overhaul and needed code adjustments.
This commit is contained in:
parent
ca1171187f
commit
111dbd7a7d
26 changed files with 322 additions and 240 deletions
|
@ -410,6 +410,23 @@ FString I_GetFromClipboard (bool use_primary_selection)
|
|||
return "";
|
||||
}
|
||||
|
||||
FString I_GetCWD()
|
||||
{
|
||||
char* curdir = get_current_dir_name();
|
||||
if (!curdir)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
FString ret(curdir);
|
||||
free(curdir);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool I_ChDir(const char* path)
|
||||
{
|
||||
return chdir(path) == 0;
|
||||
}
|
||||
|
||||
// Return a random seed, preferably one with lots of entropy.
|
||||
unsigned int I_MakeRNGSeed()
|
||||
{
|
||||
|
@ -431,3 +448,21 @@ unsigned int I_MakeRNGSeed()
|
|||
}
|
||||
return seed;
|
||||
}
|
||||
|
||||
void I_OpenShellFolder(const char* infolder)
|
||||
{
|
||||
char* curdir = get_current_dir_name();
|
||||
|
||||
if (!chdir(infolder))
|
||||
{
|
||||
Printf("Opening folder: %s\n", infolder);
|
||||
std::system("xdg-open .");
|
||||
chdir(curdir);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("Unable to open directory '%s\n", infolder);
|
||||
}
|
||||
free(curdir);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue