Rename Unload to Close to match Init-Close pattern

This commit is contained in:
Flamefire committed 2014-10-04 11:17:56 +02:00
1 parent 31863a7788
commit 1c884f3acb
8 files changed
+16 -13

No files matched your search

+2 -2
View File
@@ -91,11 +91,11 @@ namespace Vocaluxe.Base
/// <summary>
/// Unloads the current driver, e.g. to switch to another one
/// </summary>
public static void Unload()
public static void Close()
{
if (_Draw != null)
{
_Draw.Unload();
_Draw.Close();
_Draw = null;
}
}
+2 -2
View File
@@ -390,9 +390,9 @@ namespace Vocaluxe.Lib.Draw
/// Unloads all Textures and other objects used by Direct3D for rendering
/// </summary>
/// <returns></returns>
public override void Unload()
public override void Close()
{
base.Unload();
base.Close();
STexturedColoredVertex.DisposeDeclaration();
_VertexBuffer.Dispose();
_IndexBuffer.Dispose();
+2 -2
View File
@@ -28,9 +28,9 @@ namespace Vocaluxe.Lib.Draw
private SClientRect _Restore;
protected Size _SizeBeforeMinimize;
public override void Unload()
public override void Close()
{
base.Unload();
base.Close();
try
{
_Form.Close();
+2 -2
View File
@@ -253,11 +253,11 @@ namespace Vocaluxe.Lib.Draw
Close();
}
public void Unload()
public new void Close()
{
try
{
Close();
base.Close();
}
catch {}
Dispose();
+2 -2
View File
@@ -240,9 +240,9 @@ namespace Vocaluxe.Lib.Draw
return true;
}
public override void Unload()
public override void Close()
{
base.Unload();
base.Close();
GL.DeleteFramebuffers(1, ref _FBO);
}
+4 -1
View File
@@ -20,6 +20,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
@@ -116,7 +117,7 @@ namespace Vocaluxe.Lib.Draw
return true;
}
public virtual void Unload()
public virtual void Close()
{
_EnsureMainThread();
lock (_Textures)
@@ -731,6 +732,8 @@ namespace Vocaluxe.Lib.Draw
// 3) a) AddTexture(fileA) || b) EnqueueTexture(fileA) with a)getFromCache + b)getFromCache + a)addToCache + b)addToCache --> Only keep one copy
// All solved with atomic get/add cache and _WaitForTextureLoaded
if (!File.Exists(filePath))
return null;
CTextureRef textureRef;
TTextureType texture = null;
Task<Size> loader;
+1 -1
View File
@@ -25,7 +25,7 @@ namespace Vocaluxe.Lib.Draw
{
bool Init();
void MainLoop();
void Unload();
void Close();
int GetScreenWidth();
int GetScreenHeight();
+1 -1
View File
@@ -270,7 +270,7 @@ namespace Vocaluxe
CVideo.Close();
CRecord.Close();
CSound.Close();
CDraw.Unload();
CDraw.Close();
GC.Collect(); // Do a GC run here before we close logs to have finalizers run
CLog.CloseAll(); // Do this last, so we get all log entries!
}