PlugIn Development:GameEx MAME List Update Function

From Spesoft/GameEx Wiki
Jump to: navigation, search

This function is called when GameEx updates the MAME list.

Parameters

Type [Integer]: An integer specifying the Favorites type.
MAMERomPath [String]: A string that represents the user set ROM path for MAME.
MAMEPath [String]: A string that represents the path to the MAME executable.
MAMEExe [String]: A string that represents the MAME executable.

Parameter Values

The Type integer can be converted to MAME_Update via the supplied enumeration.
The MAMEROMPath string contains a representation of the user set ROM path as set in the GameEx MAME settings.
The MAMEExePath string contains a representation of the user set EXE path (without the actual EXE) as set in the GameEx MAME settings.
The MAMEExe string contains a representation of the user set EXE (without the full path) as set in the GameEx MAME settings.

Enumerations

The enumerations below outline the the data type converted in the PlugIn.dll file.

VB.NET

Public Enum MAME_Update
     Update_Start = 0
     Update_End = 1
End Enum

C#

public enum MAME_Update
{
     Update_Start = 0,
     Update_End = 1,
}

Code Examples

The code samples below outline the syntax needed to process the call in the PlugIn.dll file within the template.

VB.NET

Public Sub Event_MAMEListUpdate(ByVal Type As Integer, ByVal MAMEROMPath As String, ByVal MAMEPath As String, ByVal MAMEExe As String)
     Select Case Type
        Case MAME_Update.Update_Start
           'Run some code when the list update starts!
           Exit Select
        Case MAME_Update.Update_End
           'Run some code when the list update finishes!
           Exit Select
     End Select
End Sub

C#

public void Event_MAMEListUpdate(int Type, string MAMEROMPath, string MAMEPath, string MAMEExe)
{
     switch(Type)
     {
        case MAME_Update.Update_Start:
           //Run some code when the list update starts!
           break;
	case MAME_Update.Update_End:
           //Run some code when the list update finishes!
	   break;
     }
}