Fix savestate thumbnails - '.png' needs to be appended to the total
filepath, so fill_pathname can't be used since it would overwrite the existing extension
This commit is contained in:
parent
3a4330238a
commit
33ec89306e
|
@ -307,8 +307,13 @@ static bool screenshot_dump(
|
||||||
if (!fullpath)
|
if (!fullpath)
|
||||||
{
|
{
|
||||||
if (savestate)
|
if (savestate)
|
||||||
fill_pathname(state->filename,
|
{
|
||||||
name_base, ".png", sizeof(state->filename));
|
size_t _len = strlcpy(state->filename,
|
||||||
|
name_base, sizeof(state->filename));
|
||||||
|
strlcpy(state->filename + _len,
|
||||||
|
".png",
|
||||||
|
sizeof(state->filename) - _len);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char new_screenshot_dir[DIR_MAX_LENGTH];
|
char new_screenshot_dir[DIR_MAX_LENGTH];
|
||||||
|
@ -361,9 +366,14 @@ static bool screenshot_dump(
|
||||||
IMG_EXT, sizeof(state->shotname));
|
IMG_EXT, sizeof(state->shotname));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fill_pathname(state->shotname,
|
{
|
||||||
path_basename_nocompression(name_base),
|
size_t _len = strlcpy(state->shotname,
|
||||||
".png", sizeof(state->shotname));
|
path_basename_nocompression(name_base),
|
||||||
|
sizeof(state->shotname));
|
||||||
|
strlcpy(state->shotname + _len,
|
||||||
|
".png",
|
||||||
|
sizeof(state->shotname) - _len);
|
||||||
|
}
|
||||||
|
|
||||||
if ( string_is_empty(new_screenshot_dir)
|
if ( string_is_empty(new_screenshot_dir)
|
||||||
|| settings->bools.screenshots_in_content_dir)
|
|| settings->bools.screenshots_in_content_dir)
|
||||||
|
|
Loading…
Reference in New Issue