Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-03-18 00:44:58 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-03-18 00:44:58 +0300
commitd52400bfbd2a7e4d09b5a71bc461a554d232af15 (patch)
tree08815f065fc90aac0ae62ae5f3a89d20e19399e6 /intern
parent1ac0d54fea831c485e8e27e8bfa887e15beb58de (diff)
parent28f6d223d079b1e5cb67e3fc22fb7f818deb8dcb (diff)
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes: * Sequence transform strip uses G.scene global, this is commented out now, should be fixed. * Etch-a-ton code was most difficult to merge. The files already in 2.5 got merged, but no new files were added. Calls to these files are commented out with "XXX etch-a-ton". editarmature.c and transform_snap.c were complex to merge. Martin, please check? * Game engine compiles and links again here for scons/make/cmake (player still fails to link).
Diffstat (limited to 'intern')
-rw-r--r--intern/SoundSystem/openal/SND_OpenALDevice.cpp14
-rw-r--r--intern/SoundSystem/openal/SND_OpenALDevice.h2
-rw-r--r--intern/SoundSystem/sdl/SND_SDLCDDevice.h2
-rw-r--r--intern/decimation/SConscript2
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp48
-rw-r--r--intern/opennl/SConscript4
-rw-r--r--intern/opennl/superlu/get_perm_c.c4
7 files changed, 60 insertions, 16 deletions
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
index c660e9aecba..9ce30f985ac 100644
--- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp
+++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
@@ -235,7 +235,8 @@ SND_OpenALDevice::SND_OpenALDevice()
if (m_context) {
#ifdef AL_VERSION_1_1
- alcMakeContextCurrent((ALCcontext*)m_context);
+ alcMakeContextCurrent((ALCcontext*)m_context);
+ alutInitWithoutContext(NULL, NULL); /* in this case we dont want alut to initialize the context, see above */
#else
alcMakeContextCurrent(m_context);
#endif
@@ -380,6 +381,9 @@ SND_OpenALDevice::~SND_OpenALDevice()
#else
if (m_device)
alcCloseDevice((ALCdevice*) m_device);
+#ifdef AL_VERSION_1_1
+ alutExit();
+#endif
#endif
}
@@ -437,7 +441,9 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
alutLoadWAVMemory((char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate); // openal_2.12
#else
#ifdef AL_VERSION_1_1
- alutLoadWAVMemory((ALbyte*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+
+ float frequency = 0.0f;
+ data = alutLoadMemoryFromFileImage(memlocation, size, &sampleformat, &numberofsamples, &frequency);
+ samplerate = (int)frequency;
#else
alutLoadWAVMemory((signed char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+
@@ -480,7 +486,11 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
}
/* and free the original stuff (copy was made in openal) */
+#if defined(OUDE_OPENAL) || defined (__APPLE__) || !defined(AL_VERSION_1_1)
alutUnloadWAV(sampleformat, data, numberofsamples, samplerate);
+#else
+ free(data);
+#endif
}
}
else
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.h b/intern/SoundSystem/openal/SND_OpenALDevice.h
index b8c64762a56..a7b97cc314f 100644
--- a/intern/SoundSystem/openal/SND_OpenALDevice.h
+++ b/intern/SoundSystem/openal/SND_OpenALDevice.h
@@ -32,7 +32,7 @@
#include "SND_AudioDevice.h"
#include "SoundDefines.h"
-typedef struct SDL_CD;
+struct SDL_CD;
class SND_OpenALDevice : public SND_AudioDevice
{
diff --git a/intern/SoundSystem/sdl/SND_SDLCDDevice.h b/intern/SoundSystem/sdl/SND_SDLCDDevice.h
index 15cb1975d74..96600d53630 100644
--- a/intern/SoundSystem/sdl/SND_SDLCDDevice.h
+++ b/intern/SoundSystem/sdl/SND_SDLCDDevice.h
@@ -29,7 +29,7 @@
#ifndef SND_SDLCDDEVICE
#define SND_SDLCDDEVICE
-typedef struct SDL_CD;
+struct SDL_CD;
class SND_SDLCDDevice
{
diff --git a/intern/decimation/SConscript b/intern/decimation/SConscript
index 55de37f3c69..ef95a795928 100644
--- a/intern/decimation/SConscript
+++ b/intern/decimation/SConscript
@@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp')
incs = '. ../moto/include ../container ../memutil'
-env.BlenderLib ('bf_decimation', sources, Split(incs) , [], libtype=['intern', 'player'], priority = [10, 20] )
+env.BlenderLib ('bf_decimation', sources, Split(incs) , [], libtype=['core'], priority = [10] )
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 2e76b50fe7a..c6ce7b628e9 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1010,11 +1010,11 @@ getClipboard(bool selection
) const {
//Flag
//0 = Regular clipboard 1 = selection
- static Atom Primary_atom, clip_String, compound_text;
+ static Atom Primary_atom, clip_String, compound_text, a_text, a_string;
Atom rtype;
Window m_window, owner;
unsigned char *data, *tmp_data;
- int bits;
+ int bits, count;
unsigned long len, bytes;
XEvent xevent;
@@ -1025,6 +1025,8 @@ getClipboard(bool selection
clip_String = XInternAtom(m_display, "_BLENDER_STRING", False);
compound_text = XInternAtom(m_display, "COMPOUND_TEXT", False);
+ a_text= XInternAtom(m_display, "TEXT", False);
+ a_string= XInternAtom(m_display, "STRING", False);
//lets check the owner and if it is us then return the static buffer
if(!selection) {
@@ -1058,18 +1060,46 @@ getClipboard(bool selection
XFlush(m_display);
//This needs to change so we do not wait for ever or check owner first
+ count= 1;
while(1) {
XNextEvent(m_display, &xevent);
if(xevent.type == SelectionNotify) {
- if(XGetWindowProperty(m_display, m_window, xevent.xselection.property, 0L, 4096L, False, AnyPropertyType, &rtype, &bits, &len, &bytes, &data) == Success) {
- if (data) {
- tmp_data = (unsigned char*) malloc(strlen((char*)data)+1);
- strcpy((char*)tmp_data, (char*)data);
- XFree(data);
- return (GHOST_TUns8*)tmp_data;
+ if (xevent.xselection.property == None) {
+ /* Ok, the client can't convert the property
+ * to some that we can handle, try other types..
+ */
+ if (count == 1) {
+ XConvertSelection(m_display, Primary_atom, a_text, clip_String, m_window, CurrentTime);
+ count++;
+ }
+ else if (count == 2) {
+ XConvertSelection(m_display, Primary_atom, a_string, clip_String, m_window, CurrentTime);
+ count++;
+ }
+ else {
+ /* Ok, the owner of the selection can't
+ * convert the data to something that we can
+ * handle.
+ */
+ return(NULL);
}
}
- return NULL;
+ else {
+ if(XGetWindowProperty(m_display, m_window, xevent.xselection.property , 0L, 4096L, False, AnyPropertyType, &rtype, &bits, &len, &bytes, &data) == Success) {
+ if (data) {
+ if (bits == 8 && (rtype == compound_text || rtype == a_text || rtype == a_string)) {
+ tmp_data = (unsigned char*) malloc(strlen((char*)data)+1);
+ strcpy((char*)tmp_data, (char*)data);
+ }
+ else
+ tmp_data= NULL;
+
+ XFree(data);
+ return (GHOST_TUns8*)tmp_data;
+ }
+ }
+ return(NULL);
+ }
}
}
}
diff --git a/intern/opennl/SConscript b/intern/opennl/SConscript
index 8cd5f9c1548..f68810d2f16 100644
--- a/intern/opennl/SConscript
+++ b/intern/opennl/SConscript
@@ -6,7 +6,7 @@ sources = env.Glob('intern/*.c') + env.Glob('superlu/*.c')
incs = 'extern superlu'
if (env['OURPLATFORM'] == 'win32-mingw'):
- env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['intern','player'], priority=[80,22] )
+ env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['core','intern'], priority=[1,80] )
else:
- env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['intern','player'], priority=[65,22] )
+ env.BlenderLib ('blender_ONL', sources, Split(incs), [], libtype=['core'], priority=[55] )
diff --git a/intern/opennl/superlu/get_perm_c.c b/intern/opennl/superlu/get_perm_c.c
index e255b4a76bd..4c0ee95c4c6 100644
--- a/intern/opennl/superlu/get_perm_c.c
+++ b/intern/opennl/superlu/get_perm_c.c
@@ -366,6 +366,10 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
int *b_rowind, *dhead, *qsize, *llist, *marker;
double t, SuperLU_timer_();
+ /* make gcc happy */
+ b_rowind=NULL;
+ b_colptr=NULL;
+
m = A->nrow;
n = A->ncol;