Merge revision 5207:5210 from trunk to ogl-es
- Initialize ContextManager pointer and release it's memory at the end. - Fix: Prevent division by 0 in CGUIScrollBar::setPos - Fix: addFileArchive now grab()'s the archive when you pass one in by pointer. Android example now no longer crashes. But it's textures are still broken. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5211 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
878685affa
commit
d845c35e7d
|
@ -8,6 +8,8 @@ Changes in ogl-es (not yet released - will be merged with trunk at some point)
|
|||
--------------------------
|
||||
Changes in 1.9 (not yet released)
|
||||
|
||||
- Fix: addFileArchive now grab()'s the archive when you pass one in by pointer.
|
||||
- Fix: Prevent division by 0 in CGUIScrollBar::setPos
|
||||
- Fix: Add missing serialization to CSceneNodeAnimatorCameraFPS and CSceneNodeAnimatorCameraMaya
|
||||
- Fix: File-open dialog now restores the original locale after modifying it internally
|
||||
- Fix first calculation of the camerascenenode boundingsphere.
|
||||
|
|
|
@ -428,15 +428,22 @@ bool CFileSystem::addFileArchive(IReadFile* file, bool ignoreCase,
|
|||
//! Adds an archive to the file system.
|
||||
bool CFileSystem::addFileArchive(IFileArchive* archive)
|
||||
{
|
||||
for (u32 i = 0; i < FileArchives.size(); ++i)
|
||||
if ( archive )
|
||||
{
|
||||
if (archive == FileArchives[i])
|
||||
for (u32 i=0; i < FileArchives.size(); ++i)
|
||||
{
|
||||
return false;
|
||||
if (archive == FileArchives[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
FileArchives.push_back(archive);
|
||||
archive->grab();
|
||||
|
||||
return true;
|
||||
}
|
||||
FileArchives.push_back(archive);
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -348,20 +348,22 @@ void CGUIScrollBar::setPos(s32 pos)
|
|||
{
|
||||
Pos = core::s32_clamp ( pos, Min, Max );
|
||||
|
||||
if (Horizontal)
|
||||
if ( core::isnotzero ( range() ) )
|
||||
{
|
||||
f32 f = (RelativeRect.getWidth() - ((f32)RelativeRect.getHeight()*3.0f)) / range();
|
||||
DrawPos = (s32)( ( ( Pos - Min ) * f) + ((f32)RelativeRect.getHeight() * 0.5f));
|
||||
DrawHeight = RelativeRect.getHeight();
|
||||
}
|
||||
else
|
||||
{
|
||||
f32 f = (RelativeRect.getHeight() - ((f32)RelativeRect.getWidth()*3.0f)) / range();
|
||||
if (Horizontal)
|
||||
{
|
||||
f32 f = (RelativeRect.getWidth() - ((f32)RelativeRect.getHeight()*3.0f)) / range();
|
||||
DrawPos = (s32)( ( ( Pos - Min ) * f) + ((f32)RelativeRect.getHeight() * 0.5f));
|
||||
DrawHeight = RelativeRect.getHeight();
|
||||
}
|
||||
else
|
||||
{
|
||||
f32 f = (RelativeRect.getHeight() - ((f32)RelativeRect.getWidth()*3.0f)) / range();
|
||||
|
||||
DrawPos = (s32)( ( ( Pos - Min ) * f) + ((f32)RelativeRect.getWidth() * 0.5f));
|
||||
DrawHeight = RelativeRect.getWidth();
|
||||
DrawPos = (s32)( ( ( Pos - Min ) * f) + ((f32)RelativeRect.getWidth() * 0.5f));
|
||||
DrawHeight = RelativeRect.getWidth();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue