Files
PS2Recomp/ps2xIOP/include/ps2x/iop/ps2_path.h
T
Ran-j b9dba607d8 feat: remove recompiled version of GetRomName
refactor: split IOP emulator logic
feat: added more HLE IOP modules
feat: added ps2_path
2026-09-02 17:19:00 -03:00

36 lines
802 B
C++

#pragma once
#include <string>
#include <string_view>
namespace ps2x::iop
{
enum class Ps2PathDevice
{
Invalid,
Host,
Cdrom,
MemoryCard0,
Rom0,
NativeHost,
};
struct ParsedPs2Path
{
Ps2PathDevice device = Ps2PathDevice::Invalid;
std::string deviceName;
std::string path;
[[nodiscard]] explicit operator bool() const noexcept
{
return device != Ps2PathDevice::Invalid;
}
};
[[nodiscard]] ParsedPs2Path parsePs2Path(std::string_view path);
// Returns a lower-case module/file leaf without an optional .irx suffix.
[[nodiscard]] std::string ps2PathLeafKey(const ParsedPs2Path &path);
[[nodiscard]] std::string ps2PathLeafKey(std::string_view path);
}