From 8f8926485e641efb187ff9ae11cef9d23d1e8982 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 8 Feb 2011 01:21:46 +0200 Subject: frontend: support ingame actions (state load and such) --- frontend/main.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'frontend/main.h') diff --git a/frontend/main.h b/frontend/main.h index 0ebb0fc..b64bc4c 100644 --- a/frontend/main.h +++ b/frontend/main.h @@ -34,10 +34,40 @@ extern char cfgfile_basename[MAXPATHLEN]; +extern int state_slot; int get_state_filename(char *buf, int size, int i); +int emu_check_state(int slot); +int emu_save_state(int slot); +int emu_load_state(int slot); + void set_cd_image(const char *fname); extern unsigned long gpuDisp; extern int ready_to_go; +extern char hud_msg[64]; +extern int hud_new_msg; + +enum sched_action { + SACTION_NONE, + SACTION_ENTER_MENU, + SACTION_LOAD_STATE, + SACTION_SAVE_STATE, + SACTION_NEXT_SSLOT, + SACTION_PREV_SSLOT, + SACTION_TOGGLE_FSKIP, +}; + +static inline void emu_set_action(enum sched_action action_) +{ + extern enum sched_action emu_action, emu_action_old; + extern int stop; + + if (action_ == SACTION_NONE) + emu_action_old = 0; + else if (action_ != emu_action_old) + stop = 1; + emu_action = action_; +} + #endif /* __LINUX_H__ */ -- cgit v1.2.3