wiki.icculus.org
[ front page | index | search | recent changes | git repo | offline html ]

PHYSFS_init

Initialize the PhysicsFS library.

Header File

Defined in <physfs.h>

Syntax

int PHYSFS_init(const char *argv0);

Function Parameters

const char * argv0 the argv[0] string passed to your program's mainline, or some other system-specific values.

Return Value

(int) Returns nonzero on success, zero on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Remarks

This must be called before any other PhysicsFS function.

This should be called prior to any attempts to change your process's current working directory.

argv0 may be NULL on most platforms (such as ones without a standard main() function), but you should always try to pass something in here when reasonable. Many Unix-like systems need to pass argv[0] from main() in here. However several platforms have special needs:

If argv0 is NULL, PhysicsFS will attempt to work without it, if possible.

Thread Safety

This function is not thread safe.

Version

This function is available since PhysicsFS 1.0.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryPhysicsFS


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.