mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-02 15:02:11 +00:00
HLE: use original filename for media exports
No idea what's the real logic here. I was just winging it with the title before. It's most likely just meant for metadata.
This commit is contained in:
parent
6a776624ac
commit
32666b5ae8
@ -226,16 +226,16 @@ error_code cellMusicExportFromFile(vm::cptr<char> srcHddDir, vm::cptr<char> srcH
|
||||
return { CELL_MUSIC_EXPORT_UTIL_ERROR_PARAM, file_path };
|
||||
}
|
||||
|
||||
std::string filename = param->title.get_ptr();
|
||||
std::string filename;
|
||||
|
||||
if (srcHddFile)
|
||||
{
|
||||
fmt::append(filename, "%s", srcHddFile.get_ptr());
|
||||
}
|
||||
|
||||
if (filename.empty())
|
||||
{
|
||||
return { CELL_MUSIC_EXPORT_UTIL_ERROR_PARAM, "title empty" };
|
||||
}
|
||||
|
||||
if (const std::string extension = get_file_extension(file_path); !extension.empty())
|
||||
{
|
||||
fmt::append(filename, ".%s", extension);
|
||||
return { CELL_MUSIC_EXPORT_UTIL_ERROR_PARAM, "filename empty" };
|
||||
}
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
|
@ -197,16 +197,11 @@ error_code cellPhotoRegistFromFile(vm::cptr<char> path, vm::cptr<char> photo_tit
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, file_path };
|
||||
}
|
||||
|
||||
std::string filename = photo_title.get_ptr();
|
||||
const std::string filename = file_path.substr(file_path.find_last_of('/') + 1);
|
||||
|
||||
if (filename.empty())
|
||||
{
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, "title empty" };
|
||||
}
|
||||
|
||||
if (const std::string extension = get_file_extension(file_path); !extension.empty())
|
||||
{
|
||||
fmt::append(filename, ".%s", extension);
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, "filename empty" };
|
||||
}
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
@ -340,16 +335,16 @@ error_code cellPhotoExportFromFile(vm::cptr<char> srcHddDir, vm::cptr<char> srcH
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, file_path };
|
||||
}
|
||||
|
||||
std::string filename = param->photo_title.get_ptr();
|
||||
std::string filename;
|
||||
|
||||
if (srcHddFile)
|
||||
{
|
||||
fmt::append(filename, "%s", srcHddFile.get_ptr());
|
||||
}
|
||||
|
||||
if (filename.empty())
|
||||
{
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, "title empty" };
|
||||
}
|
||||
|
||||
if (const std::string extension = get_file_extension(file_path); !extension.empty())
|
||||
{
|
||||
fmt::append(filename, ".%s", extension);
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, "filename empty" };
|
||||
}
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
@ -414,16 +409,16 @@ error_code cellPhotoExportFromFileWithCopy(vm::cptr<char> srcHddDir, vm::cptr<ch
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, file_path };
|
||||
}
|
||||
|
||||
std::string filename = param->photo_title.get_ptr();
|
||||
std::string filename;
|
||||
|
||||
if (srcHddFile)
|
||||
{
|
||||
fmt::append(filename, "%s", srcHddFile.get_ptr());
|
||||
}
|
||||
|
||||
if (filename.empty())
|
||||
{
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, "title empty" };
|
||||
}
|
||||
|
||||
if (const std::string extension = get_file_extension(file_path); !extension.empty())
|
||||
{
|
||||
fmt::append(filename, ".%s", extension);
|
||||
return { CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM, "filename empty" };
|
||||
}
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
|
@ -237,16 +237,16 @@ error_code cellVideoExportFromFileWithCopy(vm::cptr<char> srcHddDir, vm::cptr<ch
|
||||
return { CELL_VIDEO_EXPORT_UTIL_ERROR_PARAM, file_path };
|
||||
}
|
||||
|
||||
std::string filename = param->title.get_ptr();
|
||||
std::string filename;
|
||||
|
||||
if (srcHddFile)
|
||||
{
|
||||
fmt::append(filename, "%s", srcHddFile.get_ptr());
|
||||
}
|
||||
|
||||
if (filename.empty())
|
||||
{
|
||||
return { CELL_VIDEO_EXPORT_UTIL_ERROR_PARAM, "title empty" };
|
||||
}
|
||||
|
||||
if (const std::string extension = get_file_extension(file_path); !extension.empty())
|
||||
{
|
||||
fmt::append(filename, ".%s", extension);
|
||||
return { CELL_VIDEO_EXPORT_UTIL_ERROR_PARAM, "filename empty" };
|
||||
}
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
@ -301,16 +301,16 @@ error_code cellVideoExportFromFile(vm::cptr<char> srcHddDir, vm::cptr<char> srcH
|
||||
return { CELL_VIDEO_EXPORT_UTIL_ERROR_PARAM, file_path };
|
||||
}
|
||||
|
||||
std::string filename = param->title.get_ptr();
|
||||
std::string filename;
|
||||
|
||||
if (srcHddFile)
|
||||
{
|
||||
fmt::append(filename, "%s", srcHddFile.get_ptr());
|
||||
}
|
||||
|
||||
if (filename.empty())
|
||||
{
|
||||
return { CELL_VIDEO_EXPORT_UTIL_ERROR_PARAM, "title empty" };
|
||||
}
|
||||
|
||||
if (const std::string extension = get_file_extension(file_path); !extension.empty())
|
||||
{
|
||||
fmt::append(filename, ".%s", extension);
|
||||
return { CELL_VIDEO_EXPORT_UTIL_ERROR_PARAM, "filename empty" };
|
||||
}
|
||||
|
||||
sysutil_register_cb([=](ppu_thread& ppu) -> s32
|
||||
|
Loading…
Reference in New Issue
Block a user