mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-10 11:42:04 -06:00
Merge branch 'shadps4-emu:main' into fontlib
This commit is contained in:
commit
8b44502b1d
@ -113,6 +113,7 @@ bool PSF::Encode(const std::filesystem::path& filepath) const {
|
||||
LOG_ERROR(Core, "Failed to write PSF file. Written {} Expected {}", written,
|
||||
psf_buffer.size());
|
||||
}
|
||||
file.Close();
|
||||
return written == psf_buffer.size();
|
||||
}
|
||||
|
||||
|
||||
@ -252,6 +252,10 @@ s32 loadModuleInternal(s32 index, s32 argc, const void* argv, s32* res_out) {
|
||||
if (init_func) {
|
||||
LOG_INFO(Loader, "Can't Load {} switching to HLE", mod_name);
|
||||
init_func(&linker->GetHLESymbols());
|
||||
|
||||
// When loading HLEs, we need to relocate imports
|
||||
// This ensures later module loads can see our HLE functions.
|
||||
linker->RelocateAllImports();
|
||||
} else {
|
||||
LOG_INFO(Loader, "No HLE available for {} module", mod_name);
|
||||
}
|
||||
|
||||
@ -125,11 +125,10 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void LoadSharedLibraries() {
|
||||
void RelocateAllImports() {
|
||||
std::scoped_lock lk{mutex};
|
||||
for (auto& module : m_modules) {
|
||||
if (module->IsSharedLib()) {
|
||||
module->Start(0, nullptr, nullptr);
|
||||
}
|
||||
Relocate(module.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -142,6 +142,14 @@ int main(int argc, char* argv[]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (!gameArgs.empty()) {
|
||||
if (gameArgs.front() == "--") {
|
||||
gameArgs.erase(gameArgs.begin());
|
||||
} else {
|
||||
std::cerr << "Error: unhandled flags\n";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ---- Apply flags ----
|
||||
if (patchFile)
|
||||
|
||||
@ -147,7 +147,7 @@ Id ImageAtomicU32CmpSwap(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords
|
||||
const auto& texture = ctx.images[handle & 0xFFFF];
|
||||
const Id pointer{ctx.OpImageTexelPointer(ctx.image_u32, texture.id, coords, ctx.ConstU32(0U))};
|
||||
const auto [scope, semantics]{AtomicArgs(ctx)};
|
||||
return (ctx.*atomic_func)(ctx.F32[1], pointer, scope, semantics, semantics, value, cmp_value);
|
||||
return (ctx.*atomic_func)(ctx.U32[1], pointer, scope, semantics, semantics, value, cmp_value);
|
||||
}
|
||||
} // Anonymous namespace
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user