mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-22 04:25:19 +00:00
Using "using" in vm::ptr/ref
This commit is contained in:
parent
8155ef5e67
commit
1653991b9d
13 changed files with 62 additions and 212 deletions
|
@ -677,12 +677,12 @@ SceFiosDate sceFiosDateGetCurrent()
|
|||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
SceFiosDate sceFiosDateFromComponents(const struct vm::psv::ptr<tm> pComponents)
|
||||
SceFiosDate sceFiosDateFromComponents(vm::psv::ptr<const tm> pComponents)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
||||
struct vm::psv::ptr<tm> sceFiosDateToComponents(SceFiosDate date, struct vm::psv::ptr<tm> pOutComponents)
|
||||
vm::psv::ptr<tm> sceFiosDateToComponents(SceFiosDate date, vm::psv::ptr<tm> pOutComponents)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
|
|
|
@ -287,7 +287,7 @@ struct SceNpMatching2RoomGroup
|
|||
|
||||
struct SceNpMatching2RoomMemberDataExternal
|
||||
{
|
||||
struct vm::psv::ptr<SceNpMatching2RoomMemberDataExternal> next;
|
||||
vm::psv::ptr<SceNpMatching2RoomMemberDataExternal> next;
|
||||
SceNpId npId;
|
||||
u64 joinDate;
|
||||
SceNpMatching2Role role;
|
||||
|
@ -297,7 +297,7 @@ struct SceNpMatching2RoomMemberDataExternal
|
|||
|
||||
struct SceNpMatching2RoomMemberDataInternal
|
||||
{
|
||||
struct vm::psv::ptr<SceNpMatching2RoomMemberDataInternal> next;
|
||||
vm::psv::ptr<SceNpMatching2RoomMemberDataInternal> next;
|
||||
SceNpId npId;
|
||||
|
||||
u64 joinDate;
|
||||
|
|
|
@ -195,29 +195,20 @@ public:
|
|||
const atomic_type res = InterlockedXor(&data, (atomic_type&)(right)) ^ (atomic_type&)(right);
|
||||
return (T&)res;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template<typename T> struct atomic_le_t : public _atomic_base<T>
|
||||
{
|
||||
};
|
||||
template<typename T> using atomic_le_t = _atomic_base<T>;
|
||||
|
||||
template<typename T> struct atomic_be_t : public _atomic_base<typename to_be_t<T>::type>
|
||||
{
|
||||
};
|
||||
template<typename T> using atomic_be_t = _atomic_base<typename to_be_t<T>::type>;
|
||||
|
||||
namespace ps3
|
||||
{
|
||||
template<typename T> struct atomic_t : public atomic_be_t<T>
|
||||
{
|
||||
};
|
||||
template<typename T> using atomic_t = atomic_be_t<T>;
|
||||
}
|
||||
|
||||
namespace psv
|
||||
{
|
||||
template<typename T> struct atomic_t : public atomic_le_t<T>
|
||||
{
|
||||
};
|
||||
template<typename T> using atomic_t = atomic_le_t<T>;
|
||||
}
|
||||
|
||||
using namespace ps3;
|
||||
|
|
|
@ -411,106 +411,30 @@ namespace vm
|
|||
};
|
||||
|
||||
//BE pointer to LE data
|
||||
template<typename T, int lvl = 1, typename AT = u32> struct bptrl : public _ptr_base<T, lvl, typename to_be_t<AT>::type>
|
||||
{
|
||||
static const bptrl make(AT addr)
|
||||
{
|
||||
auto res = _ptr_base<T, lvl, typename to_be_t<AT>::type>::make(convert_le_be<typename to_be_t<AT>::type>(addr));
|
||||
return static_cast<const bptrl&>(res);
|
||||
}
|
||||
|
||||
using _ptr_base<T, lvl, typename to_be_t<AT>::type>::operator=;
|
||||
};
|
||||
template<typename T, int lvl = 1, typename AT = u32> using bptrl = _ptr_base<T, lvl, typename to_be_t<AT>::type>;
|
||||
|
||||
//BE pointer to BE data
|
||||
template<typename T, int lvl = 1, typename AT = u32> struct bptrb : public _ptr_base<typename to_be_t<T>::type, lvl, typename to_be_t<AT>::type>
|
||||
{
|
||||
static const bptrb make(AT addr)
|
||||
{
|
||||
auto res = _ptr_base<typename to_be_t<T>::type, lvl, typename to_be_t<AT>::type>::make(convert_le_be<typename to_be_t<AT>::type>(addr));
|
||||
return static_cast<const bptrb&>(res);
|
||||
}
|
||||
|
||||
using _ptr_base<typename to_be_t<T>::type, lvl, typename to_be_t<AT>::type>::operator=;
|
||||
};
|
||||
template<typename T, int lvl = 1, typename AT = u32> using bptrb = _ptr_base<typename to_be_t<T>::type, lvl, typename to_be_t<AT>::type>;
|
||||
|
||||
//LE pointer to BE data
|
||||
template<typename T, int lvl = 1, typename AT = u32> struct lptrb : public _ptr_base<typename to_be_t<T>::type, lvl, AT>
|
||||
{
|
||||
static const lptrb make(AT addr)
|
||||
{
|
||||
auto res = _ptr_base<typename to_be_t<T>::type, lvl, AT>::make(addr);
|
||||
return static_cast<const lptrb&>(res);
|
||||
}
|
||||
|
||||
using _ptr_base<typename to_be_t<T>::type, lvl, AT>::operator=;
|
||||
};
|
||||
template<typename T, int lvl = 1, typename AT = u32> using lptrb = _ptr_base<typename to_be_t<T>::type, lvl, AT>;
|
||||
|
||||
//LE pointer to LE data
|
||||
template<typename T, int lvl = 1, typename AT = u32> struct lptrl : public _ptr_base<T, lvl, AT>
|
||||
{
|
||||
static const lptrl make(AT addr)
|
||||
{
|
||||
auto res = _ptr_base<T, lvl, AT>::make(addr);
|
||||
return static_cast<const lptrl&>(res);
|
||||
}
|
||||
|
||||
using _ptr_base<T, lvl, AT>::operator=;
|
||||
};
|
||||
template<typename T, int lvl = 1, typename AT = u32> using lptrl = _ptr_base<T, lvl, AT>;
|
||||
|
||||
namespace ps3
|
||||
{
|
||||
template<typename T, int lvl = 1, typename AT = u32> struct ptr;
|
||||
template<typename T, int lvl = 1, typename AT = u32> struct bptr;
|
||||
|
||||
//default pointer for HLE functions (LE pointer to BE data)
|
||||
template<typename T, int lvl, typename AT> struct ptr : public lptrb<T, lvl, AT>
|
||||
{
|
||||
static const ptr make(AT addr)
|
||||
{
|
||||
auto res = lptrb<T, lvl, AT>::make(addr);
|
||||
return static_cast<const ptr&>(res);
|
||||
}
|
||||
|
||||
vm::ps3::bptr<T, lvl, AT> to_be() const
|
||||
{
|
||||
return vm::ps3::bptr<T, lvl, AT>::make(this->addr());
|
||||
}
|
||||
|
||||
using lptrb<T, lvl, AT>::operator=;
|
||||
};
|
||||
template<typename T, int lvl = 1, typename AT = u32> using ptr = lptrb<T, lvl, AT>;
|
||||
|
||||
//default pointer for HLE structures (BE pointer to BE data)
|
||||
template<typename T, int lvl, typename AT> struct bptr : public bptrb<T, lvl, AT>
|
||||
{
|
||||
static const bptr make(AT addr)
|
||||
{
|
||||
auto res = bptrb<T, lvl, AT>::make(addr);
|
||||
return static_cast<const bptr&>(res);
|
||||
}
|
||||
|
||||
vm::ps3::ptr<T, lvl, AT> to_le() const
|
||||
{
|
||||
return vm::ps3::ptr<T, lvl, AT>::make(this->addr());
|
||||
}
|
||||
|
||||
using bptrb<T, lvl, AT>::operator=;
|
||||
};
|
||||
template<typename T, int lvl = 1, typename AT = u32> using bptr = bptrb<T, lvl, AT>;
|
||||
}
|
||||
|
||||
namespace psv
|
||||
{
|
||||
//default pointer for HLE functions & structures (LE pointer to LE data)
|
||||
template<typename T, int lvl = 1, typename AT = u32> struct ptr : public lptrl<T, lvl, AT>
|
||||
{
|
||||
static const ptr make(AT addr)
|
||||
{
|
||||
auto res = lptrl<T, lvl, AT>::make(addr);
|
||||
return static_cast<const ptr&>(res);
|
||||
}
|
||||
|
||||
using lptrl<T, lvl, AT>::operator=;
|
||||
};
|
||||
template<typename T, int lvl = 1, typename AT = u32> using ptr = lptrl<T, lvl, AT>;
|
||||
}
|
||||
|
||||
//PS3 emulation is main now, so lets it be as default
|
||||
|
@ -519,36 +443,14 @@ namespace vm
|
|||
|
||||
namespace fmt
|
||||
{
|
||||
// external specializations for fmt::format function
|
||||
// external specialization for fmt::format function
|
||||
|
||||
template<typename T, int lvl, typename AT>
|
||||
struct unveil<vm::ps3::ptr<T, lvl, AT>, false>
|
||||
struct unveil<vm::_ptr_base<T, lvl, AT>, false>
|
||||
{
|
||||
typedef typename unveil<AT>::result_type result_type;
|
||||
|
||||
__forceinline static result_type get_value(const vm::ps3::ptr<T, lvl, AT>& arg)
|
||||
{
|
||||
return unveil<AT>::get_value(arg.addr());
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, int lvl, typename AT>
|
||||
struct unveil<vm::ps3::bptr<T, lvl, AT>, false>
|
||||
{
|
||||
typedef typename unveil<AT>::result_type result_type;
|
||||
|
||||
__forceinline static result_type get_value(const vm::ps3::bptr<T, lvl, AT>& arg)
|
||||
{
|
||||
return unveil<AT>::get_value(arg.addr());
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, int lvl, typename AT>
|
||||
struct unveil<vm::psv::ptr<T, lvl, AT>, false>
|
||||
{
|
||||
typedef typename unveil<AT>::result_type result_type;
|
||||
|
||||
__forceinline static result_type get_value(const vm::psv::ptr<T, lvl, AT>& arg)
|
||||
__forceinline static result_type get_value(const vm::_ptr_base<T, lvl, AT>& arg)
|
||||
{
|
||||
return unveil<AT>::get_value(arg.addr());
|
||||
}
|
||||
|
@ -561,16 +463,16 @@ template<typename T, bool is_enum>
|
|||
struct cast_ppu_gpr;
|
||||
|
||||
template<typename T, int lvl, typename AT>
|
||||
struct cast_ppu_gpr<vm::ps3::ptr<T, lvl, AT>, false>
|
||||
struct cast_ppu_gpr<vm::_ptr_base<T, lvl, AT>, false>
|
||||
{
|
||||
__forceinline static u64 to_gpr(const vm::ps3::ptr<T, lvl, AT>& value)
|
||||
__forceinline static u64 to_gpr(const vm::_ptr_base<T, lvl, AT>& value)
|
||||
{
|
||||
return value.addr();
|
||||
}
|
||||
|
||||
__forceinline static vm::ps3::ptr<T, lvl, AT> from_gpr(const u64 reg)
|
||||
__forceinline static vm::_ptr_base<T, lvl, AT> from_gpr(const u64 reg)
|
||||
{
|
||||
return vm::ps3::ptr<T, lvl, AT>::make(cast_ppu_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
return vm::_ptr_base<T, lvl, AT>::make(cast_ppu_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -580,15 +482,15 @@ template<typename T, bool is_enum>
|
|||
struct cast_armv7_gpr;
|
||||
|
||||
template<typename T, int lvl, typename AT>
|
||||
struct cast_armv7_gpr<vm::psv::ptr<T, lvl, AT>, false>
|
||||
struct cast_armv7_gpr<vm::_ptr_base<T, lvl, AT>, false>
|
||||
{
|
||||
__forceinline static u32 to_gpr(const vm::psv::ptr<T, lvl, AT>& value)
|
||||
__forceinline static u32 to_gpr(const vm::_ptr_base<T, lvl, AT>& value)
|
||||
{
|
||||
return value.addr();
|
||||
}
|
||||
|
||||
__forceinline static vm::psv::ptr<T, lvl, AT> from_gpr(const u32 reg)
|
||||
__forceinline static vm::_ptr_base<T, lvl, AT> from_gpr(const u32 reg)
|
||||
{
|
||||
return vm::psv::ptr<T, lvl, AT>::make(cast_armv7_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
return vm::_ptr_base<T, lvl, AT>::make(cast_armv7_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -61,51 +61,30 @@ namespace vm
|
|||
};
|
||||
|
||||
//BE reference to LE data
|
||||
template<typename T, typename AT = u32> struct brefl : public _ref_base<T, typename to_be_t<AT>::type>
|
||||
{
|
||||
using _ref_base<T, typename to_be_t<AT>::type>::operator=;
|
||||
};
|
||||
template<typename T, typename AT = u32> using brefl = _ref_base<T, typename to_be_t<AT>::type>;
|
||||
|
||||
//BE reference to BE data
|
||||
template<typename T, typename AT = u32> struct brefb : public _ref_base<typename to_be_t<T>::type, typename to_be_t<AT>::type>
|
||||
{
|
||||
using _ref_base<typename to_be_t<T>::type, typename to_be_t<AT>::type>::operator=;
|
||||
};
|
||||
template<typename T, typename AT = u32> using brefb = _ref_base<typename to_be_t<T>::type, typename to_be_t<AT>::type>;
|
||||
|
||||
//LE reference to BE data
|
||||
template<typename T, typename AT = u32> struct lrefb : public _ref_base<typename to_be_t<T>::type, AT>
|
||||
{
|
||||
using _ref_base<typename to_be_t<T>::type, AT>::operator=;
|
||||
};
|
||||
template<typename T, typename AT = u32> using lrefb = _ref_base<typename to_be_t<T>::type, AT>;
|
||||
|
||||
//LE reference to LE data
|
||||
template<typename T, typename AT = u32> struct lrefl : public _ref_base<T, AT>
|
||||
{
|
||||
using _ref_base<T, AT>::operator=;
|
||||
};
|
||||
template<typename T, typename AT = u32> using lrefl = _ref_base<T, AT>;
|
||||
|
||||
namespace ps3
|
||||
{
|
||||
//default reference for HLE functions (LE reference to BE data)
|
||||
template<typename T, typename AT = u32> struct ref : public lrefb<T, AT>
|
||||
{
|
||||
using lrefb<T, AT>::operator=;
|
||||
};
|
||||
template<typename T, typename AT = u32> using ref = lrefb<T, AT>;
|
||||
|
||||
//default reference for HLE structures (BE reference to BE data)
|
||||
template<typename T, typename AT = u32> struct bref : public brefb<T, AT>
|
||||
{
|
||||
using brefb<T, AT>::operator=;
|
||||
};
|
||||
template<typename T, typename AT = u32> using bref = brefb<T, AT>;
|
||||
}
|
||||
|
||||
namespace psv
|
||||
{
|
||||
//default reference for HLE functions & structures (LE reference to LE data)
|
||||
template<typename T, typename AT = u32> struct ref : public lrefl<T, AT>
|
||||
{
|
||||
using lrefl<T, AT>::operator=;
|
||||
};
|
||||
template<typename T, typename AT = u32> using ref = lrefl<T, AT>;
|
||||
}
|
||||
|
||||
//PS3 emulation is main now, so lets it be as default
|
||||
|
@ -114,36 +93,14 @@ namespace vm
|
|||
|
||||
namespace fmt
|
||||
{
|
||||
// external specializations for fmt::format function
|
||||
// external specialization for fmt::format function
|
||||
|
||||
template<typename T, typename AT>
|
||||
struct unveil<vm::ps3::ref<T, AT>, false>
|
||||
struct unveil<vm::_ref_base<T, AT>, false>
|
||||
{
|
||||
typedef typename unveil<AT>::result_type result_type;
|
||||
|
||||
__forceinline static result_type get_value(const vm::ps3::ref<T, AT>& arg)
|
||||
{
|
||||
return unveil<AT>::get_value(arg.addr());
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, typename AT>
|
||||
struct unveil<vm::ps3::bref<T, AT>, false>
|
||||
{
|
||||
typedef typename unveil<AT>::result_type result_type;
|
||||
|
||||
__forceinline static result_type get_value(const vm::ps3::bref<T, AT>& arg)
|
||||
{
|
||||
return unveil<AT>::get_value(arg.addr());
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, typename AT>
|
||||
struct unveil<vm::psv::ref<T, AT>, false>
|
||||
{
|
||||
typedef typename unveil<AT>::result_type result_type;
|
||||
|
||||
__forceinline static result_type get_value(const vm::psv::ref<T, AT>& arg)
|
||||
__forceinline static result_type get_value(const vm::_ref_base<T, AT>& arg)
|
||||
{
|
||||
return unveil<AT>::get_value(arg.addr());
|
||||
}
|
||||
|
@ -156,16 +113,16 @@ template<typename T, bool is_enum>
|
|||
struct cast_ppu_gpr;
|
||||
|
||||
template<typename T, typename AT>
|
||||
struct cast_ppu_gpr<vm::ps3::ref<T, AT>, false>
|
||||
struct cast_ppu_gpr<vm::_ref_base<T, AT>, false>
|
||||
{
|
||||
__forceinline static u64 to_gpr(const vm::ps3::ref<T, AT>& value)
|
||||
__forceinline static u64 to_gpr(const vm::_ref_base<T, AT>& value)
|
||||
{
|
||||
return value.addr();
|
||||
}
|
||||
|
||||
__forceinline static vm::ps3::ref<T, AT> from_gpr(const u64 reg)
|
||||
__forceinline static vm::_ref_base<T, AT> from_gpr(const u64 reg)
|
||||
{
|
||||
return vm::ps3::ref<T, AT>::make(cast_ppu_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
return vm::_ref_base<T, AT>::make(cast_ppu_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -175,15 +132,15 @@ template<typename T, bool is_enum>
|
|||
struct cast_armv7_gpr;
|
||||
|
||||
template<typename T, typename AT>
|
||||
struct cast_armv7_gpr<vm::psv::ref<T, AT>, false>
|
||||
struct cast_armv7_gpr<vm::_ref_base<T, AT>, false>
|
||||
{
|
||||
__forceinline static u32 to_gpr(const vm::psv::ref<T, AT>& value)
|
||||
__forceinline static u32 to_gpr(const vm::_ref_base<T, AT>& value)
|
||||
{
|
||||
return value.addr();
|
||||
}
|
||||
|
||||
__forceinline static vm::psv::ref<T, AT> from_gpr(const u32 reg)
|
||||
__forceinline static vm::_ref_base<T, AT> from_gpr(const u32 reg)
|
||||
{
|
||||
return vm::psv::ref<T, AT>::make(cast_armv7_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
return vm::_ref_base<T, AT>::make(cast_armv7_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -530,7 +530,7 @@ int cellAdecOpen(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResource> res, vm::
|
|||
|
||||
if (!adecCheckType(type->audioCodecType)) return CELL_ADEC_ERROR_ARG;
|
||||
|
||||
*handle = adecOpen(new AudioDecoder(type->audioCodecType, res->startAddr, res->totalMemSize, cb->cbFunc.to_le(), cb->cbArg));
|
||||
*handle = adecOpen(new AudioDecoder(type->audioCodecType, res->startAddr, res->totalMemSize, cb->cbFunc, cb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ int cellAdecOpenEx(vm::ptr<CellAdecType> type, vm::ptr<CellAdecResourceEx> res,
|
|||
|
||||
if (!adecCheckType(type->audioCodecType)) return CELL_ADEC_ERROR_ARG;
|
||||
|
||||
*handle = adecOpen(new AudioDecoder(type->audioCodecType, res->startAddr, res->totalMemSize, cb->cbFunc.to_le(), cb->cbArg));
|
||||
*handle = adecOpen(new AudioDecoder(type->audioCodecType, res->startAddr, res->totalMemSize, cb->cbFunc, cb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -814,7 +814,7 @@ int cellDmuxOpen(vm::ptr<const CellDmuxType> demuxerType, vm::ptr<const CellDmux
|
|||
|
||||
// TODO: check demuxerResource and demuxerCb arguments
|
||||
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResource->memAddr, demuxerResource->memSize, demuxerCb->cbMsgFunc.to_le(), demuxerCb->cbArg));
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResource->memAddr, demuxerResource->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ int cellDmuxOpenEx(vm::ptr<const CellDmuxType> demuxerType, vm::ptr<const CellDm
|
|||
|
||||
// TODO: check demuxerResourceEx and demuxerCb arguments
|
||||
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResourceEx->memAddr, demuxerResourceEx->memSize, demuxerCb->cbMsgFunc.to_le(), demuxerCb->cbArg));
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResourceEx->memAddr, demuxerResourceEx->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -850,7 +850,7 @@ int cellDmuxOpen2(vm::ptr<const CellDmuxType2> demuxerType2, vm::ptr<const CellD
|
|||
|
||||
// TODO: check demuxerType2, demuxerResource2 and demuxerCb arguments
|
||||
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResource2->memAddr, demuxerResource2->memSize, demuxerCb->cbMsgFunc.to_le(), demuxerCb->cbArg));
|
||||
*demuxerHandle = dmuxOpen(new Demuxer(demuxerResource2->memAddr, demuxerResource2->memSize, demuxerCb->cbMsgFunc, demuxerCb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -1008,7 +1008,7 @@ int cellDmuxEnableEs(u32 demuxerHandle, vm::ptr<const CellCodecEsFilterId> esFil
|
|||
|
||||
std::shared_ptr<ElementaryStream> es(new ElementaryStream(dmux.get(), esResourceInfo->memAddr, esResourceInfo->memSize,
|
||||
esFilterId->filterIdMajor, esFilterId->filterIdMinor, esFilterId->supplementalInfo1, esFilterId->supplementalInfo2,
|
||||
esCb->cbEsMsgFunc.to_le(), esCb->cbArg, esSpecificInfo_addr));
|
||||
esCb->cbEsMsgFunc, esCb->cbArg, esSpecificInfo_addr));
|
||||
|
||||
u32 id = Emu.GetIdManager().GetNewID(es);
|
||||
es->id = id;
|
||||
|
|
|
@ -41,7 +41,7 @@ int cellGifDecOpen(u32 mainHandle, vm::ptr<u32> subHandle, vm::ptr<CellGifDecSrc
|
|||
case se32(CELL_GIFDEC_FILE):
|
||||
// Get file descriptor
|
||||
vm::var<be_t<u32>> fd;
|
||||
int ret = cellFsOpen(src->fileName.to_le(), 0, fd, vm::ptr<const void>::make(0), 0);
|
||||
int ret = cellFsOpen(src->fileName, 0, fd, vm::ptr<const void>::make(0), 0);
|
||||
current_subHandle->fd = fd.value();
|
||||
if (ret != CELL_OK) return CELL_GIFDEC_ERROR_OPEN_FILE;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ int cellJpgDecOpen(u32 mainHandle, vm::ptr<u32> subHandle, vm::ptr<CellJpgDecSrc
|
|||
case se32(CELL_JPGDEC_FILE):
|
||||
// Get file descriptor
|
||||
vm::var<be_t<u32>> fd;
|
||||
int ret = cellFsOpen(src->fileName.to_le(), 0, fd, vm::ptr<const void>::make(0), 0);
|
||||
int ret = cellFsOpen(src->fileName, 0, fd, vm::ptr<const void>::make(0), 0);
|
||||
current_subHandle->fd = fd.value();
|
||||
if (ret != CELL_OK) return CELL_JPGDEC_ERROR_OPEN_FILE;
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ s32 pngDecOpen(
|
|||
case se32(CELL_PNGDEC_FILE):
|
||||
// Get file descriptor
|
||||
vm::var<be_t<u32>> fd;
|
||||
int ret = cellFsOpen(src->fileName.to_le(), 0, fd, vm::ptr<const void>::make(0), 0);
|
||||
int ret = cellFsOpen(src->fileName, 0, fd, vm::ptr<const void>::make(0), 0);
|
||||
stream->fd = fd.value();
|
||||
if (ret != CELL_OK) return CELL_PNGDEC_ERROR_OPEN_FILE;
|
||||
|
||||
|
|
|
@ -382,9 +382,9 @@ s32 cellSaveDataListSave2(
|
|||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
|
||||
setSaveDataList(saveEntries, listSet->fixedList.to_le(), listSet->fixedListNum);
|
||||
setSaveDataList(saveEntries, listSet->fixedList, listSet->fixedListNum);
|
||||
if (listSet->newData)
|
||||
addNewSaveDataEntry(saveEntries, listSet->newData.to_le());
|
||||
addNewSaveDataEntry(saveEntries, listSet->newData);
|
||||
if (saveEntries.size() == 0) {
|
||||
cellSysutil.Error("cellSaveDataListSave2: No save entries found!"); // TODO: Find a better way to handle this error
|
||||
return CELL_OK;
|
||||
|
@ -474,9 +474,9 @@ s32 cellSaveDataListLoad2(
|
|||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
|
||||
setSaveDataList(saveEntries, listSet->fixedList.to_le(), listSet->fixedListNum);
|
||||
setSaveDataList(saveEntries, listSet->fixedList, listSet->fixedListNum);
|
||||
if (listSet->newData)
|
||||
addNewSaveDataEntry(saveEntries, listSet->newData.to_le());
|
||||
addNewSaveDataEntry(saveEntries, listSet->newData);
|
||||
if (saveEntries.size() == 0) {
|
||||
cellSysutil.Error("cellSaveDataListLoad2: No save entries found!"); // TODO: Find a better way to handle this error
|
||||
return CELL_OK;
|
||||
|
|
|
@ -576,7 +576,7 @@ int cellVdecOpen(vm::ptr<const CellVdecType> type, vm::ptr<const CellVdecResourc
|
|||
cellVdec.Warning("cellVdecOpen(type_addr=0x%x, res_addr=0x%x, cb_addr=0x%x, handle_addr=0x%x)",
|
||||
type.addr(), res.addr(), cb.addr(), handle.addr());
|
||||
|
||||
*handle = vdecOpen(new VideoDecoder(type->codecType, type->profileLevel, res->memAddr, res->memSize, cb->cbFunc.to_le(), cb->cbArg));
|
||||
*handle = vdecOpen(new VideoDecoder(type->codecType, type->profileLevel, res->memAddr, res->memSize, cb->cbFunc, cb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -586,7 +586,7 @@ int cellVdecOpenEx(vm::ptr<const CellVdecTypeEx> type, vm::ptr<const CellVdecRes
|
|||
cellVdec.Warning("cellVdecOpenEx(type_addr=0x%x, res_addr=0x%x, cb_addr=0x%x, handle_addr=0x%x)",
|
||||
type.addr(), res.addr(), cb.addr(), handle.addr());
|
||||
|
||||
*handle = vdecOpen(new VideoDecoder(type->codecType, type->profileLevel, res->memAddr, res->memSize, cb->cbFunc.to_le(), cb->cbArg));
|
||||
*handle = vdecOpen(new VideoDecoder(type->codecType, type->profileLevel, res->memAddr, res->memSize, cb->cbFunc, cb->cbArg));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ s32 sys_lwcond_signal(vm::ptr<sys_lwcond_t> lwcond)
|
|||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
auto mutex = lwcond->lwmutex.to_le();
|
||||
auto mutex = lwcond->lwmutex;
|
||||
|
||||
if (u32 target = lw->queue.signal(mutex->attribute))
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ s32 sys_lwcond_signal_all(vm::ptr<sys_lwcond_t> lwcond)
|
|||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
auto mutex = lwcond->lwmutex.to_le();
|
||||
auto mutex = lwcond->lwmutex;
|
||||
|
||||
while (u32 target = lw->queue.signal(mutex->attribute))
|
||||
{
|
||||
|
@ -141,7 +141,7 @@ s32 sys_lwcond_wait(PPUThread& CPU, vm::ptr<sys_lwcond_t> lwcond, u64 timeout)
|
|||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
auto mutex = lwcond->lwmutex.to_le();
|
||||
auto mutex = lwcond->lwmutex;
|
||||
u32 tid_le = CPU.GetId();
|
||||
auto tid = be_t<u32>::make(tid_le);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue