forked from libretro/libretro-lutro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlutro.h
58 lines (47 loc) · 1.31 KB
/
lutro.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
#ifndef LUTRO_H
#define LUTRO_H
#include <stdint.h>
#include <stdbool.h>
#include <libretro.h>
#ifndef PATH_MAX_LENGTH
#define PATH_MAX_LENGTH 4096
#endif
#define VERSION_MAJOR 0
#define VERSION_MINOR 0
#define VERSION_PATCH 1
#define VERSION_STRING "0.0.1"
typedef struct lutro_settings_t {
int width;
int height;
int pitch;
int pitch_pixels; // pitch in pixels to avoid recalculating it all the time
uint32_t *framebuffer;
retro_input_state_t input_cb;
int live_enable;
int live_call_load;
char gamedir[PATH_MAX_LENGTH];
char identity[PATH_MAX_LENGTH];
double delta;
double deltaCounter;
int frameCounter;
int fps;
retro_environment_t* environ_cb;
} lutro_settings_t;
extern lutro_settings_t settings;
extern struct retro_perf_callback perf_cb;
void lutro_init();
void lutro_deinit();
int lutro_load(const char *path);
void lutro_run(double delta);
void lutro_reset();
size_t lutro_serialize_size();
bool lutro_serialize(void *data_, size_t size);
bool lutro_unserialize(const void *data_, size_t size);
void lutro_shutdown_game(void);
typedef struct _AssetPathInfo
{
char fullpath[4096];
char ext[16]; // ext is only for matching ones we know so its OK to truncate long ones.
} AssetPathInfo;
void lutro_assetPath_init(AssetPathInfo* dest, const char* path);
#endif // LUTRO_H