From 5aa9ffef85725f617f941527872a546d39dec4fa Mon Sep 17 00:00:00 2001
From: acidicoala <67734819+acidicoala@users.noreply.github.com>
Date: Sun, 5 Oct 2025 07:31:05 +0500
Subject: [PATCH] Refactored lib and module namespaces
---
.idea/dictionaries/project.xml | 3 +++
.../runConfigurations/linux_exports_generator__64_.xml | 2 +-
.../steamworks_downloader__prompt_.xml | 2 +-
.idea/runConfigurations/steamworks_parser.xml | 2 +-
.../windows_exports_generator__64_.xml | 2 +-
KoalaBox | 2 +-
src/smoke_api/smoke_api.cpp | 10 +++++-----
tools/src/steamworks_downloader.cpp | 4 ++--
8 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/.idea/dictionaries/project.xml b/.idea/dictionaries/project.xml
index 65d6e43..770917f 100644
--- a/.idea/dictionaries/project.xml
+++ b/.idea/dictionaries/project.xml
@@ -23,6 +23,7 @@
libgtk
libsteam
memcpy
+ peparse
phnt
polyhook
rtld
@@ -30,6 +31,8 @@
steamapi
steamapps
steamclient
+ winhttp
+ winmm
wstr
diff --git a/.idea/runConfigurations/linux_exports_generator__64_.xml b/.idea/runConfigurations/linux_exports_generator__64_.xml
index fb84d06..4c9d705 100644
--- a/.idea/runConfigurations/linux_exports_generator__64_.xml
+++ b/.idea/runConfigurations/linux_exports_generator__64_.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/.idea/runConfigurations/steamworks_downloader__prompt_.xml b/.idea/runConfigurations/steamworks_downloader__prompt_.xml
index 75bb294..a774a35 100644
--- a/.idea/runConfigurations/steamworks_downloader__prompt_.xml
+++ b/.idea/runConfigurations/steamworks_downloader__prompt_.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/.idea/runConfigurations/steamworks_parser.xml b/.idea/runConfigurations/steamworks_parser.xml
index 2a728c4..504d4c0 100644
--- a/.idea/runConfigurations/steamworks_parser.xml
+++ b/.idea/runConfigurations/steamworks_parser.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/.idea/runConfigurations/windows_exports_generator__64_.xml b/.idea/runConfigurations/windows_exports_generator__64_.xml
index 5d96401..e4b4d6d 100644
--- a/.idea/runConfigurations/windows_exports_generator__64_.xml
+++ b/.idea/runConfigurations/windows_exports_generator__64_.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/KoalaBox b/KoalaBox
index cccc188..3ac6456 160000
--- a/KoalaBox
+++ b/KoalaBox
@@ -1 +1 @@
-Subproject commit cccc188870dcfae8ba55fa753aebbe24de618ccb
+Subproject commit 3ac6456c3c3717ad339d728c7000e3535ffb5345
diff --git a/src/smoke_api/smoke_api.cpp b/src/smoke_api/smoke_api.cpp
index 1543697..f112b63 100644
--- a/src/smoke_api/smoke_api.cpp
+++ b/src/smoke_api/smoke_api.cpp
@@ -106,7 +106,7 @@ namespace {
static const auto CreateInterface$ = KB_LIB_GET_FUNC(steamclient_handle, CreateInterface);
- if(auto* steamapi_handle = kb::lib::get_library_handle(STEAM_API_MODULE)) {
+ if(auto* steamapi_handle = kb::lib::get_lib_handle(STEAM_API_MODULE)) {
// SteamAPI might have been initialized.
// Hence, we need to query SteamClient interfaces and hook them if needed.
const auto steamclient_versions = find_steamclient_versions(steamapi_handle);
@@ -176,7 +176,7 @@ namespace {
return std::nullopt;
}
- void init_hook_mode(void* self_module_handle) {
+ void init_hook_mode([[maybe_unused]] void* self_module_handle) {
is_hook_mode = true;
#ifdef KB_LINUX
// Because we got injected via LD_PRELOAD,
@@ -187,7 +187,7 @@ namespace {
for(const auto& lib_path : glob::rglob({"./" + lib_name, "**/" + lib_name})) {
if(const auto lib_bitness = kb::lib::get_bitness(lib_path)) {
if(static_cast(*lib_bitness) == kb::platform::bitness) {
- if(const auto lib_handle = kb::lib::load_library(lib_path)) {
+ if(const auto lib_handle = kb::lib::load(lib_path)) {
LOG_INFO("Found original library: {}", kb::path::to_str(lib_path));
original_steamapi_handle = *lib_handle;
@@ -204,7 +204,7 @@ namespace {
#endif
}
- void init_proxy_mode(void* self_module_handle) {
+ void init_proxy_mode([[maybe_unused]] void* self_module_handle) {
is_hook_mode = true;
original_steamapi_handle = kb::lib::load_original_library(kb::paths::get_self_dir(), STEAM_API_MODULE);
@@ -262,7 +262,7 @@ namespace smoke_api {
void shutdown() {
try {
if(original_steamapi_handle != nullptr) {
- kb::lib::unload_library(original_steamapi_handle);
+ kb::lib::unload(original_steamapi_handle);
original_steamapi_handle = nullptr;
}
diff --git a/tools/src/steamworks_downloader.cpp b/tools/src/steamworks_downloader.cpp
index 9f98744..5f1f188 100644
--- a/tools/src/steamworks_downloader.cpp
+++ b/tools/src/steamworks_downloader.cpp
@@ -8,7 +8,7 @@
#include
#include
#include
-#include
+#include
namespace {
namespace fs = std::filesystem;
@@ -90,7 +90,7 @@ namespace {
}
void unzip_sdk(const fs::path& zip_file_path, const fs::path& unzip_dir) {
- kb::zip::extract_files(
+ kb::tools::zip::extract_files(
zip_file_path,
[&](const std::string& name, const bool) {
if(name.starts_with("sdk/public/steam/") && name.ends_with(".h")) {