more x86 OS X fixes
svn: r2279
This commit is contained in:
parent
68e2376793
commit
bd813113a2
|
@ -28,8 +28,8 @@
|
|||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
# include "Endian.h"
|
||||
# define wxNATIVE_LONG(x) EndianS32_BtoN(x)
|
||||
# include <CoreServices/CoreServices.h>
|
||||
# define wxNATIVE_LONG(x) EndianS32_BtoN((x).bigEndianValue)
|
||||
#else
|
||||
# define wxNATIVE_LONG(x) x
|
||||
#endif
|
||||
|
|
|
@ -20,6 +20,13 @@
|
|||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef __i386__
|
||||
# include <CoreServices/CoreServices.h>
|
||||
# define wxNATIVE_LONG(x) EndianS32_BtoN((x).bigEndianValue)
|
||||
#else
|
||||
# define wxNATIVE_LONG(x) x
|
||||
#endif
|
||||
|
||||
static int dispatched = 1;
|
||||
|
||||
extern "C" {
|
||||
|
@ -479,13 +486,13 @@ static int GetMods(void)
|
|||
int mods = 0;
|
||||
|
||||
GetKeys(km);
|
||||
if (km[1] & 32768)
|
||||
if (wxNATIVE_LONG(km[1]) & 32768)
|
||||
mods |= cmdKey;
|
||||
if (km[1] & 1)
|
||||
if (wxNATIVE_LONG(km[1]) & 1)
|
||||
mods |= shiftKey;
|
||||
if (km[1] & 4)
|
||||
if (wxNATIVE_LONG(km[1]) & 4)
|
||||
mods |= optionKey;
|
||||
if (km[1] & 8)
|
||||
if (wxNATIVE_LONG(km[1]) & 8)
|
||||
mods |= controlKey;
|
||||
|
||||
return mods;
|
||||
|
|
|
@ -309,23 +309,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
#ifdef wx_mac
|
||||
wxMacDisableMods = controlKey;
|
||||
|
||||
# ifndef OS_X
|
||||
scheme_creator_id = 'mReD';
|
||||
wxMediaCreatorId = 'mReD';
|
||||
# endif
|
||||
|
||||
# if !defined(__powerc) && !defined(__ppc__)
|
||||
long calcLimit, size;
|
||||
THz zone;
|
||||
|
||||
zone = GetZone();
|
||||
size = ((long)LMGetCurStackBase()-(*(long *)zone)-sizeof(Zone));
|
||||
calcLimit = size - 1048576; /* 1 MB stack */
|
||||
if (calcLimit % 2)
|
||||
calcLimit++;
|
||||
SetApplLimit((Ptr)((*(long *)zone)+sizeof(Zone)+calcLimit));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef wx_mac
|
||||
|
|
Loading…
Reference in New Issue
Block a user