Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
091cd521
Commit
091cd521
authored
Dec 01, 2010
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed support for 10.3.9
Fixed building on Mac OS X 10.5
parent
7b8f9fe7
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
33 additions
and
915 deletions
+33
-915
SDL_platform.h
include/SDL_platform.h
+10
-8
SDL_coreaudio.c
src/audio/macosx/SDL_coreaudio.c
+1
-1
IOHIDLib.h
src/joystick/darwin/10.3.9-FIX/IOHIDLib.h
+0
-874
SDL_sysjoystick.c
src/joystick/darwin/SDL_sysjoystick.c
+0
-4
SDL_sysjoystick_c.h
src/joystick/darwin/SDL_sysjoystick_c.h
+0
-4
SDL_cocoaclipboard.m
src/video/cocoa/SDL_cocoaclipboard.m
+3
-3
SDL_cocoaevents.m
src/video/cocoa/SDL_cocoaevents.m
+0
-2
SDL_cocoakeyboard.m
src/video/cocoa/SDL_cocoakeyboard.m
+8
-4
SDL_cocoamodes.m
src/video/cocoa/SDL_cocoamodes.m
+2
-2
SDL_cocoaopengl.m
src/video/cocoa/SDL_cocoaopengl.m
+1
-11
SDL_cocoashape.m
src/video/cocoa/SDL_cocoashape.m
+2
-0
SDL_cocoavideo.h
src/video/cocoa/SDL_cocoavideo.h
+1
-1
SDL_cocoawindow.h
src/video/cocoa/SDL_cocoawindow.h
+1
-1
SDL_cocoawindow.m
src/video/cocoa/SDL_cocoawindow.m
+4
-0
No files found.
include/SDL_platform.h
View file @
091cd521
...
...
@@ -74,8 +74,16 @@
#if defined(__APPLE__)
/* lets us know what version of Mac OS X we're compiling on */
#include "AvailabilityMacros.h"
#ifdef MAC_OS_X_VERSION_10_3
#include "TargetConditionals.h"
/* this header is in 10.3 or later */
#include "TargetConditionals.h"
#ifndef MAC_OS_X_VERSION_10_4
#define MAC_OS_X_VERSION_10_4 1040
#endif
#ifndef MAC_OS_X_VERSION_10_5
#define MAC_OS_X_VERSION_10_5 1050
#endif
#ifndef MAC_OS_X_VERSION_10_6
#define MAC_OS_X_VERSION_10_6 1060
#endif
#if TARGET_OS_IPHONE
/* if compiling for iPhone */
#undef __IPHONEOS__
...
...
@@ -86,12 +94,6 @@
#undef __MACOSX__
#define __MACOSX__ 1
#endif
/* TARGET_OS_IPHONE */
#else
/* if earlier verion of Mac OS X than version 10.3 */
#undef __MACOSX__
#define __MACOSX__ 1
#endif
#endif
/* defined(__APPLE__) */
#if defined(__NetBSD__)
...
...
src/audio/macosx/SDL_coreaudio.c
View file @
091cd521
...
...
@@ -24,7 +24,7 @@
#include <CoreAudio/CoreAudio.h>
#include <CoreServices/CoreServices.h>
#include <AudioUnit/AudioUnit.h>
#if MAC_OS_X_VERSION_MAX_ALLOWED <=
1050
#if MAC_OS_X_VERSION_MAX_ALLOWED <=
MAC_OS_X_VERSION_10_5
#include <AudioUnit/AUNTComponent.h>
#endif
...
...
src/joystick/darwin/10.3.9-FIX/IOHIDLib.h
deleted
100644 → 0
View file @
7b8f9fe7
This diff is collapsed.
Click to expand it.
src/joystick/darwin/SDL_sysjoystick.c
View file @
091cd521
...
...
@@ -39,11 +39,7 @@
/* The header was moved here in Mac OS X 10.1 */
#include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
#endif
#if MAC_OS_X_VERSION_MIN_REQUIRED == 1030
#include "10.3.9-FIX/IOHIDLib.h"
#else
#include <IOKit/hid/IOHIDLib.h>
#endif
#include <IOKit/hid/IOHIDKeys.h>
#include <CoreFoundation/CoreFoundation.h>
#include <Carbon/Carbon.h>
/* for NewPtrClear, DisposePtr */
...
...
src/joystick/darwin/SDL_sysjoystick_c.h
View file @
091cd521
...
...
@@ -24,11 +24,7 @@
#ifndef SDL_JOYSTICK_IOKIT_H
#if MAC_OS_X_VERSION_MIN_REQUIRED == 1030
#include "10.3.9-FIX/IOHIDLib.h"
#else
#include <IOKit/hid/IOHIDLib.h>
#endif
#include <IOKit/hid/IOHIDKeys.h>
...
...
src/video/cocoa/SDL_cocoaclipboard.m
View file @
091cd521
...
...
@@ -27,9 +27,7 @@
static
NSString
*
GetTextFormat
(
_
THIS
)
{
#if
MAC
_
OS
_
X
_
VERSION
_
MAX
_
ALLOWED
<
1060
return
NSStringPboardType
;
#else
#if
MAC
_
OS
_
X
_
VERSION
_
MAX
_
ALLOWED
>=
MAC
_
OS
_
X
_
VERSION
_
10
_
6
SDL
_
VideoData
*
data
=
(
SDL
_
VideoData
*
)
_
this
->
driverdata
;
if
(
data
->
osversion
>=
0
x1060
)
{
...
...
@@ -37,6 +35,8 @@ GetTextFormat(_THIS)
}
else
{
return
NSStringPboardType
;
}
#else
return
NSStringPboardType
;
#endif
}
...
...
src/video/cocoa/SDL_cocoaevents.m
View file @
091cd521
...
...
@@ -36,11 +36,9 @@
#endif
/* setAppleMenu disappeared from the headers in 10.4 */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
@interface
NSApplication
(
NSAppleMenu
)
-
(
void
)
setAppleMenu
:(
NSMenu
*
)
menu
;
@end
#endif
@implementation
NSApplication
(
SDL
)
-
(
void
)
setRunning
...
...
src/video/cocoa/SDL_cocoakeyboard.m
View file @
091cd521
...
...
@@ -171,7 +171,11 @@
}
/* Needs long instead of NSInteger for compilation on Mac OS X 10.4 */
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
-
(
long
)
conversationIdentifier
#else
-
(
NSInteger
)
conversationIdentifier
#endif
{
return
(
long
)
self
;
}
...
...
@@ -478,7 +482,7 @@ HandleModifiers(_THIS, unsigned short scancode, unsigned int modifierFlags)
static
void
UpdateKeymap
(
SDL_VideoData
*
data
)
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >=
1050
#if MAC_OS_X_VERSION_MAX_ALLOWED >=
MAC_OS_X_VERSION_10_5
TISInputSourceRef
key_layout
;
#else
KeyboardLayoutRef
key_layout
;
...
...
@@ -489,7 +493,7 @@ UpdateKeymap(SDL_VideoData *data)
SDLKey
keymap
[
SDL_NUM_SCANCODES
];
/* See if the keymap needs to be updated */
#if MAC_OS_X_VERSION_MAX_ALLOWED >=
1050
#if MAC_OS_X_VERSION_MAX_ALLOWED >=
MAC_OS_X_VERSION_10_5
key_layout
=
TISCopyCurrentKeyboardLayoutInputSource
();
#else
KLGetCurrentKeyboardLayout
(
&
key_layout
);
...
...
@@ -502,7 +506,7 @@ UpdateKeymap(SDL_VideoData *data)
SDL_GetDefaultKeymap
(
keymap
);
/* Try Unicode data first (preferred as of Mac OS X 10.5) */
#if MAC_OS_X_VERSION_MAX_ALLOWED >=
1050
#if MAC_OS_X_VERSION_MAX_ALLOWED >=
MAC_OS_X_VERSION_10_5
CFDataRef
uchrDataRef
=
TISGetInputSourceProperty
(
key_layout
,
kTISPropertyUnicodeKeyLayoutData
);
if
(
uchrDataRef
)
chr_data
=
CFDataGetBytePtr
(
uchrDataRef
);
...
...
@@ -544,7 +548,7 @@ UpdateKeymap(SDL_VideoData *data)
return
;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >=
1050
#if MAC_OS_X_VERSION_MAX_ALLOWED >=
MAC_OS_X_VERSION_10_5
cleanup
:
CFRelease
(
key_layout
);
#else
...
...
src/video/cocoa/SDL_cocoamodes.m
View file @
091cd521
...
...
@@ -23,7 +23,7 @@
#include "SDL_cocoavideo.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED <
1050
#if MAC_OS_X_VERSION_MAX_ALLOWED <
MAC_OS_X_VERSION_10_5
/*
Add methods to get at private members of NSScreen.
Since there is a bug in Apple's screen switching code
...
...
@@ -290,7 +290,7 @@ Cocoa_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
[[
NSApp
mainWindow
]
makeKeyAndOrderFront
:
nil
];
#if MAC_OS_X_VERSION_MAX_ALLOWED <
1050
#if MAC_OS_X_VERSION_MAX_ALLOWED <
MAC_OS_X_VERSION_10_5
/*
There is a bug in Cocoa where NSScreen doesn't synchronize
with CGDirectDisplay, so the main screen's frame is wrong.
...
...
src/video/cocoa/SDL_cocoaopengl.m
View file @
091cd521
...
...
@@ -36,16 +36,6 @@
#define
DEFAULT
_
OPENGL
"/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
/* This is implemented in Mac OS X 10.3 and above */
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
@implementation
NSOpenGLContext
(
CGLContextAccess
)
-
(
CGLContextObj
)
CGLContextObj
;
{
return
_contextAuxiliary
;
}
@end
#endif
/* < 10.3 */
int
Cocoa
_
GL
_
LoadLibrary
(
_
THIS
,
const
char
*
path
)
{
...
...
@@ -180,7 +170,7 @@ Cocoa_GL_CreateContext(_THIS, SDL_Window * window)
#endif
{
long
cache_max
=
64
;
GLint
cache
_
max
=
64
;
CGLContextObj
ctx
=
[
context
CGLContextObj
]
;
CGLSetParameter
(
ctx
,
GLI
_
SUBMIT
_
FUNC
_
CACHE
_
MAX
,
&
cache
_
max
)
;
CGLSetParameter
(
ctx
,
GLI
_
ARRAY
_
FUNC
_
CACHE
_
MAX
,
&
cache
_
max
)
;
...
...
src/video/cocoa/SDL_cocoashape.m
View file @
091cd521
...
...
@@ -29,7 +29,9 @@ SDL_WindowShaper*
Cocoa
_
CreateShaper
(
SDL
_
Window
*
window
)
{
SDL
_
WindowData
*
windata
=
(
SDL
_
WindowData
*
)
window
->
driverdata
;
[
windata
->
nswindow
setOpaque
:
NO
]
;
#if
MAC
_
OS
_
X
_
VERSION
_
MIN
_
REQUIRED
>=
MAC
_
OS
_
X
_
VERSION
_
10
_
6
[
windata
->
nswindow
setStyleMask
:
NSBorderlessWindowMask
]
;
#endif
SDL
_
WindowShaper
*
result
=
result
=
malloc
(
sizeof
(
SDL
_
WindowShaper
))
;
result
->
window
=
window
;
result
->
mode
.
mode
=
ShapeModeDefault
;
...
...
src/video/cocoa/SDL_cocoavideo.h
View file @
091cd521
...
...
@@ -40,7 +40,7 @@
#include "SDL_cocoaopengl.h"
#include "SDL_cocoawindow.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED <
= MAC_OS_X_VERSION_10_4
#if MAC_OS_X_VERSION_MAX_ALLOWED <
MAC_OS_X_VERSION_10_5
#if __LP64__
typedef
long
NSInteger
;
typedef
unsigned
long
NSUInteger
;
...
...
src/video/cocoa/SDL_cocoawindow.h
View file @
091cd521
...
...
@@ -29,7 +29,7 @@
typedef
struct
SDL_WindowData
SDL_WindowData
;
/* *INDENT-OFF* */
#if MAC_OS_X_VERSION_MIN_REQUIRED >=
1060
#if MAC_OS_X_VERSION_MIN_REQUIRED >=
MAC_OS_X_VERSION_10_6
@interface
Cocoa_WindowListener
:
NSResponder
<
NSWindowDelegate
>
{
#else
@interface
Cocoa_WindowListener
:
NSResponder
{
...
...
src/video/cocoa/SDL_cocoawindow.m
View file @
091cd521
...
...
@@ -61,7 +61,9 @@ static __inline__ void ConvertNSRect(NSRect *r)
[
center
addObserver
:
self
selector
:
@selector
(
windowDidUnhide
:
)
name
:
NSApplicationDidUnhideNotification
object
:
NSApp
];
[
_data
->
nswindow
setAcceptsMouseMovedEvents
:
YES
];
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
[[
_data
->
nswindow
contentView
]
setAcceptsTouchEvents
:
YES
];
#endif
}
-
(
void
)
close
...
...
@@ -293,6 +295,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
-
(
void
)
handleTouches
:
(
cocoaTouchType
)
type
withEvent
:
(
NSEvent
*
)
event
{
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
NSSet
*
touches
=
0
;
NSEnumerator
*
enumerator
;
NSTouch
*
touch
;
...
...
@@ -354,6 +357,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
touch
=
(
NSTouch
*
)[
enumerator
nextObject
];
}
#endif
/* MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 */
}
@end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment