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

Function gui_savescreenshotas

src/lua-engine.cpp:4109–4120  ·  view source on GitHub ↗

gui.savescreenshotas() Causes FCEUX to write a screenshot to a file based on a received filename, caution: will overwrite existing screenshot files Unconditionally retrns 1; any failure in taking a screenshot would be reported on-screen from the function ReallySnap().

Source from the content-addressed store, hash-verified

4107// Unconditionally retrns 1; any failure in taking a screenshot would be reported on-screen
4108// from the function ReallySnap().
4109static int gui_savescreenshotas(lua_State *L) {
4110 const char* name = NULL;
4111 size_t l;
4112 name = luaL_checklstring(L,1,&l);
4113 lua_pushstring(L, name);
4114 if (name)
4115 FCEUI_SetSnapshotAsName(name);
4116 else
4117 luaL_error(L,"gui.savesnapshotas must have a string parameter");
4118 FCEUI_SaveSnapshotAs();
4119 return 1;
4120}
4121
4122
4123// gui.savescreenshot()

Callers

nothing calls this directly

Calls 5

luaL_checklstringFunction · 0.85
lua_pushstringFunction · 0.85
FCEUI_SetSnapshotAsNameFunction · 0.85
luaL_errorFunction · 0.85
FCEUI_SaveSnapshotAsFunction · 0.85

Tested by

no test coverage detected