Allow .ps-exe suffix for executables.

This commit is contained in:
wheremyfoodat 2022-07-16 19:00:21 +03:00
parent 82965f741e
commit d959899022
2 changed files with 6 additions and 4 deletions

View file

@ -285,7 +285,8 @@ bool IsExeFileName(const char* path)
{ {
const char* extension = std::strrchr(path, '.'); const char* extension = std::strrchr(path, '.');
return (extension && return (extension &&
(StringUtil::Strcasecmp(extension, ".exe") == 0 || StringUtil::Strcasecmp(extension, ".psexe") == 0)); (StringUtil::Strcasecmp(extension, ".exe") == 0 || StringUtil::Strcasecmp(extension, ".psexe") == 0 ||
StringUtil::Strcasecmp(extension, ".ps-exe") == 0));
} }
bool IsPsfFileName(const char* path) bool IsPsfFileName(const char* path)
@ -298,7 +299,7 @@ bool IsPsfFileName(const char* path)
bool IsLoadableFilename(const char* path) bool IsLoadableFilename(const char* path)
{ {
static constexpr auto extensions = make_array(".bin", ".cue", ".img", ".iso", ".chd", ".ecm", ".mds", // discs static constexpr auto extensions = make_array(".bin", ".cue", ".img", ".iso", ".chd", ".ecm", ".mds", // discs
".exe", ".psexe", // exes ".exe", ".psexe", ".ps-exe", // exes
".psf", ".minipsf", // psf ".psf", ".minipsf", // psf
".m3u", // playlists ".m3u", // playlists
".pbp"); ".pbp");

View file

@ -46,10 +46,11 @@
static constexpr char DISC_IMAGE_FILTER[] = QT_TRANSLATE_NOOP( static constexpr char DISC_IMAGE_FILTER[] = QT_TRANSLATE_NOOP(
"MainWindow", "MainWindow",
"All File Types (*.bin *.img *.iso *.cue *.chd *.ecm *.mds *.pbp *.exe *.psexe *.psf *.minipsf *.m3u);;Single-Track " "All File Types (*.bin *.img *.iso *.cue *.chd *.ecm *.mds *.pbp *.exe *.psexe *.ps-exe *.psf *.minipsf "
"*.m3u);;Single-Track "
"Raw Images (*.bin *.img *.iso);;Cue Sheets (*.cue);;MAME CHD Images (*.chd);;Error Code Modeler Images " "Raw Images (*.bin *.img *.iso);;Cue Sheets (*.cue);;MAME CHD Images (*.chd);;Error Code Modeler Images "
"(*.ecm);;Media Descriptor Sidecar Images (*.mds);;PlayStation EBOOTs (*.pbp);;PlayStation Executables (*.exe " "(*.ecm);;Media Descriptor Sidecar Images (*.mds);;PlayStation EBOOTs (*.pbp);;PlayStation Executables (*.exe "
"*.psexe);;Portable Sound Format Files (*.psf *.minipsf);;Playlists (*.m3u)"); "*.psexe *.ps-exe);;Portable Sound Format Files (*.psf *.minipsf);;Playlists (*.m3u)");
static const char* DEFAULT_THEME_NAME = "darkfusion"; static const char* DEFAULT_THEME_NAME = "darkfusion";