@@ -279,7 +279,7 @@ unsigned int file_size_(const std::string &full_path)
279279
280280
281281#ifdef EMU_EXPERIMENTAL_BUILD
282-
282+ # include " pdk/pdk.h "
283283static std::vector<void *> loaded_libs{};
284284
285285static void load_dlls ()
@@ -295,7 +295,8 @@ static void load_dlls()
295295 std::string path (Local_Storage::get_game_settings_path () + " load_dlls" + PATH_SEPARATOR);
296296
297297 std::vector<std::string> paths (Local_Storage::get_filenames_path (path));
298- for (auto & p: paths) {
298+ for (auto & p: paths)
299+ {
299300 std::string full_path (path + p);
300301 if (!common_helpers::ends_with_i (full_path, LIB_EXTENSION)) continue ;
301302
@@ -307,10 +308,14 @@ static void load_dlls()
307308 dlopen (full_path.c_str (), RTLD_NOW | RTLD_LOCAL);
308309#endif
309310
310- if (lib_handle != nullptr ) {
311+ if (lib_handle != nullptr )
312+ {
311313 loaded_libs.push_back (reinterpret_cast <void *>(lib_handle));
314+ PDK::LoadPlugin (lib_handle);
312315 PRINT_DEBUG (" LOADED" );
313- } else {
316+ }
317+ else
318+ {
314319#ifdef __WINDOWS__
315320 PRINT_DEBUG (" FAILED, error code 0x%X" , GetLastError ());
316321#else
@@ -322,7 +327,9 @@ static void load_dlls()
322327
323328static void unload_dlls ()
324329{
325- for (auto lib_handle : loaded_libs) {
330+ for (auto lib_handle : loaded_libs)
331+ {
332+ PDK::UnloLoadPlugin (lib_handle);
326333#ifdef __WINDOWS__
327334 FreeLibrary (reinterpret_cast <HMODULE>(lib_handle));
328335#else
@@ -333,7 +340,8 @@ static void unload_dlls()
333340
334341#ifdef __WINDOWS__
335342
336- struct ips_test {
343+ struct ips_test
344+ {
337345 uint32_t ip_from;
338346 uint32_t ip_to;
339347};
0 commit comments