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().
| 4107 | // Unconditionally retrns 1; any failure in taking a screenshot would be reported on-screen |
| 4108 | // from the function ReallySnap(). |
| 4109 | static 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() |
nothing calls this directly
no test coverage detected