aboutsummaryrefslogtreecommitdiff
path: root/main.h
blob: e4e73aa48b23e2956f195d98b0607d1dc80f028a (plain)
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
#ifndef __MAIN_H__
#define __MAIN_H__

#include <stdbool.h>
#include "options.h"
#include "libretro.h"

#define MAX_PATH 512

typedef enum {
  EACTION_NONE = 0,
  EACTION_MENU,
  EACTION_TOGGLE_FPS,
  EACTION_TOGGLE_FF,
  EACTION_SAVE_STATE,
  EACTION_LOAD_STATE,
  EACTION_SCREENSHOT,
  EACTION_QUIT,
} emu_action;

extern bool should_quit;
extern unsigned current_audio_buffer_size;
extern char core_name[MAX_PATH];
extern char* content_path;
extern int config_override;

#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(int is_game);
void load_config(void);
int remove_config(int is_game);

void handle_emu_action(emu_action action);
void pa_log(enum retro_log_level level, const char *fmt, ...);
void pa_track_render(void);
int quit(int code);

#endif /* __MAIN_H__ */