Commit f591a5ac authored by cutealien's avatar cutealien

Merge branch releases/1.8 revisions 4828:4923 into trunk:

- Fix bug with multiple SetPixelFormat calls.
- Fixed bug related to memory release in PNG image loader. Thanks elephoenix for it.
- Fix crash in CGUIListBox when users pressed end key folled by any other key in an empty, focused list box (thanks at porcus for report and patch).
- Fix use of enabling defines for wal2 (halflife) image loader. Thanks to hendu for noticing.
- Fix proper screenshot creation in test by inserting the stabilizeScreenBackground call.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4925 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 33f25f5d
...@@ -78,6 +78,13 @@ Changes in 1.9 (not yet released) ...@@ -78,6 +78,13 @@ Changes in 1.9 (not yet released)
-------------------------- --------------------------
Changes in 1.8.2 Changes in 1.8.2
- Fix bug with multiple SetPixelFormat calls. (reported and fixed by anontypist)
- Fix bug related to memory release in PNG image loader. Thanks elephoenix for it.
- Fix crash in CGUIListBox when users pressed end key folled by any other key in an empty, focused list box (thanks at porcus for report and patch).
- Fix use of enabling defines for wal2 (halflife) image loader. Thanks to hendu for noticing.
- Fix userClipPlane test by inserting the stabilizeScreenBackground call
- Demo enables antialiasing now correct (thanks to Mel for noticing).
- Update glext.h (bug #429)
- Example 22 no longer select a random texture after loading a new texture (thanks at mongoose7 for reporting). - Example 22 no longer select a random texture after loading a new texture (thanks at mongoose7 for reporting).
- Fix bug in IGUISkin serialization which messed up serialization of the button-pressed offsets (thanks at Midnight for reporting). - Fix bug in IGUISkin serialization which messed up serialization of the button-pressed offsets (thanks at Midnight for reporting).
- IGUIStaticText::getTextHeight returns now the correct height for texts with newlines even WordWrap is not set. - IGUIStaticText::getTextHeight returns now the correct height for texts with newlines even WordWrap is not set.
......
...@@ -267,11 +267,11 @@ bool CGUIListBox::OnEvent(const SEvent& event) ...@@ -267,11 +267,11 @@ bool CGUIListBox::OnEvent(const SEvent& event)
default: default:
break; break;
} }
if (Selected >= (s32)Items.size())
Selected = Items.size() - 1;
else
if (Selected<0) if (Selected<0)
Selected = 0; Selected = 0;
if (Selected >= (s32)Items.size())
Selected = Items.size() - 1; // will set Selected to -1 for empty listboxes which is correct
recalculateScrollPos(); recalculateScrollPos();
......
...@@ -258,7 +258,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const ...@@ -258,7 +258,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
png_destroy_read_struct(&png_ptr, &info_ptr, NULL); png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
delete [] RowPointers; delete [] RowPointers;
image->unlock(); image->unlock();
delete [] image; delete image;
return 0; return 0;
} }
......
...@@ -121,10 +121,8 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& scre ...@@ -121,10 +121,8 @@ CNullDriver::CNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& scre
// create surface loader // create surface loader
#ifdef _IRR_COMPILE_WITH_HALFLIFE_LOADER_
SurfaceLoader.push_back(video::createImageLoaderHalfLife());
#endif
#ifdef _IRR_COMPILE_WITH_WAL_LOADER_ #ifdef _IRR_COMPILE_WITH_WAL_LOADER_
SurfaceLoader.push_back(video::createImageLoaderHalfLife());
SurfaceLoader.push_back(video::createImageLoaderWAL()); SurfaceLoader.push_back(video::createImageLoaderWAL());
#endif #endif
#ifdef _IRR_COMPILE_WITH_LMP_LOADER_ #ifdef _IRR_COMPILE_WITH_LMP_LOADER_
......
...@@ -406,14 +406,15 @@ bool COpenGLDriver::initDriver(CIrrDeviceWin32* device) ...@@ -406,14 +406,15 @@ bool COpenGLDriver::initDriver(CIrrDeviceWin32* device)
if (PixelFormat) if (PixelFormat)
break; break;
} }
}
// set pixel format // set pixel format
if (!SetPixelFormat(HDc, PixelFormat, &pfd)) if (!SetPixelFormat(HDc, PixelFormat, &pfd))
{ {
os::Printer::log("Cannot set the pixel format.", ELL_ERROR); os::Printer::log("Cannot set the pixel format.", ELL_ERROR);
return false; return false;
}
} }
os::Printer::log("Pixel Format", core::stringc(PixelFormat).c_str(), ELL_DEBUG); os::Printer::log("Pixel Format", core::stringc(PixelFormat).c_str(), ELL_DEBUG);
// create rendering context // create rendering context
......
...@@ -12,6 +12,8 @@ static bool withSphere(video::E_DRIVER_TYPE type) ...@@ -12,6 +12,8 @@ static bool withSphere(video::E_DRIVER_TYPE type)
video::IVideoDriver* driver = device->getVideoDriver(); video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager(); scene::ISceneManager* smgr = device->getSceneManager();
stabilizeScreenBackground(driver);
driver->setClipPlane(0, core::plane3df(core::vector3df(0,18,0), core::vector3df(0,-1,0)), true); driver->setClipPlane(0, core::plane3df(core::vector3df(0,18,0), core::vector3df(0,-1,0)), true);
smgr->addLightSceneNode(0, core::vector3df(30,30,50)); smgr->addLightSceneNode(0, core::vector3df(30,30,50));
// create first sphere // create first sphere
......
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