Fixed the screenshot save path
This commit is contained in:
parent
29dd25a23a
commit
52e45ff1cb
|
@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include "os4Init.h"
|
||||
|
||||
#define VSTRING "tbftss 1.5.1r1 (13.08.2022)"
|
||||
#define VSTRING "tbftss 1.50.1r1 (22.08.2022)"
|
||||
#define VERSTAG "\0$VER: " VSTRING
|
||||
static CONST_STRPTR stack USED = "$STACK:102400";
|
||||
static CONST_STRPTR version USED = VERSTAG;
|
||||
|
@ -94,8 +94,8 @@ void createSaveFolder(void)
|
|||
|
||||
void createScreenshotFolder(void)
|
||||
{
|
||||
mkdir("/tmp/tbftss", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
mkdir("PROGDIR:screenshots", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
|
||||
dev.screenshotFolder = "/tmp/tbftss";
|
||||
dev.screenshotFolder = "screenshots";
|
||||
}
|
||||
|
||||
|
|
|
@ -261,8 +261,8 @@ void saveScreenshot(void)
|
|||
char filename[MAX_NAME_LENGTH];
|
||||
SDL_Surface *sshot;
|
||||
|
||||
sprintf(filename, "/tmp/tbftss/%d.bmp", ++i);
|
||||
|
||||
sprintf(filename, "%s/%d.bmp", dev.screenshotFolder, ++i);
|
||||
|
||||
sshot = SDL_CreateRGBSurface(0, app.winWidth, app.winHeight, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
|
||||
SDL_RenderReadPixels(app.renderer, NULL, SDL_PIXELFORMAT_ARGB8888, sshot->pixels, sshot->pitch);
|
||||
SDL_SaveBMP(sshot, filename);
|
||||
|
@ -273,3 +273,4 @@ void saveScreenshot(void)
|
|||
printf("Saved '%s'\n", filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue