mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Replace default home folder name and base filename used for screenshot/gifs
This commit is contained in:
parent
36cd517dce
commit
8e67946a58
2 changed files with 16 additions and 16 deletions
|
|
@ -443,9 +443,9 @@ enum {
|
|||
|
||||
// Name of local directory for config files and savegames
|
||||
#if (((defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON)) && !defined (__CYGWIN__)) && !defined (__APPLE__)
|
||||
#define DEFAULTDIR ".srb2kart"
|
||||
#define DEFAULTDIR ".ringracers"
|
||||
#else
|
||||
#define DEFAULTDIR "srb2kart"
|
||||
#define DEFAULTDIR "ringracers"
|
||||
#endif
|
||||
|
||||
#include "g_state.h"
|
||||
|
|
|
|||
28
src/m_misc.c
28
src/m_misc.c
|
|
@ -697,20 +697,20 @@ static void M_CreateScreenShotPalette(void)
|
|||
#if NUMSCREENS > 2
|
||||
static const char *Newsnapshotfile(const char *pathname, const char *ext)
|
||||
{
|
||||
static char freename[13] = "kartXXXX.ext";
|
||||
static char freename[19] = "ringracersXXXX.ext";
|
||||
int i = 5000; // start in the middle: num screenshots divided by 2
|
||||
int add = i; // how much to add or subtract if wrong; gets divided by 2 each time
|
||||
int result; // -1 = guess too high, 0 = correct, 1 = guess too low
|
||||
|
||||
// find a file name to save it to
|
||||
strcpy(freename+9,ext);
|
||||
strcpy(freename+15,ext);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
freename[4] = (char)('0' + (char)(i/1000));
|
||||
freename[5] = (char)('0' + (char)((i/100)%10));
|
||||
freename[6] = (char)('0' + (char)((i/10)%10));
|
||||
freename[7] = (char)('0' + (char)(i%10));
|
||||
freename[10] = (char)('0' + (char)(i/1000));
|
||||
freename[11] = (char)('0' + (char)((i/100)%10));
|
||||
freename[12] = (char)('0' + (char)((i/10)%10));
|
||||
freename[13] = (char)('0' + (char)(i%10));
|
||||
|
||||
if (FIL_WriteFileOK(va(pandf,pathname,freename))) // access succeeds
|
||||
result = 1; // too low
|
||||
|
|
@ -719,10 +719,10 @@ static const char *Newsnapshotfile(const char *pathname, const char *ext)
|
|||
if (!i)
|
||||
break; // not too high, so it must be equal! YAY!
|
||||
|
||||
freename[4] = (char)('0' + (char)((i-1)/1000));
|
||||
freename[5] = (char)('0' + (char)(((i-1)/100)%10));
|
||||
freename[6] = (char)('0' + (char)(((i-1)/10)%10));
|
||||
freename[7] = (char)('0' + (char)((i-1)%10));
|
||||
freename[10] = (char)('0' + (char)((i-1)/1000));
|
||||
freename[11] = (char)('0' + (char)(((i-1)/100)%10));
|
||||
freename[12] = (char)('0' + (char)(((i-1)/10)%10));
|
||||
freename[13] = (char)('0' + (char)((i-1)%10));
|
||||
if (!FIL_WriteFileOK(va(pandf,pathname,freename))) // access fails
|
||||
result = -1; // too high
|
||||
else
|
||||
|
|
@ -740,10 +740,10 @@ static const char *Newsnapshotfile(const char *pathname, const char *ext)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
freename[4] = (char)('0' + (char)(i/1000));
|
||||
freename[5] = (char)('0' + (char)((i/100)%10));
|
||||
freename[6] = (char)('0' + (char)((i/10)%10));
|
||||
freename[7] = (char)('0' + (char)(i%10));
|
||||
freename[10] = (char)('0' + (char)(i/1000));
|
||||
freename[11] = (char)('0' + (char)((i/100)%10));
|
||||
freename[12] = (char)('0' + (char)((i/10)%10));
|
||||
freename[13] = (char)('0' + (char)(i%10));
|
||||
|
||||
return freename;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue