Exemple #1
0
 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();
 }
Exemple #2
0
        private static void DisposeThread()
        {
            DisposeActionDelegate?.Invoke();
            PrimaryBuffer.Dispose();
            DirectSoundDevice.Dispose();


            DisposeActionDelegate = null;
            PrimaryBuffer         = null;
            DirectSoundDevice     = null;
        }