Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e2929478
Commit
e2929478
authored
Jul 15, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix vlclua_var_toggle_or_set
argument is a string ("on" or "off") not a bool
parent
db29a57a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
modules/lua/libs/variables.c
modules/lua/libs/variables.c
+19
-5
No files found.
modules/lua/libs/variables.c
View file @
e2929478
...
@@ -271,15 +271,29 @@ int vlclua_var_toggle_or_set( lua_State *L, vlc_object_t *p_obj,
...
@@ -271,15 +271,29 @@ int vlclua_var_toggle_or_set( lua_State *L, vlc_object_t *p_obj,
if
(
lua_gettop
(
L
)
>
1
)
return
vlclua_error
(
L
);
if
(
lua_gettop
(
L
)
>
1
)
return
vlclua_error
(
L
);
if
(
lua_gettop
(
L
)
==
0
)
if
(
lua_gettop
(
L
)
==
0
)
{
b_bool
=
var_ToggleBool
(
p_obj
,
psz_name
);
b_bool
=
var_ToggleBool
(
p_obj
,
psz_name
);
else
/* lua_gettop( L ) == 1 */
goto
end
;
}
/* lua_gettop( L ) == 1 */
const
char
*
s
=
luaL_checkstring
(
L
,
-
1
);
lua_pop
(
L
,
1
);
if
(
s
&&
!
strcmp
(
s
,
"on"
)
)
b_bool
=
true
;
else
if
(
s
&&
!
strcmp
(
s
,
"off"
)
)
b_bool
=
false
;
else
{
{
b_bool
=
luaL_checkboolean
(
L
,
-
1
);
b_bool
=
var_GetBool
(
p_obj
,
psz_name
);
lua_pop
(
L
,
1
);
goto
end
;
if
(
b_bool
!=
var_GetBool
(
p_obj
,
psz_name
)
)
var_SetBool
(
p_obj
,
psz_name
,
b_bool
);
}
}
if
(
b_bool
!=
var_GetBool
(
p_obj
,
psz_name
)
)
var_SetBool
(
p_obj
,
psz_name
,
b_bool
);
end:
lua_pushboolean
(
L
,
b_bool
);
lua_pushboolean
(
L
,
b_bool
);
return
1
;
return
1
;
}
}
...
...
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