Lua - added movie.active() function. Returns a bool value based on whether a move is loaded.
This commit is contained in:
parent
e42bbace5e
commit
b947e0d25b
|
@ -1,4 +1,5 @@
|
||||||
---version 2.0.4 yet to be released---
|
---version 2.0.4 yet to be released---
|
||||||
|
14-mar-2009 - adelikat - Lua - added movie.active() - returns a bool value based on whether a movie is currently loaded
|
||||||
14-mar-2009 - adelikat - Fixed Joypad.set, it uses 3 values instead of 2 now. True will take control of a button and make it on, False will take control and make it off, and Nil will not take control (allowing the user to press the button)
|
14-mar-2009 - adelikat - Fixed Joypad.set, it uses 3 values instead of 2 now. True will take control of a button and make it on, False will take control and make it off, and Nil will not take control (allowing the user to press the button)
|
||||||
14-mar-2009 - adelikat - Fix major crash issue where NROM game savestates were writing erroneous information if a non NROM game was loaded prior
|
14-mar-2009 - adelikat - Fix major crash issue where NROM game savestates were writing erroneous information if a non NROM game was loaded prior
|
||||||
13-mar-2009 - adelikat - Closing game / Opening new game resets the frame counter
|
13-mar-2009 - adelikat - Closing game / Opening new game resets the frame counter
|
||||||
|
|
|
@ -893,6 +893,9 @@ int fceu_lagcount(lua_State *L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//fceu_lagged()
|
||||||
|
//
|
||||||
|
//Returns true if the game is currently on a lag frame
|
||||||
int fceu_lagged (lua_State *L) {
|
int fceu_lagged (lua_State *L) {
|
||||||
|
|
||||||
bool Lag_Frame = FCEUI_GetLagged();
|
bool Lag_Frame = FCEUI_GetLagged();
|
||||||
|
@ -934,6 +937,16 @@ static int movie_stop(lua_State *L) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// movie.active()
|
||||||
|
//
|
||||||
|
//returns a bool value is there is a movie currently opn
|
||||||
|
int movie_active (lua_State *L) {
|
||||||
|
|
||||||
|
bool movieactive = (FCEUMOV_IsRecording() || FCEUMOV_IsPlaying());
|
||||||
|
lua_pushboolean(L, movieactive);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Common code by the gui library: make sure the screen array is ready
|
// Common code by the gui library: make sure the screen array is ready
|
||||||
static void gui_prepare() {
|
static void gui_prepare() {
|
||||||
if (!gui_data)
|
if (!gui_data)
|
||||||
|
@ -1837,6 +1850,7 @@ static const struct luaL_reg movielib[] = {
|
||||||
{"mode", movie_mode},
|
{"mode", movie_mode},
|
||||||
{"rerecordcounting", movie_rerecordcounting},
|
{"rerecordcounting", movie_rerecordcounting},
|
||||||
{"stop", movie_stop},
|
{"stop", movie_stop},
|
||||||
|
{"active", movie_active},
|
||||||
// {"record", movie_record},
|
// {"record", movie_record},
|
||||||
// {"playback", movie_playback},
|
// {"playback", movie_playback},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue