New lua function: gui.savescreenshotas()
This commit is contained in:
parent
f171bd3f72
commit
3bfa40572e
|
@ -1,3 +1,4 @@
|
|||
07-june-2010 - adelikat - Lua - new function: gui.screenshotas()
|
||||
07-june-2010 - Deign/adelikat - Win32 - Added a SavestateAs Menu item
|
||||
06-june-2010 - FatRatKnight - Added a return value to gui.text: The X position where the function would paint the next character.
|
||||
02-june-2010 - adelikat - Win32 - Movie Options Dialog - Fix so Full Savestate Load checkbox is updated on load
|
||||
|
|
|
@ -3349,6 +3349,26 @@ static int gui_parsecolor(lua_State *L)
|
|||
}
|
||||
|
||||
|
||||
// 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().
|
||||
static int gui_savescreenshotas(lua_State *L) {
|
||||
const char* name = NULL;
|
||||
size_t l;
|
||||
name = luaL_checklstring(L,1,&l);
|
||||
lua_pushstring(L, name);
|
||||
if (name)
|
||||
FCEUI_SetSnapshotAsName(name);
|
||||
else
|
||||
luaL_error(L,"gui.savesnapshotas must have a string parameter");
|
||||
FCEUI_SaveSnapshotAs();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// gui.savescreenshot()
|
||||
//
|
||||
// Causes FCEUX to write a screenshot to a file as if the user pressed the associated hotkey.
|
||||
|
@ -4753,7 +4773,8 @@ static const struct luaL_reg guilib[] = {
|
|||
{"box", gui_box},
|
||||
{"text", gui_text},
|
||||
|
||||
{"savescreenshot", gui_savescreenshot},
|
||||
{"savescreenshot", gui_savescreenshot},
|
||||
{"savescreenshotas", gui_savescreenshotas},
|
||||
{"gdscreenshot", gui_gdscreenshot},
|
||||
{"gdoverlay", gui_gdoverlay},
|
||||
{"opacity", gui_setopacity},
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue