mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 06:38:46 +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 "common/types.h"
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
|
|
||||||
|
namespace Loader {
|
||||||
|
|
||||||
FileTypes DetectFileType(const std::string& filepath) {
|
FileTypes DetectFileType(const std::string& filepath) {
|
||||||
// No file loaded
|
// No file loaded
|
||||||
if (filepath.empty()) {
|
if (filepath.empty()) {
|
||||||
|
@ -22,3 +24,5 @@ FileTypes DetectFileType(const std::string& filepath) {
|
||||||
}
|
}
|
||||||
return FileTypes::Unknown;
|
return FileTypes::Unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Loader
|
||||||
|
|
|
@ -5,9 +5,12 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
namespace Loader {
|
||||||
|
|
||||||
enum class FileTypes {
|
enum class FileTypes {
|
||||||
Unknown,
|
Unknown,
|
||||||
Pkg,
|
Pkg,
|
||||||
};
|
};
|
||||||
|
|
||||||
FileTypes DetectFileType(const std::string& filepath);
|
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) {
|
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 pkg;
|
||||||
pkg.Open(file);
|
pkg.Open(file);
|
||||||
std::string failreason;
|
std::string failreason;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue