mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
Libraries: Improved libSceHmd stubs (#3442)
* Initial work * More work * More stuff * Update hmd.cpp * Separate Reprojection and Distortion functions Mainly doing this to clean up the code, since these sub-libraries are fairly self-contained. * Fix weird Git issue * Improve error documentation After thorough decompilation, it seems clear that Sony didn't really put much thought into how libSceHmd behaves with no headset connected. * Fix sceHmdGet2DEyeOffset * Update hmd.cpp * Add sceHmdInternalGetDeviceInformation and sceHmdInternalGetDeviceInformationByHandle Based entirely off decompilation, these two functions are internally the cause of much of my trouble with this library. They're also called by libSceVrTracker, but I don't think we'll be LLE'ing that anytime soon. * Cleanup * sceHmdGetAssyError Struct isn't fully decompiled, but since it goes entirely unused when PSVR is disconnected, it doesn't matter too much. I'm pretty certain it's 4 floats though, based on what I've decompiled of this function. * More organization and fixes * sceHmdGetInertialSensorData Behavior should be fully accurate, but I've left the stub log since I haven't decompiled the parameters properly. Also gave NID aTg7K0466r8 a proper name, based on what I've seen while decompiling. It behaves identically to sceHmdGetInertialSensorData, but with a slight difference in the params used for an internal function call. * Update hmd.cpp * Revert name change * Organizational changes These two functions modify internal variables used exclusively by reprojection functions. * Remove internal device information calls * Log PSVR-related attributes from param.sfo Would mainly be helpful for compatibility list moderation, since these notices will be much more reliable for games that crash instantly. * Remove unnecessary includes
This commit is contained in:
@@ -166,6 +166,8 @@ void Emulator::Run(std::filesystem::path file, const std::vector<std::string> ar
|
||||
if (param_sfo_exists) {
|
||||
LOG_INFO(Loader, "Game id: {} Title: {}", id, title);
|
||||
LOG_INFO(Loader, "Fw: {:#x} App Version: {}", fw_version, app_version);
|
||||
LOG_INFO(Loader, "PSVR Supported: {}", (bool)psf_attributes.support_ps_vr.Value());
|
||||
LOG_INFO(Loader, "PSVR Required: {}", (bool)psf_attributes.require_ps_vr.Value());
|
||||
}
|
||||
if (!args.empty()) {
|
||||
const auto argc = std::min<size_t>(args.size(), 32);
|
||||
|
||||
Reference in New Issue
Block a user