[#17974] two small fix for blender 2.48 (memory leak and uninitalized vars)
Submitted By:
Pavel Nemec (nemecp)
(changes delete to [] and sets to vars to NULL)
Kent
by Jörg Müller (nexyon)
Since this area is not maintained, I can only say it works on my system (linux/32bit)
And nexyon assured me he checked over this patch well.
Blender using the deprecated function is not great, but nexyon's bugfix would not be available until the next version of freealut so better to work around it by using the new function.
Please test game sounds play back on win32 and Mac, in cases that it worked in the first place.
The crash is caused by calling XGetWindowProperty when xevent.xselection.property is zero.
Not a proper fix because clipboard can paste the data without trouble.
to compile blender with gcc on IRIX, IRIX_USE_GCC needs to be set to true in
user-def.mk.
Other changes related to irix:
* compile solid from extern/
* don't build plugins (yet) with "make release" when using gcc (the shell
script used assumes MIPSpro is installed)
* use statvfs instead of statfs on irix, like done on solaris
* use external libs from $(LCGDIR) instead of /usr/freeware
* use glew header files from $(LCGDIR)/glew instead of the ones installed on
the system (this applies to other platforms as well)
* ffmpeg support currently is disabled on irix
"data" is aligned differently in this wave file and the buffer was read past its allocated length.
Fix this by searching for the buffer in increments of 2 (this finds the "data" for the wav file)
added a check not to allow the search to go past the buffer length, so corrupt wave files should not crash.
- support stopping of loop sound
- support stopping by python
- keep state of actuator in sync with audio device.
The lack of state sync was causing several other problems:
- actuator stop playing the sound
- sound chopped before the end
- not possible to pause sound
* use SDL events to trigger the sensor, trigger was being forced every tick. removed workaround for this problem.
* added "All Events" option, similar to all keys in the keyboard sensor.
This means every event from the joystick will trigger the sensor, however only events from the selected type (axis/button/hat) is used to set the positive state of the sensor.
* Added python function sens_joy.GetButtonValues(), returns a list of pressed button indicies.
* Removed pressed/released option for joystick buttons, it was the same as the invert option.
I changed sqrtf to sqrt in elbeem
in bullet2 I added defines found in floatpatch.h eventually
we should make a "floatpatch.h" that all of blender can use.
Kent
* subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later.
* some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion.
* removed unused vars
* obscure python memory leak with colorband.
* make_sample_tables had a loop running wasnt used.
* if 0'd functions in arithb.c that are not used yet.
* made many functions static
Just getting rid of license_key stuff.
The project files still need to be updated:
projectfiles_vc7/blender/src/BL_src_cre.vcproj
projectfiles_vc7/blender/blendercompactNG.vcproj
Just search for these files in them.
Kent
Revert this because don't work "fine" with dual-monitor.
The problem is not the code, this work fine, but full screen
for a window manager is not both monitor (until set xinerama or
whatever..).
* Fix and a little of cleanup to the full screen, minimzed and
maximized code.
* Fix bad argument in the ClientMessage event to support the
_NET_ACTIVE_WINDOW property.
* Fix focus problem in some WM (like TWM), this is because Blender
don't set the WM_PROTOCOLS list, now it does, a very basic list
but it's what we need now.
work in the game player, now the IK lib is linked into the player.
Makefiles/Scons/CMake buildsystems have been updated.
Fix materials nodes to work in the game player.
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.