private void StartEmulatorProcess(string baseDir) { var test = SnesApi.TestDll(); SnesApi.InitDll(); //EmuApi.InitDll(); var version = SnesApi.GetMesenVersion(); //InteropEmu.SetDisplayLanguage(Brewmaster.Emulation.Language.English); //SnesApi.SetDisplayLanguage(Mesen.GUI.Forms.Language.English); ApplyVideoConfig(); SnesApi.InitializeEmu(baseDir, _mainWindow.Handle, _renderControl.Handle, false, false, false); ApplyVideoConfig(); ApplyAudioConfig(); ApplyInputConfig(); ApplyEmulationConfig(); ApplyPreferenceConfig(); ApplyDebuggerConfig(); Mesen.GUI.ScreenSize size = SnesApi.GetScreenSize(false); _renderControl.Size = new Size(size.Width, size.Height); //SnesApi.AddKnownGameFolder(@"C:\Users\dkmrs\Documents\NesDev\sc"); _notifListener = new NotificationListener(); _notifListener.OnNotification += HandleNotification; //SnesApi.SetNesModel(NesModel.Auto); //SnesApi.DebugSetDebuggerConsole(SnesApi.ConsoleId.Master); }
[DllImport(DLLPath, EntryPoint = "GetScreenSize")] private static extern void GetScreenSizeWrapper(out ScreenSize size, [MarshalAs(UnmanagedType.I1)] bool ignoreScale);