{
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;
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;
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;
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))
#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")