-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.h
71 lines (58 loc) · 1.5 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef __MAIN_H__
#define __MAIN_H__
#include <stdbool.h>
#include "options.h"
#include "libretro.h"
#define MAX_PATH PATH_MAX
typedef enum {
EACTION_NONE = 0,
EACTION_MENU,
EACTION_TOGGLE_HUD,
EACTION_TOGGLE_FF,
EACTION_SAVE_STATE,
EACTION_LOAD_STATE,
EACTION_SCREENSHOT,
#ifdef FUNKEY_S
EACTION_NEXT_SCALER,
#endif
EACTION_QUIT,
} emu_action;
typedef enum {
CONFIG_TYPE_CORE = 0,
CONFIG_TYPE_GAME,
CONFIG_TYPE_AUTO,
} config_type;
#ifdef FUNKEY_S
extern bool should_suspend;
#endif
extern bool in_menu;
extern bool should_quit;
extern unsigned current_audio_buffer_size;
extern char core_name[MAX_PATH];
extern int config_override;
extern int resume_slot;
#ifdef MMENU
extern void* mmenu;
extern char save_template_path[MAX_PATH];
#endif
#ifdef DEBUG_LOGGING
#define PA_DEBUG(...) pa_log(RETRO_LOG_DEBUG, __VA_ARGS__)
#else
#define PA_DEBUG(...)
#endif
#define PA_INFO(...) pa_log(RETRO_LOG_INFO, __VA_ARGS__)
#define PA_WARN(...) pa_log(RETRO_LOG_WARN, __VA_ARGS__)
#define PA_ERROR(...) pa_log(RETRO_LOG_ERROR, __VA_ARGS__)
#define PA_FATAL(...) do { pa_log(RETRO_LOG_ERROR, __VA_ARGS__); quit(-1); } while(0)
int screenshot(void);
void set_defaults(void);
int save_config(config_type config_type);
void load_config(void);
void load_config_keys(void);
int remove_config(config_type config_type);
void handle_emu_action(emu_action action);
void pa_log(enum retro_log_level level, const char *fmt, ...);
void pa_track_render(void);
void finish(void);
int quit(int code);
#endif /* __MAIN_H__ */