ScummVM API documentation
libretro-defs.h
1/* Copyright (C) 2023 Giovanni Cascione <ing.cascione@gmail.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18#ifndef LIBRETRO_DEFS_H
19#define LIBRETRO_DEFS_H
20
21/* Workaround for a RetroArch audio driver
22 * limitation: a maximum of 1024 frames
23 * can be written per call of audio_batch_cb() */
24#define AUDIO_BATCH_FRAMES_MAX 1024
25
26// System analog stick range is -0x8000 to 0x8000
27#define ANALOG_RANGE 0x8000
28
29#define DEFAULT_SAMPLE_RATE 48000
30#define DEFAULT_REFRESH_RATE 60
31#define FRAMESKIP_MAX DEFAULT_REFRESH_RATE / 2
32#define DEFAULT_SOUNDFONT_FILENAME "Roland_SC-55.sf2"
33
34// Audio status
35#define AUDIO_STATUS_MUTE (1 << 0)
36#define AUDIO_STATUS_UPDATE_LATENCY (1 << 1)
37#define AV_STATUS_UPDATE_AV_INFO (1 << 2)
38#define AV_STATUS_RESET_PENDING (1 << 3)
39#define AV_STATUS_UPDATE_GEOMETRY (1 << 4)
40#define AV_STATUS_UPDATE_GUI (1 << 5)
41
42// Video status
43#define VIDEO_GRAPHIC_MODE_REQUEST_SW (1 << 0)
44#define VIDEO_GRAPHIC_MODE_REQUEST_HW (1 << 1)
45#define VIDEO_GRAPHIC_MODE_HAVE_OPENGL (1 << 2)
46#define VIDEO_GRAPHIC_MODE_HAVE_OPENGLES2 (1 << 3)
47#define VIDEO_GRAPHIC_MODE_RESET_PENDING (1 << 4)
48
49// Preliminary scan results
50#define TEST_GAME_OK_TARGET_FOUND 0
51#define TEST_GAME_OK_ID_FOUND 1
52#define TEST_GAME_OK_ID_AUTODETECTED 2
53#define TEST_GAME_KO_NOT_FOUND 3
54#define TEST_GAME_KO_MULTIPLE_RESULTS 4
55
56#define MIDI_QUEUE_SIZE 2048 /* MUST be power of two */
57
58#ifndef F_OK
59#define F_OK 0
60#endif
61
62#ifndef W_OK
63#define W_OK 2
64#endif
65
66#ifndef R_OK
67#define R_OK 4
68#endif
69
70#endif