Commit 8c6c657e authored by hybrid's avatar hybrid

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
parent 195c7460
...@@ -164,6 +164,8 @@ bool fast_atof(void) ...@@ -164,6 +164,8 @@ bool fast_atof(void)
logTestString(" atof time = %d\n fast_atof Time = %d\nold fast_atof time = %d\n", logTestString(" atof time = %d\n fast_atof Time = %d\nold fast_atof time = %d\n",
atofTime, fastAtofTime, oldFastAtofTime); atofTime, fastAtofTime, oldFastAtofTime);
device->closeDevice();
device->run();
device->drop(); device->drop();
if(fastAtofTime > (1.2f*atofTime)) if(fastAtofTime > (1.2f*atofTime))
......
...@@ -153,6 +153,8 @@ bool filesystem(void) ...@@ -153,6 +153,8 @@ bool filesystem(void)
result &= testgetAbsoluteFilename(fs); result &= testgetAbsoluteFilename(fs);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -51,6 +51,8 @@ bool flyCircleAnimator(void) ...@@ -51,6 +51,8 @@ bool flyCircleAnimator(void)
result = takeScreenshotAndCompareAgainstReference(driver, "-flyCircleAnimator.png", 100); result = takeScreenshotAndCompareAgainstReference(driver, "-flyCircleAnimator.png", 100);
} }
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -49,6 +49,8 @@ bool guiDisabledMenu(void) ...@@ -49,6 +49,8 @@ bool guiDisabledMenu(void)
driver->endScene(); driver->endScene();
bool result = takeScreenshotAndCompareAgainstReference(driver, "-guiDisabledMenu.png"); bool result = takeScreenshotAndCompareAgainstReference(driver, "-guiDisabledMenu.png");
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -45,6 +45,8 @@ static bool runTestWithDriver(E_DRIVER_TYPE driverType) ...@@ -45,6 +45,8 @@ static bool runTestWithDriver(E_DRIVER_TYPE driverType)
} }
} }
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -39,6 +39,8 @@ static bool testLightTypes(video::E_DRIVER_TYPE driverType) ...@@ -39,6 +39,8 @@ static bool testLightTypes(video::E_DRIVER_TYPE driverType)
const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-lightType.png", 99.91f); const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-lightType.png", 99.91f);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -82,6 +82,8 @@ bool loadFromFileFolder(void) ...@@ -82,6 +82,8 @@ bool loadFromFileFolder(void)
return false; return false;
} }
device->closeDevice();
device->run();
device->drop(); device->drop();
return ((tex1 == tex2) && (tex1 == tex3) && (tex1 == tex4)); return ((tex1 == tex2) && (tex1 == tex3) && (tex1 == tex4));
} }
......
...@@ -54,6 +54,8 @@ static bool doTestWith(E_DRIVER_TYPE driverType, ...@@ -54,6 +54,8 @@ static bool doTestWith(E_DRIVER_TYPE driverType,
bool result = takeScreenshotAndCompareAgainstReference(driver, screenshotName); bool result = takeScreenshotAndCompareAgainstReference(driver, screenshotName);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -72,6 +72,8 @@ bool md2Animation(void) ...@@ -72,6 +72,8 @@ bool md2Animation(void)
} }
result &= takeScreenshotAndCompareAgainstReference(driver, "-md2Animation.png"); result &= takeScreenshotAndCompareAgainstReference(driver, "-md2Animation.png");
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -35,6 +35,8 @@ bool meshLoaders(void) ...@@ -35,6 +35,8 @@ bool meshLoaders(void)
} }
} }
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -80,6 +80,8 @@ bool meshTransform(void) ...@@ -80,6 +80,8 @@ bool meshTransform(void)
result = takeScreenshotAndCompareAgainstReference(driver, "-meshTransform.png"); result = takeScreenshotAndCompareAgainstReference(driver, "-meshTransform.png");
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -40,6 +40,8 @@ static bool testOrthoCam(video::E_DRIVER_TYPE driverType) ...@@ -40,6 +40,8 @@ static bool testOrthoCam(video::E_DRIVER_TYPE driverType)
const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-orthoCam.png", 99.91f); const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-orthoCam.png", 99.91f);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
...@@ -74,6 +76,8 @@ static bool testOrthoStencil(video::E_DRIVER_TYPE driverType) ...@@ -74,6 +76,8 @@ static bool testOrthoStencil(video::E_DRIVER_TYPE driverType)
const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-orthoStencil.png", 99.91f); const bool result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-orthoStencil.png", 99.91f);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -80,6 +80,8 @@ static bool drawScaledOctree(void) ...@@ -80,6 +80,8 @@ static bool drawScaledOctree(void)
} }
} }
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -41,6 +41,8 @@ bool removeCustomAnimator(void) ...@@ -41,6 +41,8 @@ bool removeCustomAnimator(void)
// deleted cleanly, without a crash. // deleted cleanly, without a crash.
node->OnAnimate(0); node->OnAnimate(0);
device->closeDevice();
device->run();
device->drop(); device->drop();
// If we didn't crash, then the test passed. // If we didn't crash, then the test passed.
......
...@@ -478,6 +478,8 @@ bool sceneCollisionManager(void) ...@@ -478,6 +478,8 @@ bool sceneCollisionManager(void)
result &= compareGetSceneNodeFromRayBBWithBBIntersectsWithLine(device, smgr, collMgr); result &= compareGetSceneNodeFromRayBBWithBBIntersectsWithLine(device, smgr, collMgr);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
} }
...@@ -101,6 +101,8 @@ bool sceneNodeAnimator(void) ...@@ -101,6 +101,8 @@ bool sceneNodeAnimator(void)
textureAnimator->drop(); textureAnimator->drop();
textureAnimatorLooping->drop(); textureAnimatorLooping->drop();
device->closeDevice();
device->run();
device->drop(); device->drop();
if(!result) if(!result)
......
...@@ -315,6 +315,8 @@ bool serializeAttributes() ...@@ -315,6 +315,8 @@ bool serializeAttributes()
logTestString("XmlSerialization failed in %s:%d\n", __FILE__, __LINE__ ); logTestString("XmlSerialization failed in %s:%d\n", __FILE__, __LINE__ );
} }
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -48,6 +48,8 @@ bool softwareDevice(void) ...@@ -48,6 +48,8 @@ bool softwareDevice(void)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-softwareDevice-rotatedClip.png"); bool result = takeScreenshotAndCompareAgainstReference(driver, "-softwareDevice-rotatedClip.png");
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -52,6 +52,8 @@ static bool shadows(video::E_DRIVER_TYPE driverType) ...@@ -52,6 +52,8 @@ static bool shadows(video::E_DRIVER_TYPE driverType)
result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-stencilSelfShadow.png", 99.41f); result = takeScreenshotAndCompareAgainstReference(device->getVideoDriver(), "-stencilSelfShadow.png", 99.41f);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -65,6 +65,8 @@ bool terrainSceneNode(void) ...@@ -65,6 +65,8 @@ bool terrainSceneNode(void)
logTestString("Large camera up rotation caused bad recalc.\n"); logTestString("Large camera up rotation caused bad recalc.\n");
} }
device->drop(); device->closeDevice();
device->run();
device->drop();
return result; return result;
} }
...@@ -162,6 +162,8 @@ bool testXML(void) ...@@ -162,6 +162,8 @@ bool testXML(void)
logTestString("Test XML reader attribute support.\n"); logTestString("Test XML reader attribute support.\n");
result &= attributeValues(device->getFileSystem()); result &= attributeValues(device->getFileSystem());
device->drop(); device->closeDevice();
device->run();
device->drop();
return result; return result;
} }
...@@ -71,6 +71,8 @@ static bool lockAllMipLevels(video::E_DRIVER_TYPE driverType) ...@@ -71,6 +71,8 @@ static bool lockAllMipLevels(video::E_DRIVER_TYPE driverType)
result |= (bits[0].color==0x001212ff); result |= (bits[0].color==0x001212ff);
tex->unlock(); tex->unlock();
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
...@@ -58,6 +58,8 @@ bool testTimer(void) ...@@ -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("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"); 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(); device->drop();
return success; return success;
......
...@@ -41,6 +41,8 @@ bool testTransparentAlphaChannelRef(video::E_DRIVER_TYPE driverType) ...@@ -41,6 +41,8 @@ bool testTransparentAlphaChannelRef(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAlphaChannelRef.png", 99.18f); bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAlphaChannelRef.png", 99.18f);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
...@@ -79,6 +81,8 @@ bool testTransparentAlphaChannel(video::E_DRIVER_TYPE driverType) ...@@ -79,6 +81,8 @@ bool testTransparentAlphaChannel(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAlphaChannel.png"); bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAlphaChannel.png");
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
...@@ -124,6 +128,8 @@ bool testTransparentVertexAlpha(video::E_DRIVER_TYPE driverType) ...@@ -124,6 +128,8 @@ bool testTransparentVertexAlpha(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentVertexAlpha.png", 98.76f); bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentVertexAlpha.png", 98.76f);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
...@@ -172,6 +178,8 @@ bool testTransparentReflection2Layer(video::E_DRIVER_TYPE driverType) ...@@ -172,6 +178,8 @@ bool testTransparentReflection2Layer(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentReflection2Layer.png"); bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentReflection2Layer.png");
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
...@@ -210,6 +218,8 @@ bool testTransparentAddColor(video::E_DRIVER_TYPE driverType) ...@@ -210,6 +218,8 @@ bool testTransparentAddColor(video::E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAddColor.png"); bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentAddColor.png");
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
...@@ -257,6 +267,8 @@ bool testTransparentVertexAlphaMore(E_DRIVER_TYPE driverType) ...@@ -257,6 +267,8 @@ bool testTransparentVertexAlphaMore(E_DRIVER_TYPE driverType)
bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentVertexAlphaChannelMore.png", 99.18f); bool result = takeScreenshotAndCompareAgainstReference(driver, "-transparentVertexAlphaChannelMore.png", 99.18f);
device->closeDevice();
device->run();
device->drop(); device->drop();
return result; return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment