From: Toni Wilen Date: Sat, 21 Apr 2012 10:46:08 +0000 (+0300) Subject: 2410b9 X-Git-Tag: 2410~6 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=bb807f8375998c5eb0d9cd7a26aff72a5beae1a3;p=francis%2Fwinuae.git 2410b9 --- diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index dcf6c6f7..acfa043c 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -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)) diff --git a/od-win32/win32.h b/od-win32/win32.h index 3a591049..7bc6714e 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -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") diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 89c91cba..16d91314 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -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.