Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
faa0c470
Commit
faa0c470
authored
May 26, 2013
by
Gleb Pinigin
Browse files
Use boolValue instead of intValue for settings options
parent
ad66f769
Changes
3
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCAppDelegate.m
View file @
faa0c470
...
...
@@ -139,7 +139,7 @@
{
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
NSString
*
passcode
=
[
defaults
objectForKey
:
kVLCSettingPasscodeKey
];
if
([
passcode
isEqualToString
:
@""
]
||
!
[[
defaults
objectForKey
:
kVLCSettingPasscodeOnKey
]
int
Value
])
{
if
([
passcode
isEqualToString
:
@""
]
||
!
[[
defaults
objectForKey
:
kVLCSettingPasscodeOnKey
]
bool
Value
])
{
self
.
passcodeValidated
=
YES
;
return
;
}
...
...
AspenProject/VLCMovieViewController.m
View file @
faa0c470
...
...
@@ -83,8 +83,8 @@
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
NSArray
*
options
=
@[[[
defaults
objectForKey
:
kVLCSettingVerboseOutput
]
int
Value
]
?
kVLCSettingVerboseOutputOnValue
:
kVLCSettingVerboseOutputOffValue
,
[[
defaults
objectForKey
:
kVLCSettingStretchAudio
]
int
Value
]
?
kVLCSettingStretchAudioOnValue
:
kVLCSettingStretchAudioOffValue
,
NSArray
*
options
=
@[[[
defaults
objectForKey
:
kVLCSettingVerboseOutput
]
bool
Value
]
?
kVLCSettingVerboseOutputOnValue
:
kVLCSettingVerboseOutputOffValue
,
[[
defaults
objectForKey
:
kVLCSettingStretchAudio
]
bool
Value
]
?
kVLCSettingStretchAudioOnValue
:
kVLCSettingStretchAudioOffValue
,
[
NSString
stringWithFormat
:
@"--subsdec-encoding=%@"
,[
defaults
objectForKey
:
kVLCSettingTextEncoding
]]];
_mediaPlayer
=
[[
VLCMediaPlayer
alloc
]
initWithOptions
:
options
];
...
...
AspenProject/VLCSettingsController.m
View file @
faa0c470
...
...
@@ -31,7 +31,7 @@
-
(
void
)
settingDidChange
:(
NSNotification
*
)
notification
{
if
([
notification
.
object
isEqual
:
kVLCSettingPasscodeOnKey
])
{
BOOL
passcodeOn
=
(
BOOL
)
[[
notification
.
userInfo
objectForKey
:
kVLCSettingPasscodeOnKey
]
int
Value
];
BOOL
passcodeOn
=
[[
notification
.
userInfo
objectForKey
:
kVLCSettingPasscodeOnKey
]
bool
Value
];
if
(
passcodeOn
)
{
PAPasscodeViewController
*
passcodeLockController
=
[[
PAPasscodeViewController
alloc
]
initForAction
:
PasscodeActionSet
];
...
...
Write
Preview
Supports
Markdown
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