public bool Init() { _settings = ServiceRegistration.Get <ISettingsManager>().Load <LibRetroSettings>(); InitializeControllerWrapper(); _retroThread = new LibRetroThread(); _retroThread.Initializing += RetroThreadInitializing; _retroThread.Started += RetroThreadStarted; _retroThread.Running += RetroThreadRunning; _retroThread.Finishing += RetroThreadFinishing; _retroThread.Finished += RetroThreadFinished; _retroThread.Paused += RetroThreadPaused; _retroThread.UnPaused += RetroThreadUnPaused; return(_retroThread.Init()); }
public void Dispose() { if (_retroThread != null) { _retroThread.Dispose(); _retroThread = null; } if (_controllerWrapper != null) { _controllerWrapper.Dispose(); _controllerWrapper = null; } if (_synchronizationStrategy != null) { _synchronizationStrategy.Stop(); _synchronizationStrategy = null; } }