/// <summary> /// Creates N64 Video system with mupen64plus backend /// </summary> /// <param name="api">mupen64plus DLL that is used</param> public N64VideoProvider(mupen64plusApi core, VideoPluginSettings videosettings) { this.api = new mupen64plusVideoApi(core, videosettings); int width = 0; int height = 0; api.GetScreenDimensions(ref width, ref height); SetBufferSize( width > videosettings.Width ? width : videosettings.Width, height > videosettings.Height ? height : videosettings.Height ); core.BeforeRender += DoVideoFrame; core.BeforeRender += () => { IsVIFrame = true; }; }
// get mupenapi internal object public VideoPluginSettings GetVPS(GameInfo game, int videoSizeX, int videoSizeY) { var ret = new VideoPluginSettings(VideoPlugin, videoSizeX, videoSizeY); IPluginSettings ips = null; switch (VideoPlugin) { // clone so per game hacks don't overwrite our settings object case PluginType.Glide: ips = GlidePlugin.Clone(); break; case PluginType.GlideMk2: ips = Glide64mk2Plugin.Clone(); break; case PluginType.Rice: ips = RicePlugin.Clone(); break; case PluginType.GLideN64: ips = GLideN64Plugin.Clone(); break; } ips.FillPerGameHacks(game); ret.Parameters = ips.GetPluginSettings(); return ret; }