Skip to content

Commit

Permalink
Merge branch 'nillerusr:master' into win32
Browse files Browse the repository at this point in the history
  • Loading branch information
er2off authored Jul 13, 2023
2 parents 9426857 + 0235b1e commit 71d8343
Show file tree
Hide file tree
Showing 9 changed files with 241 additions and 433 deletions.
2 changes: 2 additions & 0 deletions filesystem/filesystem_stdio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ int CFileSystem_Stdio::FS_stat( const char *pathT, struct _stat *buf, bool *pbLo
int rt = _stat( path, buf );

// Workaround bug wherein stat() randomly fails on Windows XP. See comment on function.
/*
#if defined(_WIN32) && defined(FILESYSTEM_MSVC2015_STAT_BUG_WORKAROUND)
if ( rt == -1 )
{
Expand All @@ -706,6 +707,7 @@ int CFileSystem_Stdio::FS_stat( const char *pathT, struct _stat *buf, bool *pbLo
}
}
#endif // defined(_WIN32) && defined(FILESYSTEM_MSVC2015_STAT_BUG_WORKAROUND)
*/

#if defined(LINUX) || defined(PLATFORM_BSD)
if ( rt == -1 )
Expand Down
3 changes: 3 additions & 0 deletions scripts/waifulib/vpc_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def fix_dos_path( path ):
if find_path == '': find_path = './'
else: find_path += '/'

if not os.path.exists(find_path):
return find_path+filename

dirlist = os.listdir(find_path)
for file in dirlist:
if file == filename:
Expand Down
185 changes: 185 additions & 0 deletions stub_steam/steam_api.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
#define _CRT_SECURE_NO_WARNINGS
#define STEAM_API_EXPORTS

#if defined __GNUC__
#define S_API extern "C" __attribute__ ((visibility("default")))
#elif defined _MSC_VER
#define S_API extern "C" __declspec(dllexport)
#endif
#define NULL 0

S_API void *g_pSteamClientGameServer;
void *g_pSteamClientGameServer = NULL;

//steam_api.h
S_API bool SteamAPI_Init() {
return true;
}

S_API bool SteamAPI_InitSafe() {
return true;
}

S_API void SteamAPI_Shutdown() {

}

S_API bool SteamAPI_RestartAppIfNecessary() {
return false;
}

S_API void SteamAPI_ReleaseCurrentThreadMemory() {

}

S_API void SteamAPI_WriteMiniDump() {

}

S_API void SteamAPI_SetMiniDumpComment() {

}

S_API void SteamAPI_RunCallbacks() {
}

S_API void SteamAPI_RegisterCallback() {

}

S_API void SteamAPI_UnregisterCallback() {

}

S_API void SteamAPI_RegisterCallResult() {

}

S_API void SteamAPI_UnregisterCallResult() {

}

S_API bool SteamAPI_IsSteamRunning() {
return false;
}

S_API void Steam_RunCallbacks() {

}

S_API void Steam_RegisterInterfaceFuncs() {
}

S_API int Steam_GetHSteamUserCurrent() {
return 0;
}

S_API const char *SteamAPI_GetSteamInstallPath() {
return NULL;
}

S_API int SteamAPI_GetHSteamPipe() {
return 0;
}

S_API void SteamAPI_SetTryCatchCallbacks() {

}

S_API void SteamAPI_SetBreakpadAppID() {

}

S_API void SteamAPI_UseBreakpadCrashHandler() {

}

S_API int GetHSteamPipe() {
return 0;
}

S_API int GetHSteamUser() {
return 0;
}

S_API int SteamAPI_GetHSteamUser() {
return 0;
}

S_API void *SteamInternal_ContextInit() {
return NULL;
}

S_API void *SteamInternal_CreateInterface() {
return NULL;
}

S_API void *SteamApps() {
return NULL;
}

S_API void *SteamClient() {
return NULL;
}

S_API void *SteamFriends() {
return NULL;
}

S_API void *SteamHTTP() {
return NULL;
}

S_API void *SteamMatchmaking() {
return NULL;
}

S_API void *SteamMatchmakingServers() {
return NULL;
}

S_API void *SteamNetworking() {
return NULL;
}

S_API void *SteamRemoteStorage() {
return NULL;
}

S_API void *SteamScreenshots() {
return NULL;
}

S_API void *SteamUser() {
return NULL;
}

S_API void *SteamUserStats() {
return NULL;
}

S_API void *SteamUtils() {
return NULL;
}

S_API int SteamGameServer_GetHSteamPipe() {
return 0;
}

S_API int SteamGameServer_GetHSteamUser() {
return 0;
}

S_API int SteamGameServer_GetIPCCallCount() {
return 0;
}

S_API int SteamGameServer_InitSafe() {
return 0;
}

S_API void SteamGameServer_RunCallbacks() {
}

S_API void SteamGameServer_Shutdown() {
}
46 changes: 46 additions & 0 deletions stub_steam/wscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#! /usr/bin/env python
# encoding: utf-8

from waflib import Utils
import os

top = '.'
PROJECT_NAME = 'steam_api'

def options(opt):
# stub
return

def configure(conf):
return

def build(bld):
source = [
'steam_api.cpp'
]

includes = [
'.',
'../public',
'../public/tier0',
] + bld.env.INCLUDES_SDL2

defines = []

libs = []

install_path = None if bld.env.BUILD_SDK else bld.env.LIBDIR

bld.shlib(
source = source,
target = PROJECT_NAME,
name = PROJECT_NAME,
features = 'c cxx',
includes = includes,
defines = defines,
install_path = install_path,
use = libs,
subsystem = bld.env.MSVC_SUBSYSTEM,
idx = bld.get_taskgen_count()
)

2 changes: 1 addition & 1 deletion thirdparty
2 changes: 1 addition & 1 deletion tier0/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def build(bld):
else:
libs = ['DL', 'M', 'LOG']

install_path = bld.env.LIBDIR
install_path = None if bld.env.BUILD_SDK else bld.env.LIBDIR

bld.shlib(
source = source,
Expand Down
Loading

0 comments on commit 71d8343

Please sign in to comment.