]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2410b9
authorToni Wilen <twilen@winuae.net>
Sat, 21 Apr 2012 10:46:08 +0000 (13:46 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 21 Apr 2012 10:46:08 +0000 (13:46 +0300)
od-win32/direct3d.cpp
od-win32/win32.h
od-win32/winuaechangelog.txt

index dcf6c6f78043c65a40f33c05ee273ad7c5d9767d..acfa043cda5cf0f02ae2f0d031136d63b9c53417 100644 (file)
@@ -1086,16 +1086,6 @@ static int createamigatexture (int w, int h)
 {
        HRESULT hr;
 
-       if (texture)
-               texture->Release ();
-       texture = NULL;
-       if (lpWorkTexture1)
-               lpWorkTexture1->Release ();
-       lpWorkTexture1 = NULL;
-       if (lpWorkTexture2)
-               lpWorkTexture2->Release ();
-       lpWorkTexture2 = NULL;
-
        texture = createtext (w, h, tformat);
        if (!texture)
                return 0;
@@ -1775,19 +1765,40 @@ static void settransform (void)
        D3DXMatrixIdentity (&m_matWorld2);
 }
 
+static void freetextures (void)
+{
+       if (texture) {
+               texture->Release ();
+               texture = NULL;
+       }
+       if (lpTempTexture) {
+               lpTempTexture->Release ();
+               lpTempTexture = NULL;
+       }
+       if (lpWorkTexture1) {
+               lpWorkTexture1->Release ();
+               lpWorkTexture1 = NULL;
+       }
+       if (lpWorkTexture2) {
+               lpWorkTexture2->Release ();
+               lpWorkTexture2 = NULL;
+       }
+       if (lpHq2xLookupTexture) {
+               lpHq2xLookupTexture->Release ();
+               lpHq2xLookupTexture = NULL;
+       }
+}
+
 static void invalidatedeviceobjects (void)
 {
        if (filenotificationhandle  != NULL)
                FindCloseChangeNotification  (filenotificationhandle);
        filenotificationhandle = NULL;
+       freetextures ();
        if (query) {
                query->Release();
                query = NULL;
        }
-       if (texture) {
-               texture->Release ();
-               texture = NULL;
-       }
        if (sprite) {
                sprite->Release ();
                sprite = NULL;
@@ -1812,22 +1823,6 @@ static void invalidatedeviceobjects (void)
                blanktexture->Release ();
                blanktexture = NULL;
        }
-       if (lpTempTexture) {
-               lpTempTexture->Release ();
-               lpTempTexture = NULL;
-       }
-       if (lpWorkTexture1) {
-               lpWorkTexture1->Release ();
-               lpWorkTexture1 = NULL;
-       }
-       if (lpWorkTexture2) {
-               lpWorkTexture2->Release ();
-               lpWorkTexture2 = NULL;
-       }
-       if (lpHq2xLookupTexture) {
-               lpHq2xLookupTexture->Release ();
-               lpHq2xLookupTexture = NULL;
-       }
        if (cursorsurfaced3d) {
                cursorsurfaced3d->Release ();
                cursorsurfaced3d = NULL;
@@ -2318,6 +2313,8 @@ bool D3D_alloctexture (int w, int h)
 
        changed_prefs.leds_on_screen = currprefs.leds_on_screen = currprefs.leds_on_screen | STATUSLINE_TARGET;
 
+       freetextures ();
+
        if (!createtexture (tout_w, tout_h, window_w, window_h))
                return false;
        if (!createamigatexture (tin_w, tin_h))
index 3a591049d5aa45c5c476b3ad22d5a33b62cd0351..7bc6714ebd5eebfc616159e7aa51c02f476c7fd1 100644 (file)
@@ -19,7 +19,7 @@
 #define LANG_DLL 1
 
 //#define WINUAEBETA _T("")
-#define WINUAEBETA _T("Beta 8")
+#define WINUAEBETA _T("Beta 9")
 #define WINUAEDATE MAKEBD(2012, 4, 21)
 #define WINUAEEXTRA _T("")
 //#define WINUAEEXTRA _T("AmiKit Preview")
index 89c91cba8487d86c1c789800f369365cf7edf8ee..16d91314e90fece782a699c4a801aca6d326607c 100644 (file)
@@ -2,6 +2,10 @@
 - restore only single input target to default.
 - hdd from command line
 
+Beta 9:
+
+- Fixed D3D texture reallocation ordering. Caused blank screen or other strange side-effects (b7)
+
 Beta 8:
 
 - 68EC020/68020 state files didn't load properly if current CPU config didn't match.