protected sealed override void ResetDataInternally(int width, int height) { var newBuffer = new SdlBuffer(width, height); var srcRc = this.CompitibleRC(null, null, width, height); PrimaryBuffer.CopyMemoryTo(newBuffer, srcRc, 0, 0); PrimaryBuffer.Dispose(); PrimaryBuffer = newBuffer; Handle = newBuffer.Handle; ID = "Surface" + Handle.ToString(); }
private static void DisposeThread() { DisposeActionDelegate?.Invoke(); PrimaryBuffer.Dispose(); DirectSoundDevice.Dispose(); DisposeActionDelegate = null; PrimaryBuffer = null; DirectSoundDevice = null; }