public mupen64plusVideoApi(mupen64plusApi core, VideoPluginSettings settings) { string videoplugin; switch (settings.Plugin) { default: case PluginType.Rice: videoplugin = "mupen64plus-video-rice.dll"; break; case PluginType.Glide: videoplugin = "mupen64plus-video-glide64.dll"; break; case PluginType.GlideMk2: videoplugin = "mupen64plus-video-glide64mk2.dll"; break; case PluginType.GLideN64: videoplugin = "mupen64plus-video-GLideN64.dll"; break; } GfxDll = core.AttachPlugin(mupen64plusApi.m64p_plugin_type.M64PLUGIN_GFX, videoplugin); GFXReadScreen2 = mupen64plusApi.GetTypedDelegate <ReadScreen2>(GfxDll, "ReadScreen2"); GFXReadScreen2Res = mupen64plusApi.GetTypedDelegate <ReadScreen2Res>(GfxDll, "ReadScreen2"); var funcPtr = OSTailoredCode.LinkedLibManager.GetProcAddrOrZero(GfxDll, "GetScreenTextureID"); if (funcPtr != IntPtr.Zero) { GFXGetScreenTextureID = (GetScreenTextureID)Marshal.GetDelegateForFunctionPointer(funcPtr, typeof(GetScreenTextureID)); } }
public mupen64plusVideoApi(mupen64plusApi core, VideoPluginSettings settings) { string videoplugin; switch (settings.Plugin) { default: case PluginType.Rice: videoplugin = "mupen64plus-video-rice.dll"; break; case PluginType.Glide: videoplugin = "mupen64plus-video-glide64.dll"; break; case PluginType.GlideMk2: videoplugin = "mupen64plus-video-glide64mk2.dll"; break; case PluginType.Jabo: videoplugin = "mupen64plus-video-jabo.dll"; break; } GfxDll = core.AttachPlugin(mupen64plusApi.m64p_plugin_type.M64PLUGIN_GFX, videoplugin); GFXReadScreen2 = (ReadScreen2)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "ReadScreen2"), typeof(ReadScreen2)); GFXReadScreen2Res = (ReadScreen2Res)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "ReadScreen2"), typeof(ReadScreen2Res)); if(GetProcAddress(GfxDll, "GetScreenTextureID") != IntPtr.Zero) GFXGetScreenTextureID = (GetScreenTextureID)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "GetScreenTextureID"), typeof(GetScreenTextureID)); }
public mupen64plusVideoApi(mupen64plusApi core, VideoPluginSettings settings) { string videoplugin; switch (settings.Plugin) { default: case PluginType.Rice: videoplugin = "mupen64plus-video-rice.dll"; break; case PluginType.Glide: videoplugin = "mupen64plus-video-glide64.dll"; break; case PluginType.GlideMk2: videoplugin = "mupen64plus-video-glide64mk2.dll"; break; case PluginType.Jabo: videoplugin = "mupen64plus-video-jabo.dll"; break; } GfxDll = core.AttachPlugin(mupen64plusApi.m64p_plugin_type.M64PLUGIN_GFX, videoplugin); GFXReadScreen2 = (ReadScreen2)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "ReadScreen2"), typeof(ReadScreen2)); GFXReadScreen2Res = (ReadScreen2Res)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "ReadScreen2"), typeof(ReadScreen2Res)); if (GetProcAddress(GfxDll, "GetScreenTextureID") != IntPtr.Zero) { GFXGetScreenTextureID = (GetScreenTextureID)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "GetScreenTextureID"), typeof(GetScreenTextureID)); } }
public mupen64plusVideoApi(mupen64plusApi core, VideoPluginSettings settings) { string videoplugin; //bool jaboReady = false; switch (settings.Plugin) { default: case PluginType.Rice: videoplugin = "mupen64plus-video-rice.dll"; break; case PluginType.Glide: videoplugin = "mupen64plus-video-glide64.dll"; break; case PluginType.GlideMk2: videoplugin = "mupen64plus-video-glide64mk2.dll"; break; case PluginType.Jabo: videoplugin = "mupen64plus-video-jabo.dll"; N64JaboManager manager = new N64JaboManager(); manager.Scan(); if (manager.Status == N64JaboManager.JaboStatus.ReadyToPatch) { manager.Patch(); } if (manager.Status != N64JaboManager.JaboStatus.Ready) { throw new FileNotFoundException(string.Format("Error: Jabo dll was not found. please copy Jabo_Direct3D8.dll from a Project64 v1.6.1 installation into Bizhawk's dll directory.")); } break; } GfxDll = core.AttachPlugin(mupen64plusApi.m64p_plugin_type.M64PLUGIN_GFX, videoplugin); GFXReadScreen2 = (ReadScreen2)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "ReadScreen2"), typeof(ReadScreen2)); GFXReadScreen2Res = (ReadScreen2Res)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "ReadScreen2"), typeof(ReadScreen2Res)); if (GetProcAddress(GfxDll, "GetScreenTextureID") != IntPtr.Zero) { GFXGetScreenTextureID = (GetScreenTextureID)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "GetScreenTextureID"), typeof(GetScreenTextureID)); } }
public mupen64plusVideoApi(mupen64plusApi core, VideoPluginSettings settings) { string videoplugin; //bool jaboReady = false; switch (settings.Plugin) { default: case PluginType.Rice: videoplugin = "mupen64plus-video-rice.dll"; break; case PluginType.Glide: videoplugin = "mupen64plus-video-glide64.dll"; break; case PluginType.GlideMk2: videoplugin = "mupen64plus-video-glide64mk2.dll"; break; case PluginType.Jabo: videoplugin = "mupen64plus-video-jabo.dll"; N64JaboManager manager = new N64JaboManager(); manager.Scan(); if (manager.Status == N64JaboManager.JaboStatus.ReadyToPatch) manager.Patch(); if(manager.Status != N64JaboManager.JaboStatus.Ready) throw new FileNotFoundException(string.Format("Error: Jabo dll was not found. please copy Jabo_Direct3D8.dll from a Project64 v1.6.1 installation into Bizhawk's dll directory.")); break; } GfxDll = core.AttachPlugin(mupen64plusApi.m64p_plugin_type.M64PLUGIN_GFX, videoplugin); GFXReadScreen2 = (ReadScreen2)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "ReadScreen2"), typeof(ReadScreen2)); GFXReadScreen2Res = (ReadScreen2Res)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "ReadScreen2"), typeof(ReadScreen2Res)); if(GetProcAddress(GfxDll, "GetScreenTextureID") != IntPtr.Zero) GFXGetScreenTextureID = (GetScreenTextureID)Marshal.GetDelegateForFunctionPointer(GetProcAddress(GfxDll, "GetScreenTextureID"), typeof(GetScreenTextureID)); }