MCPcopy Create free account
hub / github.com/TASEmulators/fceux / movie_getfilename

Function movie_getfilename

src/lua-engine.cpp:3383–3394  ·  view source on GitHub ↗

movie.getfilename returns the filename of movie loaded with no path

Source from the content-addressed store, hash-verified

3381//
3382//returns the filename of movie loaded with no path
3383static int movie_getfilename (lua_State *L) {
3384
3385 if (!FCEUMOV_IsRecording() && !FCEUMOV_IsPlaying() && !FCEUMOV_Mode(MOVIEMODE_TASEDITOR))
3386 luaL_error(L, "No movie loaded.");
3387
3388 std::string name = FCEUI_GetMovieName();
3389 int x = name.find_last_of("/\\") + 1;
3390 if (x)
3391 name = name.substr(x, name.length()-x);
3392 lua_pushstring(L, name.c_str());
3393 return 1;
3394}
3395
3396//movie.replay
3397//

Callers

nothing calls this directly

Calls 6

FCEUMOV_IsRecordingFunction · 0.85
FCEUMOV_IsPlayingFunction · 0.85
FCEUMOV_ModeFunction · 0.85
luaL_errorFunction · 0.85
FCEUI_GetMovieNameFunction · 0.85
lua_pushstringFunction · 0.85

Tested by

no test coverage detected