public void CloseRender() { Stop(); control?.Player?.Dispose(); RenderDisposed = true; control?.Close(); control = null; }
public IntPtr RestartRender() { IntPtr result = IntPtr.Zero; LiveWallpaperEngineManager.UIDispatcher.Invoke(() => { //CloseRender(); explore死后会卡死 if (control != null) { control.Close(); control.Player = null; } control = new MpvForm(); Init(_cacheScreen); ShowRender(); result = control.Handle; }); SetAspect(_cacheAspect); return(result); }