summaryrefslogtreecommitdiff
path: root/apps/plugins
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
parentbe7a58c33155e0f72ad7b1fb23cf931d085e12cb (diff)
downloadrockbox-9b385f37efde877b77be2e0c1822a52b495ad4e6.tar.gz
rockbox-9b385f37efde877b77be2e0c1822a52b495ad4e6.zip
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')
-rw-r--r--apps/plugins/lua/rocklib.c4
-rw-r--r--apps/plugins/lua/rocklib.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index ed625ca369..44eb549dae 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -363,7 +363,7 @@ RB_WRAP(pcm)
363 lua_pushboolean(L, b_result); 363 lua_pushboolean(L, b_result);
364 break; 364 break;
365 case PCM_PLAYPAUSE: 365 case PCM_PLAYPAUSE:
366 rb->pcm_play_pause(luaL_checkboolean(L, 1)); 366 rb->pcm_play_pause(luaL_checkboolean(L, 2));
367 break; 367 break;
368 case PCM_PLAYSTOP: 368 case PCM_PLAYSTOP:
369 rb->pcm_play_stop(); 369 rb->pcm_play_stop();
@@ -380,7 +380,7 @@ RB_WRAP(pcm)
380 lua_pushinteger(L, right); 380 lua_pushinteger(L, right);
381 return 2; 381 return 2;
382 case PCM_SETFREQUENCY: 382 case PCM_SETFREQUENCY:
383 rb->pcm_set_frequency((unsigned int) luaL_checkint(L, 1)); 383 rb->pcm_set_frequency((unsigned int) luaL_checkint(L, 2));
384 break; 384 break;
385 case PCM_GETBYTESWAITING: 385 case PCM_GETBYTESWAITING:
386 byteswait = rb->pcm_get_bytes_waiting(); 386 byteswait = rb->pcm_get_bytes_waiting();
diff --git a/apps/plugins/lua/rocklib.h b/apps/plugins/lua/rocklib.h
index 4714dec36d..c8d1366ba6 100644
--- a/apps/plugins/lua/rocklib.h
+++ b/apps/plugins/lua/rocklib.h
@@ -33,7 +33,7 @@
33#endif 33#endif
34 34
35#define RB_CONSTANT(x) {#x, x} 35#define RB_CONSTANT(x) {#x, x}
36#define RB_STRING_CONSTANT(x) RB_CONSTANT(x) 36#define RB_STRING_CONSTANT(x) {#x, x}
37 37
38struct lua_int_reg { 38struct lua_int_reg {
39 char const* name; 39 char const* name;