Difference between revisions of "PlugIn Development:GameEx MAME List Update Function"

From Spesoft/GameEx Wiki
Jump to navigation Jump to search
(Created page with "==<span style="font-size:125%; color:darkblue;">GameEx: MAME List Update Overview</span>== This function is called when GameEx updates the MAME list.<br />The variables for <s...")
 
Line 25: Line 25:
<span style="font-size:125%; color:#003300;"><b>C# syntax:</b></span>
<span style="font-size:125%; color:#003300;"><b>C# syntax:</b></span>
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;">
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;">
public enum MAME_Update : int
public enum MAME_Update
{
{
     Update_Start = 0,
     Update_Start = 0,

Revision as of 05:12, 27 April 2014

GameEx: MAME List Update Overview

This function is called when GameEx updates the MAME list.
The variables for Update Type, MAME Rom Path, MAME EXE Path and MAME EXE are passed down to this sub procedure when the list update is starting and ending.

Code Examples

VB.NET syntax:

Public Enum MAME_Update
     Update_Start = 0
     Update_End = 1
End Enum
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# syntax:

public enum MAME_Update
{
     Update_Start = 0,
     Update_End = 1,
}
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;
     }
}