forked from len0rd/rockbox
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
This commit is contained in:
parent
be7a58c331
commit
9b385f37ef
2 changed files with 3 additions and 3 deletions
|
@ -363,7 +363,7 @@ RB_WRAP(pcm)
|
||||||
lua_pushboolean(L, b_result);
|
lua_pushboolean(L, b_result);
|
||||||
break;
|
break;
|
||||||
case PCM_PLAYPAUSE:
|
case PCM_PLAYPAUSE:
|
||||||
rb->pcm_play_pause(luaL_checkboolean(L, 1));
|
rb->pcm_play_pause(luaL_checkboolean(L, 2));
|
||||||
break;
|
break;
|
||||||
case PCM_PLAYSTOP:
|
case PCM_PLAYSTOP:
|
||||||
rb->pcm_play_stop();
|
rb->pcm_play_stop();
|
||||||
|
@ -380,7 +380,7 @@ RB_WRAP(pcm)
|
||||||
lua_pushinteger(L, right);
|
lua_pushinteger(L, right);
|
||||||
return 2;
|
return 2;
|
||||||
case PCM_SETFREQUENCY:
|
case PCM_SETFREQUENCY:
|
||||||
rb->pcm_set_frequency((unsigned int) luaL_checkint(L, 1));
|
rb->pcm_set_frequency((unsigned int) luaL_checkint(L, 2));
|
||||||
break;
|
break;
|
||||||
case PCM_GETBYTESWAITING:
|
case PCM_GETBYTESWAITING:
|
||||||
byteswait = rb->pcm_get_bytes_waiting();
|
byteswait = rb->pcm_get_bytes_waiting();
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RB_CONSTANT(x) {#x, x}
|
#define RB_CONSTANT(x) {#x, x}
|
||||||
#define RB_STRING_CONSTANT(x) RB_CONSTANT(x)
|
#define RB_STRING_CONSTANT(x) {#x, x}
|
||||||
|
|
||||||
struct lua_int_reg {
|
struct lua_int_reg {
|
||||||
char const* name;
|
char const* name;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue