summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/sv_game.c2
-rw-r--r--source/sys_win.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/source/sv_game.c b/source/sv_game.c
index 77020f5..350bcac 100644
--- a/source/sv_game.c
+++ b/source/sv_game.c
@@ -942,7 +942,7 @@ void SV_InitGameProgs ( void )
// get features
ggf = Sys_GetProcAddress( game_library, "GetGameFeatures" );
if( ggf ) {
-// gameFeatures = ggf( GAME_FEATURE_CLIENTNUM );
+ gameFeatures = ggf( GAME_FEATURE_CLIENTNUM );
}
// initialize
diff --git a/source/sys_win.c b/source/sys_win.c
index d5966d1..6327103 100644
--- a/source/sys_win.c
+++ b/source/sys_win.c
@@ -1016,13 +1016,14 @@ char **Sys_ListFiles( const char *rawPath, const char *extension, uint32 flags,
Com_ReplaceSeparators( findPath, '\\' );
Sys_ListFilteredFiles( listedFiles, &count, path, findPath, flags, length + 1 );
} else {
- if( extension ) {
+ if( !extension || strchr( extension, ';' ) ) {
+ Com_sprintf( findPath, sizeof( findPath ), "%s\\*", path );
+ } else {
if( *extension == '.' ) {
extension++;
}
Com_sprintf( findPath, sizeof( findPath ), "%s\\*.%s", path, extension );
- } else {
- Com_sprintf( findPath, sizeof( findPath ), "%s\\*", path );
+ extension = NULL; // do not check later
}
findHandle = FindFirstFileA( findPath, &findInfo );
@@ -1045,6 +1046,10 @@ char **Sys_ListFiles( const char *rawPath, const char *extension, uint32 flags,
}
}
+ if( extension && !FS_ExtCmp( extension, findInfo.cFileName ) ) {
+ continue;
+ }
+
name = ( flags & FS_SEARCH_SAVEPATH ) ? va( "%s\\%s", path, findInfo.cFileName ) : findInfo.cFileName;
if( flags & FS_SEARCH_EXTRAINFO ) {