4 Commits

11 changed files with 24 additions and 15 deletions

View File

@ -7,7 +7,7 @@ else()
cmake_policy(VERSION 3.9) cmake_policy(VERSION 3.9)
endif() endif()
set(IRRLICHTMT_REVISION 7) set(IRRLICHTMT_REVISION 8)
project(Irrlicht project(Irrlicht
VERSION 1.9.0.${IRRLICHTMT_REVISION} VERSION 1.9.0.${IRRLICHTMT_REVISION}

View File

@ -6,8 +6,8 @@
#define __IRR_COMPILE_CONFIG_H_INCLUDED__ #define __IRR_COMPILE_CONFIG_H_INCLUDED__
//! Identifies the IrrlichtMt fork customized for the Minetest engine //! Identifies the IrrlichtMt fork customized for the Minetest engine
#define IRRLICHT_VERSION_MT_REVISION 7 #define IRRLICHT_VERSION_MT_REVISION 8
#define IRRLICHT_VERSION_MT "mt7" #define IRRLICHT_VERSION_MT "mt8"
//! Irrlicht SDK Version //! Irrlicht SDK Version
#define IRRLICHT_VERSION_MAJOR 1 #define IRRLICHT_VERSION_MAJOR 1

View File

@ -26,7 +26,7 @@ namespace scene
//! Constructor //! Constructor
CB3DMeshFileLoader::CB3DMeshFileLoader(scene::ISceneManager* smgr) CB3DMeshFileLoader::CB3DMeshFileLoader(scene::ISceneManager* smgr)
: AnimatedMesh(0), B3DFile(0), NormalsInFile(false), : AnimatedMesh(0), B3DFile(0), VerticesStart(0), NormalsInFile(false),
HasVertexColors(false), ShowWarning(true) HasVertexColors(false), ShowWarning(true)
{ {
#ifdef _DEBUG #ifdef _DEBUG

View File

@ -74,7 +74,7 @@ CGUIFileOpenDialog::CGUIFileOpenDialog(const wchar_t* title,
L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close"); L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close");
CloseButton->setSubElement(true); CloseButton->setSubElement(true);
CloseButton->setTabStop(false); CloseButton->setTabStop(false);
if (sprites) if (sprites && skin)
{ {
CloseButton->setSpriteBank(sprites); CloseButton->setSpriteBank(sprites);
CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color); CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color);

View File

@ -40,7 +40,7 @@ void PNGAPI user_read_data_fcn(png_structp png_ptr, png_bytep data, png_size_t l
// changed by zola { // changed by zola {
io::IReadFile* file=(io::IReadFile*)png_get_io_ptr(png_ptr); io::IReadFile* file=(io::IReadFile*)png_get_io_ptr(png_ptr);
check=(png_size_t) file->read((void*)data,(u32)length); check=(png_size_t) file->read((void*)data, length);
// } // }
if (check != length) if (check != length)

View File

@ -46,7 +46,7 @@ void PNGAPI user_write_data_fcn(png_structp png_ptr, png_bytep data, png_size_t
png_size_t check; png_size_t check;
io::IWriteFile* file=(io::IWriteFile*)png_get_io_ptr(png_ptr); io::IWriteFile* file=(io::IWriteFile*)png_get_io_ptr(png_ptr);
check=(png_size_t) file->write((const void*)data,(u32)length); check=(png_size_t) file->write((const void*)data, length);
if (check != length) if (check != length)
png_error(png_ptr, "Write Error"); png_error(png_ptr, "Write Error");

View File

@ -2118,7 +2118,17 @@ CIrrDeviceLinux::CCursorControl::CCursorControl(CIrrDeviceLinux* dev, bool null)
if (!Null) if (!Null)
{ {
#ifdef _IRR_LINUX_X11_XINPUT2_ #ifdef _IRR_LINUX_X11_XINPUT2_
// XIWarpPointer is entirely broken on multi-head setups (see also [1]),
// but behaves better in other cases so we can't just disable it outright.
// [1] https://developer.blender.org/rB165caafb99c6846e53d11c4e966990aaffc06cea
if (XScreenCount(Device->XDisplay) > 1)
{
os::Printer::log("Detected classic multi-head setup, not using XIWarpPointer");
}
else
{
XIGetClientPointer(Device->XDisplay, Device->XWindow, &DeviceId); XIGetClientPointer(Device->XDisplay, Device->XWindow, &DeviceId);
}
#endif #endif
XGCValues values; XGCValues values;

View File

@ -270,6 +270,7 @@ bool COGLES1Driver::updateVertexHardwareBuffer(SHWBufferLink_opengl *HWBuffer)
//buffer vertex data, and convert colours... //buffer vertex data, and convert colours...
core::array<c8> buffer(vertexSize * vertexCount); core::array<c8> buffer(vertexSize * vertexCount);
buffer.set_used(vertexSize * vertexCount);
memcpy(buffer.pointer(), vertices, vertexSize * vertexCount); memcpy(buffer.pointer(), vertices, vertexSize * vertexCount);
// in order to convert the colors into opengl format (RGBA) // in order to convert the colors into opengl format (RGBA)

View File

@ -2615,7 +2615,7 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
if ((material.AntiAliasing & EAAM_QUALITY) == EAAM_QUALITY) if ((material.AntiAliasing & EAAM_QUALITY) == EAAM_QUALITY)
glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST);
else else
glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_FASTEST);
} }
#endif #endif
} }
@ -3805,7 +3805,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
glPixelStorei(GL_PACK_INVERT_MESA, GL_FALSE); glPixelStorei(GL_PACK_INVERT_MESA, GL_FALSE);
else else
#endif #endif
if (pixels) if (pixels && newImage)
{ {
// opengl images are horizontally flipped, so we have to fix that here. // opengl images are horizontally flipped, so we have to fix that here.
const s32 pitch = newImage->getPitch(); const s32 pitch = newImage->getPitch();

View File

@ -46,13 +46,12 @@ bool CWGLManager::initialize(const SIrrlichtCreationParameters& params, const SE
wcex.cbClsExtra = 0; wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0; wcex.cbWndExtra = 0;
wcex.hInstance = lhInstance; wcex.hInstance = lhInstance;
wcex.hIcon = NULL; wcex.hIcon = 0;
wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = 0; wcex.lpszMenuName = 0;
wcex.lpszClassName = ClassName; wcex.lpszClassName = ClassName;
wcex.hIconSm = 0; wcex.hIconSm = 0;
wcex.hIcon = 0;
RegisterClassEx(&wcex); RegisterClassEx(&wcex);
RECT clientSize; RECT clientSize;

View File

@ -12,13 +12,12 @@ namespace io
CWriteFile::CWriteFile(const io::path& fileName, bool append) CWriteFile::CWriteFile(const io::path& fileName, bool append)
: FileSize(0) : FileSize(0), Filename(fileName)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CWriteFile"); setDebugName("CWriteFile");
#endif #endif
Filename = fileName;
openFile(append); openFile(append);
} }