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
86027501
Commit
86027501
authored
Apr 25, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed a leak in the Apple Remote class
parent
f83ba044
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
modules/gui/macosx/AppleRemote.h
modules/gui/macosx/AppleRemote.h
+1
-0
modules/gui/macosx/AppleRemote.m
modules/gui/macosx/AppleRemote.m
+18
-7
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs.m
+2
-1
No files found.
modules/gui/macosx/AppleRemote.h
View file @
86027501
...
...
@@ -108,6 +108,7 @@ The class is not thread safe
IBOutlet
id
delegate
;
}
+
(
AppleRemote
*
)
sharedInstance
;
-
(
int
)
remoteId
;
...
...
modules/gui/macosx/AppleRemote.m
View file @
86027501
...
...
@@ -65,8 +65,19 @@ const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4;
#pragma public interface
-
(
id
)
init
{
if
((
self
=
[
super
init
]))
{
static
AppleRemote
*
_o_sharedInstance
=
nil
;
+
(
AppleRemote
*
)
sharedInstance
{
return
_o_sharedInstance
?
_o_sharedInstance
:
[[
self
alloc
]
init
];
}
-
(
id
)
init
{
if
(
_o_sharedInstance
)
{
[
self
dealloc
];
}
else
{
_o_sharedInstance
=
[
super
init
];
openInExclusiveMode
=
YES
;
queue
=
NULL
;
hidDeviceInterface
=
NULL
;
...
...
@@ -124,13 +135,13 @@ const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4;
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
k2009RemoteButtonPlay
]
forKey
:
@"33_21_20_8_2_33_21_20_8_2_"
];
[
cookieToButtonMapping
setObject
:[
NSNumber
numberWithInt
:
k2009RemoteButtonFullscreen
]
forKey
:
@"33_21_20_3_2_33_21_20_3_2_"
];
}
}
/* defaults */
[
self
setSimulatesPlusMinusHold
:
YES
];
maxClickTimeDifference
=
DEFAULT_MAXIMUM_CLICK_TIME_DIFFERENCE
;
/* defaults */
[
self
setSimulatesPlusMinusHold
:
YES
];
maxClickTimeDifference
=
DEFAULT_MAXIMUM_CLICK_TIME_DIFFERENCE
;
}
return
self
;
return
_o_sharedInstance
;
}
-
(
void
)
dealloc
{
...
...
modules/gui/macosx/prefs.m
View file @
86027501
...
...
@@ -516,8 +516,9 @@ static VLCPrefs *_o_sharedMainInstance = nil;
-
(
id
)
initWithConfigItem
:
(
module_config_t
*
)
configItem
{
NSString
*
name
=
[[
[
VLCMain
sharedInstance
]
localizedString
:
configItem
->
psz_name
]
autoreleas
e
];
NSString
*
name
=
[[
VLCMain
sharedInstance
]
localizedString
:
configItem
->
psz_nam
e
];
self
=
[
super
initWithName
:
name
];
[
name
release
];
if
(
self
!=
nil
)
{
_configItem
=
configItem
;
...
...
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