Mupen64Plus v2.0 Core Basic

From Mupen64Plus Wiki
Revision as of 21:46, 21 July 2015 by Richard42 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Mupen64Plus v2.0 API

Mupen64Plus v2.0 Basic Core API

Most libmupen64plus functions return an m64p_error return code, which is an enumerated type defined in m64p_types.h. Front-end code should check the return value of each call to a libmupen64plus function.

Prototype m64p_error PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, int *APIVersion, const char **PluginNamePtr, int *Capabilities)
Input Parameters PluginType Pointer to an enumerated type to store the plugin type. The value M64PLUGIN_CORE will always be stored.

PluginVersion Pointer to an integer to store the version number of the Mupen64Plus core. Version number 2.1.3 would be stored as 0x00020103.
APIVersion Pointer to an integer to store the version number of the Core--Front-end API used by the Mupen64plus core library.
PluginNamePtr Pointer to a const character pointer to receive the name of the core library. The const char * which is returned must point to a persistent string (ie, not stored on the stack).
Capabilities Pointer to an integer to store a logically-or'd set of flags which specify the capabilities of the core which were built into the library during compilation. These are defined in the m64p_core_caps enumerated type, defined in m64p_types.h.

Usage This function retrieves version information from the core library. This function is the same for the core library and the plugins, so that a front-end may examine all shared libraries in a directory and determine their types. Any of the input parameters may be set to NULL and this function will succeed but won't return the corresponding information.


Prototype m64p_error CoreGetAPIVersions(int *ConfigVersion, int *DebugVersion, int *VidextVersion, int *ExtraVersion)
Input Parameters ConfigVersion Pointer to an integer to store the version number of the Config API exported by the Mupen64plus core library.

DebugVersion Pointer to an integer to store the version number of the Debug API exported by the Mupen64plus core library.
VidextVersion Pointer to an integer to store the version number of the Video Extension API exported by the Mupen64plus core library.
ExtraVersion Pointer to an integer to store an API version number for future use. Currently set to 0.

Usage This function retrieves API version information from the core library. This function may be used by either the front-end application or any plugin modules. Any of the input parameters may be set to NULL and this function will succeed but won't return the corresponding information.


Prototype const char * CoreErrorMessage(m64p_error ReturnCode)
Input Parameters ReturnCode Enumerated type containing an error code.
Usage This function returns a pointer to a NULL-terminated string giving a human-readable description of the error.