Merge branch releases/1.8 revisions r5302:r5310 into trunk:
- Tests on Unix now have a short pause between switching drivers to avoid certain X11 errors. - Fix CEnumAttribute::getInt() which could crash (thx @ luthyr for reporting) - No longer try to run tests for drivers not supported on a platform git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5311 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
1c6a9c68cb
commit
666feee11e
@ -148,6 +148,9 @@ should now be fps independentn
|
||||
|
||||
--------------------------
|
||||
Changes in 1.8.4
|
||||
- Tests on Unix now have a short pause between switching drivers to avoid certain X11 errors.
|
||||
- Fix CEnumAttribute::getInt() which could crash (thx @ luthyr for reporting)
|
||||
- No longer try to run tests for drivers not supported on a platform
|
||||
- Update lights and renderTargetTexture tests to work with Windows 10 (can't have so tiny Windows anymore).
|
||||
- Deprecate CMatrix4::transformBox as the result is no longer a boundingbox. Use CMatrix4::transformBoxEx instead (which has been available for a long time).
|
||||
- Fix CSceneCollisionManager::getPickedNodeBB which could sometimes miss collisions.
|
||||
|
@ -1594,11 +1594,13 @@ public:
|
||||
|
||||
virtual s32 getInt() _IRR_OVERRIDE_
|
||||
{
|
||||
for (u32 i=0; EnumLiterals.size(); ++i)
|
||||
for (u32 i=0; i < EnumLiterals.size(); ++i)
|
||||
{
|
||||
if (Value.equals_ignore_case(EnumLiterals[i]))
|
||||
{
|
||||
return (s32)i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 608 B |
@ -5,15 +5,41 @@
|
||||
#include "irrlicht.h"
|
||||
#include <assert.h>
|
||||
|
||||
// Small hack. Some newer X11 systems can't handle switching drivers too fast (causing BadWindow errors in X_ChangeWindowAttributes).
|
||||
// Could be they don't like when Windows with different Visuals are created very quickly (it always happened after creating a new Window with different Visual to previous one).
|
||||
// timeMs value set by try&error
|
||||
#ifdef _IRR_POSIX_API_
|
||||
#include <time.h>
|
||||
#define SLOW_SWITCH \
|
||||
do { \
|
||||
struct timespec ts; \
|
||||
const int timeMs = 250; \
|
||||
ts.tv_sec = (time_t) (timeMs / 1000); \
|
||||
ts.tv_nsec = (long) (timeMs % 1000) * 1000000; \
|
||||
nanosleep(&ts, NULL);\
|
||||
} while (false)
|
||||
#else
|
||||
#define SLOW_SWITCH
|
||||
#endif
|
||||
|
||||
#define TestWithAllDrivers(X) \
|
||||
logTestString("Running test " #X "\n"); \
|
||||
for (u32 i=1; i<video::EDT_COUNT; ++i) \
|
||||
if ( video::E_DRIVER_TYPE(i) != video::DEPRECATED_EDT_DIRECT3D8_NO_LONGER_EXISTS ) \
|
||||
result &= X(video::E_DRIVER_TYPE(i))
|
||||
for (u32 i=1; i<video::EDT_COUNT; ++i) \
|
||||
if (video::E_DRIVER_TYPE(i) != video::DEPRECATED_EDT_DIRECT3D8_NO_LONGER_EXISTS && irr::IrrlichtDevice::isDriverSupported((irr::video::E_DRIVER_TYPE)i)) \
|
||||
{\
|
||||
SLOW_SWITCH; \
|
||||
result &= X(video::E_DRIVER_TYPE(i));\
|
||||
}
|
||||
|
||||
#define TestWithAllHWDrivers(X) \
|
||||
SLOW_SWITCH; \
|
||||
logTestString("Running test " #X "\n"); \
|
||||
for (u32 i=video::EDT_DIRECT3D9; i<video::EDT_COUNT; ++i) \
|
||||
result &= X(video::E_DRIVER_TYPE(i))
|
||||
if (irr::IrrlichtDevice::isDriverSupported((irr::video::E_DRIVER_TYPE)i)) \
|
||||
{\
|
||||
SLOW_SWITCH; \
|
||||
result &= X(video::E_DRIVER_TYPE(i));\
|
||||
}
|
||||
|
||||
// replacement for assert which does log the lines instead
|
||||
#define assert_log(X) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user