Commit afab5309 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* configure.ac: enabled Obj-C exceptions in the OBJCFLAGS (they're currently...

* configure.ac: enabled Obj-C exceptions in the OBJCFLAGS (they're currently used by AppleRemote only, but we should extend them to further classes)
* AppleRemote.*: added svn id and proper notes about the MIT-style and GPL dual licensing
parent a20ffdd4
...@@ -1353,7 +1353,7 @@ dnl Special arch tuning ...@@ -1353,7 +1353,7 @@ dnl Special arch tuning
dnl dnl
AC_ARG_WITH(tuning, AC_ARG_WITH(tuning,
[ --with-tuning=ARCH enable special tuning for an architecture [ --with-tuning=ARCH enable special tuning for an architecture
(default Pentium 2 on IA-32 and 750 on PPC)]) (default Pentium 2 on IA-32 and G4 on PPC)])
if test -n "${with_tuning}"; then if test -n "${with_tuning}"; then
if test "${with_tuning}" != "no"; then if test "${with_tuning}" != "no"; then
CFLAGS_TUNING="-mtune=${with_tuning}" CFLAGS_TUNING="-mtune=${with_tuning}"
...@@ -1364,7 +1364,7 @@ else ...@@ -1364,7 +1364,7 @@ else
elif test "${target_cpu}" = "x86_64"; then elif test "${target_cpu}" = "x86_64"; then
CFLAGS_TUNING="-mtune=athlon64" CFLAGS_TUNING="-mtune=athlon64"
elif test "${target_cpu}" = "powerpc"; then elif test "${target_cpu}" = "powerpc"; then
CFLAGS_TUNING="-mtune=750"; CFLAGS_TUNING="-mtune=G4";
fi fi
fi fi
...@@ -4779,10 +4779,12 @@ AC_ARG_ENABLE(macosx, ...@@ -4779,10 +4779,12 @@ AC_ARG_ENABLE(macosx,
then then
VLC_ADD_BUILTINS([macosx]) VLC_ADD_BUILTINS([macosx])
VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL]) VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL])
VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] )
fi], fi],
[AC_CHECK_HEADERS(Cocoa/Cocoa.h, [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
VLC_ADD_BUILTINS([macosx]) VLC_ADD_BUILTINS([macosx])
VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL]) VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL])
VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] )
)]) )])
CFLAGS=$ORIGCFLAGS CFLAGS=$ORIGCFLAGS
......
// /*****************************************************************************
// AppleRemote.h * AppleRemote.h
// AppleRemote * AppleRemote
// * $Id:$
// Created by Martin Kahr on 11.03.06. *
// Copyright 2006 martinkahr.com. All rights reserved. * Created by Martin Kahr on 11.03.06 under a MIT-style license.
// * Copyright (c) 2006 martinkahr.com. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*****************************************************************************
*
* Note that changes made by any members or contributors of the VideoLAN team
* (i.e. changes that were checked in into one of VideoLAN's source code
* repositories are licensed under the GNU General Public License version 2,
* or (at your option) any later version.
* Thus, the following statements apply to our changes:
*
* Copyright (C) 2006 the VideoLAN team
* Authors: Eric Petit <titer@m0k.org>
* Felix Kühne <fkuehne at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <mach/mach.h> #import <mach/mach.h>
......
// /*****************************************************************************
// AppleRemote.m * AppleRemote.m
// AppleRemote * AppleRemote
// * $Id:$
// Created by Martin Kahr on 11.03.06. *
// Copyright 2006 martinkahr.com. All rights reserved. * Created by Martin Kahr on 11.03.06 under a MIT-style license.
// * Copyright (c) 2006 martinkahr.com. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*****************************************************************************
*
* Note that changes made by any members or contributors of the VideoLAN team
* (i.e. changes that were checked in to one of VideoLAN's source code
* repositories are licensed under the GNU General Public License version 2,
* or (at your option) any later version.
* Thus, the following statements apply to our changes:
*
* Copyright (C) 2006 the VideoLAN team
* Authors: Eric Petit <titer@m0k.org>
* Felix Kühne <fkuehne at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "AppleRemote.h" #import "AppleRemote.h"
...@@ -13,8 +58,11 @@ const int REMOTE_SWITCH_COOKIE=19; ...@@ -13,8 +58,11 @@ const int REMOTE_SWITCH_COOKIE=19;
@implementation AppleRemote @implementation AppleRemote
- (id) init { - (id) init
if ( self == [super init] ) { {
self = [super init];
if ( self == [super init] ) {
openInExclusiveMode = YES; openInExclusiveMode = YES;
queue = NULL; queue = NULL;
hidDeviceInterface = NULL; hidDeviceInterface = NULL;
...@@ -152,7 +200,7 @@ static AppleRemote* sharedInstance=nil; ...@@ -152,7 +200,7 @@ static AppleRemote* sharedInstance=nil;
+ (AppleRemote*) sharedRemote { + (AppleRemote*) sharedRemote {
@synchronized(self) { @synchronized(self) {
if( sharedInstance == nil ) { if (sharedInstance == nil) {
sharedInstance = [[self alloc] init]; sharedInstance = [[self alloc] init];
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment