summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-11-01 18:18:46 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2018-11-01 18:18:46 -0400
commit9b385f37efde877b77be2e0c1822a52b495ad4e6 (patch)
tree7e8aa68ecd8f2a2ed24fef90888030d41b30b588 /apps/plugins/lua/rocklib.c
parentbe7a58c33155e0f72ad7b1fb23cf931d085e12cb (diff)
downloadrockbox-9b385f37efde877b77be2e0c1822a52b495ad4e6.zip
rockbox-9b385f37efde877b77be2e0c1822a52b495ad4e6.tar.gz
rockbox-9b385f37efde877b77be2e0c1822a52b495ad4e6.tar.bz2
rockbox-9b385f37efde877b77be2e0c1822a52b495ad4e6.tar.xz
Lua fix dir string constants and pcm_play_pause & pcm_set_frequency
String constants were already expanded in the first macro pcm functions were looking for stack position #1 when they needed stack pos #2 Change-Id: I7b4fb90953ab2395b77cbd550fdd257fafca6aae
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r--apps/plugins/lua/rocklib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index ed625ca..44eb549 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -363,7 +363,7 @@ RB_WRAP(pcm)
lua_pushboolean(L, b_result);
break;
case PCM_PLAYPAUSE:
- rb->pcm_play_pause(luaL_checkboolean(L, 1));
+ rb->pcm_play_pause(luaL_checkboolean(L, 2));
break;
case PCM_PLAYSTOP:
rb->pcm_play_stop();
@@ -380,7 +380,7 @@ RB_WRAP(pcm)
lua_pushinteger(L, right);
return 2;
case PCM_SETFREQUENCY:
- rb->pcm_set_frequency((unsigned int) luaL_checkint(L, 1));
+ rb->pcm_set_frequency((unsigned int) luaL_checkint(L, 2));
break;
case PCM_GETBYTESWAITING:
byteswait = rb->pcm_get_bytes_waiting();