diff --git a/src/Core/PS4/HLE/LibC.cpp b/src/Core/PS4/HLE/LibC.cpp index ab6c9ccd..5c5a725c 100644 --- a/src/Core/PS4/HLE/LibC.cpp +++ b/src/Core/PS4/HLE/LibC.cpp @@ -79,6 +79,7 @@ void LibC_Register(SymbolsResolver* sym) { LIB_FUNCTION("j4ViWNHEgww", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strlen); LIB_FUNCTION("6sJWiWSRuqk", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strncpy); LIB_FUNCTION("+P6FRGH4LfA", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::memmove); + LIB_FUNCTION("EH-x713A99c", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::atan2f); LIB_OBJ("P330P3dFF68", "libc", 1, "libc", 1, 1, &HLE::Libs::LibC::g_need_sceLibc); LIB_FUNCTION("z+P+xCnWLBk", "libc", 1, "libc", 1, 1, _ZdlPv); diff --git a/src/Emulator/HLE/Libraries/LibC/libc.cpp b/src/Emulator/HLE/Libraries/LibC/libc.cpp index c5ecb8cf..cc1ed59c 100644 --- a/src/Emulator/HLE/Libraries/LibC/libc.cpp +++ b/src/Emulator/HLE/Libraries/LibC/libc.cpp @@ -2,6 +2,7 @@ #include +#include #include #include @@ -42,4 +43,6 @@ char* PS4_SYSV_ABI strncpy(char* dest, const char* src, size_t count) { return s void* PS4_SYSV_ABI memmove(void* dest, const void* src, std::size_t count) { return std::memmove(dest, src, count); } +float PS4_SYSV_ABI atan2f(float y, float x) { return std::atan2f(y, x); } + }; // namespace Emulator::HLE::Libraries::LibC \ No newline at end of file diff --git a/src/Emulator/HLE/Libraries/LibC/libc.h b/src/Emulator/HLE/Libraries/LibC/libc.h index 2c5412a1..47f1cc32 100644 --- a/src/Emulator/HLE/Libraries/LibC/libc.h +++ b/src/Emulator/HLE/Libraries/LibC/libc.h @@ -20,4 +20,6 @@ int PS4_SYSV_ABI strcmp(const char* str1, const char* str2); size_t PS4_SYSV_ABI strlen(const char* str); char* PS4_SYSV_ABI strncpy(char* dest, const char* src, size_t count); void* PS4_SYSV_ABI memmove(void* dest, const void* src, std::size_t count); +float PS4_SYSV_ABI atan2f(float y, float x); + } // namespace Emulator::HLE::Libraries::LibC \ No newline at end of file