From d95989902256f31c52adf67a148d433a1b824cf9 Mon Sep 17 00:00:00 2001 From: wheremyfoodat Date: Sat, 16 Jul 2022 19:00:21 +0300 Subject: [PATCH] Allow .ps-exe suffix for executables. --- src/core/system.cpp | 5 +++-- src/duckstation-qt/mainwindow.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/system.cpp b/src/core/system.cpp index d5dbc1286..14eb6e152 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -285,7 +285,8 @@ bool IsExeFileName(const char* path) { const char* extension = std::strrchr(path, '.'); 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) @@ -298,7 +299,7 @@ bool IsPsfFileName(const char* path) bool IsLoadableFilename(const char* path) { 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 ".m3u", // playlists ".pbp"); diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 14326e436..f9c7893fb 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -46,10 +46,11 @@ static constexpr char DISC_IMAGE_FILTER[] = QT_TRANSLATE_NOOP( "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 " "(*.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";