mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 02:43:03 +00:00
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 (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
|
||||
{
|
||||
char new_screenshot_dir[DIR_MAX_LENGTH];
|
||||
@ -361,9 +366,14 @@ static bool screenshot_dump(
|
||||
IMG_EXT, sizeof(state->shotname));
|
||||
}
|
||||
else
|
||||
fill_pathname(state->shotname,
|
||||
path_basename_nocompression(name_base),
|
||||
".png", sizeof(state->shotname));
|
||||
{
|
||||
size_t _len = strlcpy(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)
|
||||
|| settings->bools.screenshots_in_content_dir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user