Fixed unicode paths

This commit is contained in:
acidicoala
2025-08-24 19:29:54 +05:00
parent e08cf014d1
commit 83d6df449c
11 changed files with 80 additions and 61 deletions

View File

@@ -1,23 +1,20 @@
#include <koalabox/logger.hpp>
#include "steam_api/exports/steam_api.hpp"
#include "smoke_api.hpp"
#include "smoke_api/config.hpp"
// TODO: Support in hook mode
DLL_EXPORT(bool) SteamAPI_RestartAppIfNecessary(const uint32_t unOwnAppID) {
DLL_EXPORT(bool) SteamAPI_RestartAppIfNecessary(const AppId_t unOwnAppID) {
if(smoke_api::config::instance.override_app_id != 0) {
LOG_DEBUG("{} -> {}. Preventing app restart", unOwnAppID, __func__);
return false;
}
// Note: Assumes proxy mode only
MODULE_CALL(SteamAPI_RestartAppIfNecessary, unOwnAppID);
AUTO_CALL(SteamAPI_RestartAppIfNecessary, unOwnAppID);
}
// TODO: Support in hook mode
DLL_EXPORT(void) SteamAPI_Shutdown() {
LOG_INFO("{} -> Game requested shutdown", __func__);
// Note: Assumes proxy mode only
MODULE_CALL(SteamAPI_Shutdown);
AUTO_CALL(SteamAPI_Shutdown);
}

View File

@@ -0,0 +1,8 @@
#pragma once
#include "smoke_api.hpp"
#include "smoke_api/types.hpp"
DLL_EXPORT(bool) SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID);
DLL_EXPORT(void) SteamAPI_Shutdown();

View File

@@ -3,7 +3,7 @@
#include <koalabox/logger.hpp>
#include <koalabox/util.hpp>
#include <koalabox/win_util.hpp>
#include <koalabox/win.hpp>
#include "smoke_api.hpp"
#include "steam_api/steam_client.hpp"
@@ -23,7 +23,7 @@ namespace {
if(not version_map.contains(version_prefix)) {
try {
const std::string rdata = kb::win_util::get_pe_section_data_or_throw(
const std::string rdata = kb::win::get_pe_section_data_or_throw(
smoke_api::steamapi_module,
".rdata"
);

View File

@@ -6,7 +6,7 @@
#include <koalabox/hook.hpp>
#include <koalabox/logger.hpp>
#include <koalabox/util.hpp>
#include <koalabox/win_util.hpp>
#include <koalabox/win.hpp>
#include "smoke_api.hpp"
#include "virtuals/steam_api_virtuals.hpp"
@@ -113,7 +113,7 @@ namespace steam_interface {
namespace kb = koalabox;
AppId_t get_app_id_or_throw() {
const auto app_id_str = kb::win_util::get_env_var("SteamAppId");
const auto app_id_str = kb::win::get_env_var("SteamAppId");
return std::stoi(app_id_str);
}