Difference between revisions of "PlugIn Development:GameEx MAME List Update Function"
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This function is called when GameEx updates the MAME list.<br /> | This function is called when GameEx updates the MAME list.<br /> | ||
== <span class="plugin_headline_text">Parameters</span> == | |||
== <span | <span class="plugin_return_text">Type [Integer]</span>: An integer specifying the Favorites type. | ||
<br /> | |||
=== <span | <span class="plugin_return_text">MAMERomPath [String]</span>: A string that represents the user set ROM path for MAME. | ||
==== <span | <br /> | ||
<pre | <span class="plugin_return_text">MAMEPath [String]</span>: A string that represents the path to the MAME executable. | ||
<br /> | |||
<span class="plugin_return_text">MAMEExe [String]</span>: A string that represents the MAME executable. | |||
<br /> | |||
=== <span class="plugin_text_fx">Parameter Values</span> === | |||
The <span class="plugin_return_text">Type integer</span> can be converted to <span class="plugin_return_text">MAME_Update</span> via the supplied <span class="plugin_return_text">enumeration</span>.<br /> | |||
The <span class="plugin_return_text">MAMEROMPath string</span> contains a representation of the user set ROM path as set in the GameEx MAME settings.<br /> | |||
The <span class="plugin_return_text">MAMEExePath string</span> contains a representation of the user set EXE path (without the actual EXE) as set in the GameEx MAME settings.<br /> | |||
The <span class="plugin_return_text">MAMEExe string</span> contains a representation of the user set EXE (without the full path) as set in the GameEx MAME settings.<br /> | |||
== <span class="plugin_headline_text">Enumerations</span> == | |||
The enumerations below outline the the data type converted in the <span class="plugin_return_text">PlugIn.dll</span> file.<br /> | |||
==== <span class="plugin_text_fx">VB.NET</span> ==== | |||
<pre class="code_es_vb"> | |||
Public Enum MAME_Update | Public Enum MAME_Update | ||
Update_Start = 0 | Update_Start = 0 | ||
Update_End = 1 | Update_End = 1 | ||
End Enum</pre> | End Enum</pre> | ||
==== <span class="plugin_text_fx">C#</span> ==== | |||
<pre class="code_es_cs"> | |||
public enum MAME_Update | |||
{ | |||
Update_Start = 0, | |||
Update_End = 1, | |||
}</pre> | |||
==== | == <span class="plugin_headline_text">Code Examples</span> == | ||
<pre | The code samples below outline the syntax needed to process the call in the <span class="plugin_return_text">PlugIn.dll</span> file within the template.<br /> | ||
=== <span class="plugin_text_fx">VB.NET</span> === | |||
<pre class="code_vb"> | |||
Public Sub Event_MAMEListUpdate(ByVal Type As Integer, ByVal MAMEROMPath As String, ByVal MAMEPath As String, ByVal MAMEExe As String) | Public Sub Event_MAMEListUpdate(ByVal Type As Integer, ByVal MAMEROMPath As String, ByVal MAMEPath As String, ByVal MAMEExe As String) | ||
Select Case Type | Select Case Type | ||
Line 24: | Line 45: | ||
End Sub</pre> | End Sub</pre> | ||
=== <span | === <span class="plugin_text_fx">C#</span> === | ||
<pre class="code_cs"> | |||
<pre | |||
public void Event_MAMEListUpdate(int Type, string MAMEROMPath, string MAMEPath, string MAMEExe) | public void Event_MAMEListUpdate(int Type, string MAMEROMPath, string MAMEPath, string MAMEExe) | ||
{ | { |
Latest revision as of 23:01, 30 April 2014
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; } }