2016-07-12 00:40:13 +00:00
# include "hash.h"
/*
Threading :
When the main thread will harm the filesystem tree / hash , it will first lock fs_thread_mutex ( FIXME : make a proper rwlock ) .
Worker threads must thus lock that mutex for any opens ( to avoid it changing underneath it ) , but can unlock it as soon as the open call returns .
Files may be shared between threads , but not simultaneously .
The filesystem driver is responsible for closing the pak / pk3 once all files are closed , and must ensure that opens + reads + closes as well as archive closure are thread safe .
*/
2021-05-28 07:07:48 +00:00
# define FSVER 3
2016-07-12 00:40:13 +00:00
# define FF_NOTFOUND (0u) //file wasn't found
# define FF_FOUND (1u<<0u) //file was found
# define FF_SYMLINK (1u<<1u) //file contents are the name of a different file (symlink). do a recursive lookup on the name
# define FF_DIRECTORY (1u<<2u)
typedef struct
{
bucket_t buck ;
int depth ; /*shallower files will remove deeper files*/
} fsbucket_t ;
extern hashtable_t filesystemhash ; //this table is the one to build your hash references into
extern int fs_hash_dups ; //for tracking efficiency. no functional use.
extern int fs_hash_files ; //for tracking efficiency. no functional use.
extern qboolean fs_readonly ; //if true, fopen(, "w") should always fail.
extern void * fs_thread_mutex ;
2017-12-15 06:56:40 +00:00
extern float fs_accessed_time ;
2016-07-12 00:40:13 +00:00
struct searchpath_s ;
struct searchpathfuncs_s
{
int fsver ;
2021-05-28 07:07:48 +00:00
void ( QDECL * ClosePath ) ( searchpathfuncs_t * handle ) ; //removes a reference, kills it when it reaches 0. the package can only actually be killed once all contained files are closed.
void ( QDECL * AddReference ) ( searchpathfuncs_t * handle ) ; //adds an extra reference, so we survive closes better.
2016-07-12 00:40:13 +00:00
void ( QDECL * GetPathDetails ) ( searchpathfuncs_t * handle , char * outdetails , size_t sizeofdetails ) ;
void ( QDECL * BuildHash ) ( searchpathfuncs_t * handle , int depth , void ( QDECL * FS_AddFileHash ) ( int depth , const char * fname , fsbucket_t * filehandle , void * pathhandle ) ) ;
unsigned int ( QDECL * FindFile ) ( searchpathfuncs_t * handle , flocation_t * loc , const char * name , void * hashedresult ) ; //true if found (hashedresult can be NULL)
//note that if rawfile and offset are set, many Com_FileOpens will read the raw file
//otherwise ReadFile will be called instead.
void ( QDECL * ReadFile ) ( searchpathfuncs_t * handle , flocation_t * loc , char * buffer ) ; //reads the entire file in one go (size comes from loc, so make sure the loc is valid, this is for performance with compressed archives)
int ( QDECL * EnumerateFiles ) ( searchpathfuncs_t * handle , const char * match , int ( QDECL * func ) ( const char * fname , qofs_t fsize , time_t mtime , void * parm , searchpathfuncs_t * spath ) , void * parm ) ;
int ( QDECL * GeneratePureCRC ) ( searchpathfuncs_t * handle , int seed , int usepure ) ;
vfsfile_t * ( QDECL * OpenVFS ) ( searchpathfuncs_t * handle , flocation_t * loc , const char * mode ) ;
qboolean ( QDECL * PollChanges ) ( searchpathfuncs_t * handle ) ; //returns true if there were changes
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
qboolean ( QDECL * FileStat ) ( searchpathfuncs_t * handle , flocation_t * loc , time_t * mtime ) ;
2019-05-23 15:11:32 +00:00
qboolean ( QDECL * CreateFile ) ( searchpathfuncs_t * handle , flocation_t * loc , const char * filename ) ; //like FindFile, but returns a usable loc even if the file does not exist yet (may also create requisite directories too)
qboolean ( QDECL * RenameFile ) ( searchpathfuncs_t * handle , const char * oldname , const char * newname ) ; //returns true on success, false if source doesn't exist, or if dest does (cached locs may refer to either new or old name).
2016-07-12 00:40:13 +00:00
qboolean ( QDECL * RemoveFile ) ( searchpathfuncs_t * handle , const char * filename ) ; //returns true on success, false if it wasn't found or is readonly.
} ;
//searchpathfuncs_t *(QDECL *OpenNew)(vfsfile_t *file, const char *desc); //returns a handle to a new pak/path
//the stdio filesystem is special as that's the starting point of the entire filesystem
//warning: the handle is known to be a string pointer to the dir name
2018-03-04 14:41:16 +00:00
extern searchpathfuncs_t * ( QDECL VFSOS_OpenPath ) ( vfsfile_t * file , searchpathfuncs_t * parent , const char * filename , const char * desc , const char * prefix ) ;
extern searchpathfuncs_t * ( QDECL FSZIP_LoadArchive ) ( vfsfile_t * file , searchpathfuncs_t * parent , const char * filename , const char * desc , const char * prefix ) ;
extern searchpathfuncs_t * ( QDECL FSPAK_LoadArchive ) ( vfsfile_t * file , searchpathfuncs_t * parent , const char * filename , const char * desc , const char * prefix ) ;
extern searchpathfuncs_t * ( QDECL FSDWD_LoadArchive ) ( vfsfile_t * file , searchpathfuncs_t * parent , const char * filename , const char * desc , const char * prefix ) ;
extern searchpathfuncs_t * ( QDECL FSDZ_LoadArchive ) ( vfsfile_t * file , searchpathfuncs_t * parent , const char * filename , const char * desc , const char * prefix ) ;
2016-07-12 00:40:13 +00:00
vfsfile_t * QDECL VFSOS_Open ( const char * osname , const char * mode ) ;
vfsfile_t * FS_DecompressGZip ( vfsfile_t * infile , vfsfile_t * outfile ) ;
2018-03-04 14:41:16 +00:00
int FS_RegisterFileSystemType ( void * module , const char * extension , searchpathfuncs_t * ( QDECL * OpenNew ) ( vfsfile_t * file , searchpathfuncs_t * parent , const char * filename , const char * desc , const char * prefix ) , qboolean loadscan ) ;
2016-07-12 00:40:13 +00:00
void FS_UnRegisterFileSystemType ( int idx ) ;
void FS_UnRegisterFileSystemModule ( void * module ) ;
2017-11-23 07:46:39 +00:00
void FS_AddHashedPackage ( searchpath_t * * oldpaths , const char * parent_pure , const char * parent_logical , searchpath_t * search , unsigned int loadstuff , const char * pakpath , const char * qhash , const char * pakprefix , unsigned int packageflags ) ;
2016-08-25 00:12:14 +00:00
void PM_LoadPackages ( searchpath_t * * oldpaths , const char * parent_pure , const char * parent_logical , searchpath_t * search , unsigned int loadstuff , int minpri , int maxpri ) ;
2021-07-01 01:17:07 +00:00
void * PM_GeneratePackageFromMeta ( vfsfile_t * file , char * fname , size_t fnamesize , enum fs_relative * fsroot ) ;
void PM_FileInstalled ( const char * filename , enum fs_relative fsroot , void * metainfo , qboolean enable ) ; //we finished installing a file via some other mechanism (drag+drop or from server. insert it into the updates menu.
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
void PM_EnumeratePlugins ( void ( * callback ) ( const char * name ) ) ;
2021-07-17 15:11:35 +00:00
struct xcommandargcompletioncb_s ;
void PM_EnumerateMaps ( const char * partial , struct xcommandargcompletioncb_s * ctx ) ;
void PM_LoadMap ( const char * package , const char * map ) ;
2017-03-04 19:36:06 +00:00
int PM_IsApplying ( qboolean listsonly ) ;
2019-03-23 07:06:37 +00:00
unsigned int PM_MarkUpdates ( void ) ; //mark new/updated packages as needing install.
void PM_ApplyChanges ( void ) ; //for -install/-doinstall args
2017-03-04 19:46:37 +00:00
void PM_ManifestPackage ( const char * name , int security ) ;
2021-06-21 13:46:23 +00:00
qboolean PM_AreSourcesNew ( qboolean doprompt ) ;
2017-01-24 10:27:39 +00:00
qboolean PM_FindUpdatedEngine ( char * syspath , size_t syspathsize ) ; //names the engine we should be running
2020-04-19 01:23:32 +00:00
void PM_AddManifestPackages ( ftemanifest_t * man ) ;
2016-08-25 00:12:14 +00:00
void Menu_Download_Update ( void ) ;
2021-07-17 15:11:35 +00:00
typedef struct
{
char * description ;
void ( * Update ) ( const char * url , vfsfile_t * out ) ;
# define plugupdatesourcefuncs_name "UpdateSource"
} plugupdatesourcefuncs_t ;
qboolean PM_RegisterUpdateSource ( void * module , plugupdatesourcefuncs_t * funcs ) ;
2016-09-01 14:31:24 +00:00
int FS_EnumerateKnownGames ( qboolean ( * callback ) ( void * usr , ftemanifest_t * man ) , void * usr ) ;
2016-07-12 00:40:13 +00:00
2020-04-19 01:23:32 +00:00
struct modlist_s
{
ftemanifest_t * manifest ;
char * gamedir ;
char * description ;
} ;
struct modlist_s * Mods_GetMod ( size_t diridx ) ;
2016-07-12 00:40:13 +00:00
# define SPF_REFERENCED 1 //something has been loaded from this path. should filter out client references...
# define SPF_COPYPROTECTED 2 //downloads are not allowed fom here.
# define SPF_TEMPORARY 4 //a map-specific path, purged at map change.
# define SPF_EXPLICIT 8 //a root gamedir (bumps depth on gamedir depth checks).
# define SPF_UNTRUSTED 16 //has been downloaded from somewhere. configs inside it should never be execed with local access rights.
2019-05-23 15:11:32 +00:00
# define SPF_PRIVATE 32 //private to the client. ie: the fte dir. name is not networked.
2016-07-12 00:40:13 +00:00
# define SPF_WRITABLE 64 //safe to write here. lots of weird rules etc.
# define SPF_BASEPATH 128 //part of the basegames, and not the mod gamedir(s).
2020-04-29 10:43:22 +00:00
# define SPF_QSHACK 256 //part of the basegames, and not the mod gamedir(s).
2016-07-12 00:40:13 +00:00
qboolean FS_LoadPackageFromFile ( vfsfile_t * vfs , char * pname , char * localname , int * crc , unsigned int flags ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
# ifdef AVAIL_XZDEC
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
vfsfile_t * FS_XZ_DecompressWriteFilter ( vfsfile_t * infile ) ;
2021-06-02 15:29:44 +00:00
vfsfile_t * FS_XZ_DecompressReadFilter ( vfsfile_t * srcfile ) ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
# endif
# ifdef AVAIL_GZDEC
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
vfsfile_t * FS_GZ_WriteFilter ( vfsfile_t * outfile , qboolean autoclosefile , qboolean compress ) ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
# endif