mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-01-27 15:02:51 -05:00
Fixed unicode paths
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
8
src/steam_api/exports/steam_api.hpp
Normal file
8
src/steam_api/exports/steam_api.hpp
Normal 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();
|
||||
@@ -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"
|
||||
);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user