Fix more device->drop calls to properly remove the window as well under windows.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3492 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2010-12-07 18:16:42 +00:00
parent 195c746018
commit 8c6c657ef4
24 changed files with 62 additions and 2 deletions

View File

@ -164,6 +164,8 @@ bool fast_atof(void)
logTestString(" atof time = %d\n fast_atof Time = %d\nold fast_atof time = %d\n",
atofTime, fastAtofTime, oldFastAtofTime);
device->closeDevice();
device->run();
device->drop();
if(fastAtofTime > (1.2f*atofTime))

View File

@ -153,6 +153,8 @@ bool filesystem(void)
result &= testgetAbsoluteFilename(fs);
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -51,6 +51,8 @@ bool flyCircleAnimator(void)
result = takeScreenshotAndCompareAgainstReference(driver, "-flyCircleAnimator.png", 100);
}
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -49,6 +49,8 @@ bool guiDisabledMenu(void)
driver->endScene();
bool result = takeScreenshotAndCompareAgainstReference(driver, "-guiDisabledMenu.png");
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -45,6 +45,8 @@ static bool runTestWithDriver(E_DRIVER_TYPE driverType)
}
}
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -39,6 +39,8 @@ static bool testLightTypes(video::E_DRIVER_TYPE driverType)
const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-lightType.png", 99.91f);
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -82,6 +82,8 @@ bool loadFromFileFolder(void)
return false;
}
device->closeDevice();
device->run();
device->drop();
return ((tex1 == tex2) && (tex1 == tex3) && (tex1 == tex4));
}

View File

@ -54,6 +54,8 @@ static bool doTestWith(E_DRIVER_TYPE driverType,
bool result = takeScreenshotAndCompareAgainstReference(driver, screenshotName);
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -72,6 +72,8 @@ bool md2Animation(void)
}
result &= takeScreenshotAndCompareAgainstReference(driver, "-md2Animation.png");
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -35,6 +35,8 @@ bool meshLoaders(void)
}
}
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -80,6 +80,8 @@ bool meshTransform(void)
result = takeScreenshotAndCompareAgainstReference(driver, "-meshTransform.png");
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -40,6 +40,8 @@ static bool testOrthoCam(video::E_DRIVER_TYPE driverType)
const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-orthoCam.png", 99.91f);
device->closeDevice();
device->run();
device->drop();
return result;
@ -74,6 +76,8 @@ static bool testOrthoStencil(video::E_DRIVER_TYPE driverType)
const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-orthoStencil.png", 99.91f);
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -80,6 +80,8 @@ static bool drawScaledOctree(void)
}
}
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -41,6 +41,8 @@ bool removeCustomAnimator(void)
// deleted cleanly, without a crash.
node->OnAnimate(0);
device->closeDevice();
device->run();
device->drop();
// If we didn't crash, then the test passed.

View File

@ -478,6 +478,8 @@ bool sceneCollisionManager(void)
result &= compareGetSceneNodeFromRayBBWithBBIntersectsWithLine(device, smgr, collMgr);
device->closeDevice();
device->run();
device->drop();
return result;
}

View File

@ -101,6 +101,8 @@ bool sceneNodeAnimator(void)
textureAnimator->drop();
textureAnimatorLooping->drop();
device->closeDevice();
device->run();
device->drop();
if(!result)

View File

@ -315,6 +315,8 @@ bool serializeAttributes()
logTestString("XmlSerialization failed in %s:%d\n", __FILE__, __LINE__ );
}
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -48,6 +48,8 @@ bool softwareDevice(void)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-softwareDevice-rotatedClip.png");
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -52,6 +52,8 @@ static bool shadows(video::E_DRIVER_TYPE driverType)
result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-stencilSelfShadow.png", 99.41f);
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -65,6 +65,8 @@ bool terrainSceneNode(void)
logTestString("Large camera up rotation caused bad recalc.\n");
}
device->drop();
device->closeDevice();
device->run();
device->drop();
return result;
}

View File

@ -162,6 +162,8 @@ bool testXML(void)
logTestString("Test XML reader attribute support.\n");
result &= attributeValues(device->getFileSystem());
device->drop();
device->closeDevice();
device->run();
device->drop();
return result;
}

View File

@ -71,6 +71,8 @@ static bool lockAllMipLevels(video::E_DRIVER_TYPE driverType)
result |= (bits[0].color==0x001212ff);
tex->unlock();
device->closeDevice();
device->run();
device->drop();
return result;

View File

@ -58,6 +58,8 @@ bool testTimer(void)
logTestString("Real time and date. %d.%d.%d at %d:%d:%d\n", date.Day, date.Month, date.Year, date.Hour, date.Minute, date.Second);
logTestString("This is day %d of the year and weekday %d. The current time zone has daylight saving %s\n", date.Yearday, date.Weekday, date.IsDST?"enabled":"disabled");
device->closeDevice();
device->run();
device->drop();
return success;

View File

@ -41,6 +41,8 @@ bool testTransparentAlphaChannelRef(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAlphaChannelRef.png", 99.18f);
device->closeDevice();
device->run();
device->drop();
return result;
@ -79,6 +81,8 @@ bool testTransparentAlphaChannel(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAlphaChannel.png");
device->closeDevice();
device->run();
device->drop();
return result;
@ -124,6 +128,8 @@ bool testTransparentVertexAlpha(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentVertexAlpha.png", 98.76f);
device->closeDevice();
device->run();
device->drop();
return result;
@ -172,6 +178,8 @@ bool testTransparentReflection2Layer(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentReflection2Layer.png");
device->closeDevice();
device->run();
device->drop();
return result;
@ -210,6 +218,8 @@ bool testTransparentAddColor(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAddColor.png");
device->closeDevice();
device->run();
device->drop();
return result;
@ -257,6 +267,8 @@ bool testTransparentVertexAlphaMore(E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentVertexAlphaChannelMore.png", 99.18f);
device->closeDevice();
device->run();
device->drop();
return result;