[AD] OSX x86 patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I went through and added some changes to get allegro to build on OSX x86, 
which after the changes compiles and installs soundly.
I also reviewed the thread concerning ALLEGRO_USE_C and took into 
consideration that if ALLEGRO_USE_C is explicitly declared the assumption is 
that no ASM is desired. With the OSX build of allegro that it is statically 
set so there should be no qualms regarding usage of ASM.
The patch otherwise shouldn't effect the usage of ASM if ALLEGRO_USE_C is 
never set on other platforms.
Look over the patch and see if it is feasible.
Thanks. :)

-- 
-juvinious

<a href="http://chasm.hopto.org";>The Chasm</a> - My Site.
Index: src/macosx/qtmidi.m
===================================================================
--- src/macosx/qtmidi.m	(revision 5771)
+++ src/macosx/qtmidi.m	(working copy)
@@ -125,9 +125,14 @@
       voice[i].vol = -1;
       voice[i].pan = -1;
       memset(&note_request, 0, sizeof(note_request));
+	  #ifndef ALLEGRO_I386
       note_request.info.polyphony = 8;
       note_request.info.typicalPolyphony = 0x00010000;
-      result = NAStuffToneDescription(note_allocator, 1, &note_request.tone);
+	  #else
+	  note_request.info.polyphony.bigEndianValue = EndianU16_NtoB(8);
+      note_request.info.typicalPolyphony.bigEndianValue = EndianS32_NtoB(X2Fix(1.0));
+	  #endif
+	  result = NAStuffToneDescription(note_allocator, 1, &note_request.tone);
       result |= NANewNoteChannel(note_allocator, &note_request, &voice[i].channel);
       result |= NAResetNoteChannel(note_allocator, voice[i].channel);
       if ((result) || (!voice[i].channel)) {
Index: include/allegro/inline/asm.inl
===================================================================
--- include/allegro/inline/asm.inl	(revision 5771)
+++ include/allegro/inline/asm.inl	(working copy)
@@ -19,7 +19,13 @@
    extern "C" {
 #endif
 
+#ifdef ALLEGRO_USE_C
 
+	/* No asm needed */
+	#define ALLEGRO_NO_ASM
+
+#else
+
 #ifndef ALLEGRO_NO_ASM
 
 #if (defined ALLEGRO_GCC) && (defined ALLEGRO_I386)
@@ -46,8 +52,8 @@
 
 #endif
 
+#endif
 
 #ifdef __cplusplus
    }
 #endif
-


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/