Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
332ea14a
Commit
332ea14a
authored
Oct 29, 2007
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* backport [22872]
parent
89c8a456
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
11 deletions
+34
-11
modules/gui/macosx/AppleRemote.m
modules/gui/macosx/AppleRemote.m
+34
-11
No files found.
modules/gui/macosx/AppleRemote.m
View file @
332ea14a
...
...
@@ -53,6 +53,9 @@
#import "AppleRemote.h"
/* this was added by the VideoLAN team to ensure Leopard-compatibility and is VLC-only */
#import "intf.h"
const
char
*
AppleRemoteDeviceName
=
"AppleIRController"
;
const
int
REMOTE_SWITCH_COOKIE
=
19
;
...
...
@@ -68,18 +71,38 @@ const int REMOTE_SWITCH_COOKIE=19;
hidDeviceInterface
=
NULL
;
cookieToButtonMapping
=
[[
NSMutableDictionary
alloc
]
init
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonVolume_Plus
]
forKey
:
@"14_12_11_6_5_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonVolume_Minus
]
forKey
:
@"14_13_11_6_5_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonMenu
]
forKey
:
@"14_7_6_5_14_7_6_5_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonPlay
]
forKey
:
@"14_8_6_5_14_8_6_5_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonRight
]
forKey
:
@"14_9_6_5_14_9_6_5_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonLeft
]
forKey
:
@"14_10_6_5_14_10_6_5_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonRight_Hold
]
forKey
:
@"14_6_5_4_2_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonLeft_Hold
]
forKey
:
@"14_6_5_3_2_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonMenu_Hold
]
forKey
:
@"14_6_5_14_6_5_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonPlay_Sleep
]
forKey
:
@"18_14_6_5_18_14_6_5_"
];
if
(
MACOS_VERSION
<
10
.
5
f
)
// internal VLC definition
{
/* use the traditional cookies for Tiger (and Panther, if it is supported by the frame app) */
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonVolume_Plus
]
forKey
:
@"14_12_11_6_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonVolume_Minus
]
forKey
:
@"14_13_11_6_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonMenu
]
forKey
:
@"14_7_6_14_7_6_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonPlay
]
forKey
:
@"14_8_6_14_8_6_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonRight
]
forKey
:
@"14_9_6_14_9_6_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonLeft
]
forKey
:
@"14_10_6_14_10_6_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonRight_Hold
]
forKey
:
@"14_6_4_2_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonLeft_Hold
]
forKey
:
@"14_6_3_2_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonMenu_Hold
]
forKey
:
@"14_6_14_6_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonPlay_Sleep
]
forKey
:
@"18_14_6_18_14_6_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteControl_Switched
]
forKey
:
@"19_"
];
}
else
{
/* we're on Leopard and need to use a new set of cookies */
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonVolume_Plus
]
forKey
:
@"31_29_28_18_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonVolume_Minus
]
forKey
:
@"31_30_28_18_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonMenu
]
forKey
:
@"31_20_18_31_20_18_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonPlay
]
forKey
:
@"31_21_18_31_21_18_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonRight
]
forKey
:
@"31_22_18_31_22_18_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonLeft
]
forKey
:
@"31_23_18_31_23_18_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonRight_Hold
]
forKey
:
@"31_18_4_2_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonLeft_Hold
]
forKey
:
@"31_18_3_2_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonMenu_Hold
]
forKey
:
@"31_18_31_18_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteButtonPlay_Sleep
]
forKey
:
@"35_31_18_35_31_18_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
kRemoteControl_Switched
]
forKey
:
@"19_"
];
}
}
return
self
;
}
...
...
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