Don't crash if recentfiles line fails to deserialize
[lsnes.git] / include / lua / lua.hpp
blob7166f63d0348524d6c083e81ea52e515b439f43c
1 #ifndef _lua__hpp__included__
2 #define _lua__hpp__included__
4 #include "core/controllerframe.hpp"
5 #include "library/movie.hpp"
6 #include "library/framebuffer.hpp"
7 #include "library/keyboard.hpp"
8 #include "library/lua-framebuffer.hpp"
10 void init_lua() throw();
11 void quit_lua() throw();
12 void lua_callback_do_paint(struct lua_render_context* ctx, bool non_synthethic) throw();
13 void lua_callback_do_video(struct lua_render_context* ctx, bool& kill_frame, uint32_t& hscl, uint32_t& vscl) throw();
14 void lua_callback_do_input(controller_frame& data, bool subframe) throw();
15 void lua_callback_do_reset() throw();
16 void lua_callback_do_frame() throw();
17 void lua_callback_do_frame_emulated() throw();
18 void lua_callback_do_rewind() throw();
19 void lua_callback_do_readwrite() throw();
20 void lua_callback_do_idle() throw();
21 void lua_callback_do_timer() throw();
22 void lua_callback_pre_load(const std::string& name) throw();
23 void lua_callback_err_load(const std::string& name) throw();
24 void lua_callback_post_load(const std::string& name, bool was_state) throw();
25 void lua_callback_pre_save(const std::string& name, bool is_state) throw();
26 void lua_callback_err_save(const std::string& name) throw();
27 void lua_callback_post_save(const std::string& name, bool is_state) throw();
28 void lua_callback_snoop_input(uint32_t port, uint32_t controller, uint32_t index, short value) throw();
29 void lua_callback_quit() throw();
30 void lua_callback_keyhook(const std::string& key, keyboard::key& p) throw();
31 void lua_callback_do_unsafe_rewind(const std::vector<char>& save, uint64_t secs, uint64_t ssecs, movie& mov, void* u);
32 bool lua_callback_do_button(uint32_t port, uint32_t controller, uint32_t index, const char* type);
33 void lua_callback_movie_lost(const char* what);
34 void lua_callback_do_latch(std::list<std::string>& args);
35 void lua_run_startup_scripts();
36 void lua_add_startup_script(const std::string& file);
38 #define LUA_TIMED_HOOK_IDLE 0
39 #define LUA_TIMED_HOOK_TIMER 1
41 uint64_t lua_timed_hook(int timer) throw();
43 extern bool lua_requests_repaint;
44 extern bool lua_requests_subframe_paint;
46 #endif