Commit 13793ac5 authored by hybrid's avatar hybrid

Merged from branch 1.7, revisions 3607-3725. Fix some compilation errors, fix...

Merged from branch 1.7, revisions 3607-3725. Fix some compilation errors, fix soname in Linux Makefile, calculation fix in vector2d class, CGUIScrollBar event handling fix.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3726 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f80a8cd0
...@@ -263,6 +263,8 @@ The following names can be queried for the given types: ...@@ -263,6 +263,8 @@ The following names can be queried for the given types:
----------------------------- -----------------------------
Changes in 1.7.3 (??.??.2011) Changes in 1.7.3 (??.??.2011)
- CGUIScrollBar passes unused mousemove-events now to parent element. Fixes focus-bug in ComboBox reported by REDDemon here: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=43474&highlight=
- Fix clipping in CGUITabControl - Fix clipping in CGUITabControl
- Fix clipping in CGUITable, reported by ceyron - Fix clipping in CGUITable, reported by ceyron
......
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9,00" Version="7.10"
Name="22.MaterialViewer" Name="22.MaterialViewer"
ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
TargetFrameworkVersion="131072" TargetFrameworkVersion="131072"
......
...@@ -111,15 +111,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMes ...@@ -111,15 +111,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMes
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer.vcproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "..\tools\GUIEditor\GUI Editor_v7.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "..\tools\GUIEditor\GUI Editor_v7.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "..\tools\IrrFontTool\newFontTool\irrFontTool_v7.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "..\tools\IrrFontTool\newFontTool\irrFontTool_v7.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer.vcproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
EndProjectSection EndProjectSection
EndProject EndProject
...@@ -219,10 +219,6 @@ Global ...@@ -219,10 +219,6 @@ Global
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.Build.0 = Debug|Win32 {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.Build.0 = Debug|Win32
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.ActiveCfg = Release|Win32 {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.ActiveCfg = Release|Win32
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.Build.0 = Release|Win32 {6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.Build.0 = Release|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.ActiveCfg = Debug|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.Build.0 = Debug|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.ActiveCfg = Release|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.Build.0 = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.ActiveCfg = Debug|Win32 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.ActiveCfg = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32
...@@ -231,6 +227,10 @@ Global ...@@ -231,6 +227,10 @@ Global
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32 {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.Build.0 = Release|Win32 {853A396E-C031-4C26-A716-5B4E176BE11D}.Release.Build.0 = Release|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.ActiveCfg = Debug|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.Build.0 = Debug|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.ActiveCfg = Release|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection EndGlobalSection
......
...@@ -214,6 +214,8 @@ public: ...@@ -214,6 +214,8 @@ public:
// don't use getLength here to avoid precision loss with s32 vectors // don't use getLength here to avoid precision loss with s32 vectors
f64 tmp = Y / sqrt((f64)(X*X + Y*Y)); f64 tmp = Y / sqrt((f64)(X*X + Y*Y));
if ( tmp > 1.0 ) // avoid floating-point trouble as sqrt(y*y) is occasionally larger y
tmp = 1.0;
tmp = atan( core::squareroot(1 - tmp*tmp) / tmp) * RADTODEG64; tmp = atan( core::squareroot(1 - tmp*tmp) / tmp) * RADTODEG64;
if (X>0 && Y>0) if (X>0 && Y>0)
...@@ -244,6 +246,8 @@ public: ...@@ -244,6 +246,8 @@ public:
tmp = tmp / core::squareroot((f64)((X*X + Y*Y) * (b.X*b.X + b.Y*b.Y))); tmp = tmp / core::squareroot((f64)((X*X + Y*Y) * (b.X*b.X + b.Y*b.Y)));
if (tmp < 0.0) if (tmp < 0.0)
tmp = -tmp; tmp = -tmp;
if ( tmp > 1.0 ) // avoid floating-point trouble
tmp = 1.0;
return atan(sqrt(1 - tmp*tmp) / tmp) * RADTODEG64; return atan(sqrt(1 - tmp*tmp) / tmp) * RADTODEG64;
} }
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__) #if defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
#include "irrMath.h" // needed by borland for sqrtf define #include "irrMath.h" // needed by borland for sqrtf define
#endif #endif
#include <d3d9.h>
#include <d3dx9shader.h> #include <d3dx9shader.h>
#include "IMaterialRenderer.h" #include "IMaterialRenderer.h"
......
...@@ -178,7 +178,11 @@ bool CGUIScrollBar::OnEvent(const SEvent& event) ...@@ -178,7 +178,11 @@ bool CGUIScrollBar::OnEvent(const SEvent& event)
Dragging = false; Dragging = false;
if ( !Dragging ) if ( !Dragging )
{
if ( event.MouseInput.Event == EMIE_MOUSE_MOVED )
break;
return isInside; return isInside;
}
if ( event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP ) if ( event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP )
Dragging = false; Dragging = false;
......
...@@ -77,7 +77,8 @@ CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params) ...@@ -77,7 +77,8 @@ CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params)
if (CreationParams.Fullscreen) if (CreationParams.Fullscreen)
{ {
#if (_WIN32_WINNT >= 0x0501) // Some mingw versions lack this define, so avoid it in case it does not exist
#if (_WIN32_WINNT >= 0x0501) && defined(CONSOLE_FULLSCREEN_MODE)
if (SetConsoleDisplayMode(WindowsSTDOut, CONSOLE_FULLSCREEN_MODE, Dimensions)) if (SetConsoleDisplayMode(WindowsSTDOut, CONSOLE_FULLSCREEN_MODE, Dimensions))
{ {
CreationParams.WindowSize.Width = Dimensions->X; CreationParams.WindowSize.Width = Dimensions->X;
......
...@@ -1448,6 +1448,9 @@ video::IVideoModeList* CIrrDeviceWin32::getVideoModeList() ...@@ -1448,6 +1448,9 @@ video::IVideoModeList* CIrrDeviceWin32::getVideoModeList()
typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
// Needed for old windows apis // Needed for old windows apis
// depending on the SDK version and compilers some defines might be available
// or not
#ifndef PRODUCT_ULTIMATE
#define PRODUCT_ULTIMATE 0x00000001 #define PRODUCT_ULTIMATE 0x00000001
#define PRODUCT_HOME_BASIC 0x00000002 #define PRODUCT_HOME_BASIC 0x00000002
#define PRODUCT_HOME_PREMIUM 0x00000003 #define PRODUCT_HOME_PREMIUM 0x00000003
...@@ -1455,19 +1458,26 @@ typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); ...@@ -1455,19 +1458,26 @@ typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
#define PRODUCT_HOME_BASIC_N 0x00000005 #define PRODUCT_HOME_BASIC_N 0x00000005
#define PRODUCT_BUSINESS 0x00000006 #define PRODUCT_BUSINESS 0x00000006
#define PRODUCT_STARTER 0x0000000B #define PRODUCT_STARTER 0x0000000B
#endif
#ifndef PRODUCT_ULTIMATE_N
#define PRODUCT_BUSINESS_N 0x00000010 #define PRODUCT_BUSINESS_N 0x00000010
#define PRODUCT_HOME_PREMIUM_N 0x0000001A #define PRODUCT_HOME_PREMIUM_N 0x0000001A
#define PRODUCT_ENTERPRISE_N 0x0000001B #define PRODUCT_ENTERPRISE_N 0x0000001B
#define PRODUCT_ULTIMATE_N 0x0000001C #define PRODUCT_ULTIMATE_N 0x0000001C
#define PRODUCT_STARTER_N 0x0000002F #define PRODUCT_STARTER_N 0x0000002F
#endif
#ifndef PRODUCT_PROFESSIONAL
#define PRODUCT_PROFESSIONAL 0x00000030 #define PRODUCT_PROFESSIONAL 0x00000030
#define PRODUCT_PROFESSIONAL_N 0x00000031 #define PRODUCT_PROFESSIONAL_N 0x00000031
#endif
#ifndef PRODUCT_ULTIMATE_E
#define PRODUCT_STARTER_E 0x00000042 #define PRODUCT_STARTER_E 0x00000042
#define PRODUCT_HOME_BASIC_E 0x00000043 #define PRODUCT_HOME_BASIC_E 0x00000043
#define PRODUCT_HOME_PREMIUM_E 0x00000044 #define PRODUCT_HOME_PREMIUM_E 0x00000044
#define PRODUCT_PROFESSIONAL_E 0x00000045 #define PRODUCT_PROFESSIONAL_E 0x00000045
#define PRODUCT_ENTERPRISE_E 0x00000046 #define PRODUCT_ENTERPRISE_E 0x00000046
#define PRODUCT_ULTIMATE_E 0x00000047 #define PRODUCT_ULTIMATE_E 0x00000047
#endif
void CIrrDeviceWin32::getWindowsVersion(core::stringc& out) void CIrrDeviceWin32::getWindowsVersion(core::stringc& out)
{ {
......
...@@ -109,7 +109,7 @@ all linux: staticlib ...@@ -109,7 +109,7 @@ all linux: staticlib
# Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into lib/Linux # Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into lib/Linux
sharedlib: $(LINKOBJ) sharedlib: $(LINKOBJ)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SHARED_LIB).$(VERSION_MAJOR).$(VERSION_MINOR) -o $(SHARED_LIB).$(VERSION) $^ $(LDFLAGS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SHARED_LIB).$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE) -o $(SHARED_LIB).$(VERSION) $^ $(LDFLAGS)
mkdir -p $(LIB_PATH) mkdir -p $(LIB_PATH)
cp $(SHARED_LIB).$(VERSION) $(LIB_PATH) cp $(SHARED_LIB).$(VERSION) $(LIB_PATH)
......
...@@ -105,7 +105,7 @@ namespace os ...@@ -105,7 +105,7 @@ namespace os
#if !defined(_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_) #if !defined(_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_)
// Avoid potential timing inaccuracies across multiple cores by // Avoid potential timing inaccuracies across multiple cores by
// temporarily setting the affinity of this process to one core. // temporarily setting the affinity of this process to one core.
DWORD_PTR affinityMask; DWORD_PTR affinityMask=0;
if(MultiCore) if(MultiCore)
affinityMask = SetThreadAffinityMask(GetCurrentThread(), 1); affinityMask = SetThreadAffinityMask(GetCurrentThread(), 1);
#endif #endif
......
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