mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 11:35:45 +00:00
loader namespace
This commit is contained in:
parent
30f3f8cb20
commit
f933ba262e
3 changed files with 8 additions and 1 deletions
|
@ -5,6 +5,8 @@
|
|||
#include "common/types.h"
|
||||
#include "loader.h"
|
||||
|
||||
namespace Loader {
|
||||
|
||||
FileTypes DetectFileType(const std::string& filepath) {
|
||||
// No file loaded
|
||||
if (filepath.empty()) {
|
||||
|
@ -22,3 +24,5 @@ FileTypes DetectFileType(const std::string& filepath) {
|
|||
}
|
||||
return FileTypes::Unknown;
|
||||
}
|
||||
|
||||
} // namespace Loader
|
||||
|
|
|
@ -5,9 +5,12 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace Loader {
|
||||
|
||||
enum class FileTypes {
|
||||
Unknown,
|
||||
Pkg,
|
||||
};
|
||||
|
||||
FileTypes DetectFileType(const std::string& filepath);
|
||||
} // namespace Loader
|
||||
|
|
|
@ -280,7 +280,7 @@ void MainWindow::InstallPkg() {
|
|||
|
||||
void MainWindow::InstallDragDropPkg(std::string file, int pkgNum, int nPkg) {
|
||||
|
||||
if (DetectFileType(file) == FileTypes::Pkg) {
|
||||
if (Loader::DetectFileType(file) == Loader::FileTypes::Pkg) {
|
||||
PKG pkg;
|
||||
pkg.Open(file);
|
||||
std::string failreason;
|
||||
|
|
Loading…
Add table
Reference in a new issue