ScummVM API documentation
libretro-core.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_CORE_H
19#define LIBRETRO_CORE_H
20
21#include <libretro.h>
22
23extern retro_log_printf_t retro_log_cb;
24extern retro_input_state_t retro_input_cb;
25extern struct retro_midi_interface *retro_midi_interface;
26
27bool retro_get_input_bitmask_supported(void);
28void retro_osd_notification(const char *msg, enum retro_log_level level = RETRO_LOG_INFO);
29int retro_get_input_device(void);
30const char *retro_get_core_dir(void);
31const char *retro_get_system_dir(void);
32const char *retro_get_file_browser_start_dir(void);
33const char *retro_get_save_dir(void);
34const char *retro_get_playlist_dir(void);
35
36float retro_setting_get_frame_rate(void);
37uint16 retro_setting_get_sample_rate(void);
38bool retro_setting_get_browsing_mode_authorized(void);
39uint16 retro_setting_get_audio_samples_buffer_size(void);
40int retro_setting_get_analog_deadzone(void);
41bool retro_setting_get_analog_response_is_quadratic(void);
42float retro_setting_get_mouse_speed(void);
43int retro_setting_get_mouse_fine_control_speed_reduction(void);
44float retro_setting_get_gamepad_cursor_speed(void);
45float retro_setting_get_gamepad_acceleration_time(void);
46
54int retro_setting_get_pointer_device(void);
55int retro_setting_get_gui_res_w(void);
56int retro_setting_get_gui_res_h(void);
57
58void retro_set_size(unsigned width, unsigned height);
59
60uint8 retro_get_video_hw_mode(void);
61#ifdef USE_OPENGL
62uintptr_t retro_get_hw_fb(void);
63void *retro_get_proc_address(const char *name);
64#endif
65
66typedef struct {
67 uint8 byte;
68 uint32 delta_us;
70void retro_midi_queue_push(uint8 byte, uint32 delta_us);
71
72#endif // LIBRETRO_CORE_H
Definition: libretro-core.h:66