RetroArch
driver.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * Copyright (C) 2011-2017 - Daniel De Matteis
4  *
5  * RetroArch is free software: you can redistribute it and/or modify it under the terms
6  * of the GNU General Public License as published by the Free Software Found-
7  * ation, either version 3 of the License, or (at your option) any later version.
8  *
9  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with RetroArch.
14  * If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef __RARCH_DRIVER__H
18 #define __RARCH_DRIVER__H
19 
20 #include <stdint.h>
21 #include <stdlib.h>
22 #include <sys/types.h>
23 
24 #include <boolean.h>
25 #include <retro_common_api.h>
26 
28 
29 #define DRIVERS_CMD_ALL \
30  ( DRIVER_AUDIO_MASK \
31  | DRIVER_VIDEO_MASK \
32  | DRIVER_INPUT_MASK \
33  | DRIVER_CAMERA_MASK \
34  | DRIVER_LOCATION_MASK \
35  | DRIVER_MENU_MASK \
36  | DRIVERS_VIDEO_INPUT_MASK \
37  | DRIVER_WIFI_MASK \
38  | DRIVER_LED_MASK \
39  | DRIVER_MIDI_MASK )
40 
41 #define DRIVERS_CMD_ALL_BUT_MENU \
42  ( DRIVER_AUDIO_MASK \
43  | DRIVER_VIDEO_MASK \
44  | DRIVER_INPUT_MASK \
45  | DRIVER_CAMERA_MASK \
46  | DRIVER_LOCATION_MASK \
47  | DRIVERS_VIDEO_INPUT_MASK \
48  | DRIVER_WIFI_MASK \
49  | DRIVER_LED_MASK \
50  | DRIVER_MIDI_MASK )
51 
52 enum
53 {
64 };
65 
66 enum
67 {
78 };
79 
81 {
84 
85  /* Attempts to find a default driver for
86  * all driver types.
87  *
88  * Should be run before RARCH_DRIVER_CTL_INIT.
89  */
91 
92  /* Sets monitor refresh rate to new value by calling
93  * video_monitor_set_refresh_rate(). Subsequently
94  * calls audio_monitor_set_refresh_rate(). */
96 
97  /* Update the system Audio/Video information.
98  * Will reinitialize audio/video drivers.
99  * Used by RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO. */
101 
103 
105 
107 
109 
110  /* Find index of the driver, based on @label. */
112 
113 };
114 
115 typedef struct driver_ctx_info
116 {
117  const char *label;
118  char *s;
119  ssize_t len;
121 
122 bool driver_ctl(enum driver_ctl_state state, void *data);
123 
124 /* Sets audio and video drivers to nonblock state.
125  *
126  * If nonblock state is false, sets blocking state for both
127  * audio and video drivers instead. */
128 void driver_set_nonblock_state(void);
129 
130 void driver_uninit(int flags);
131 
132 void drivers_init(int flags);
133 
135 
136 #endif
Definition: driver.h:56
Definition: driver.h:104
Definition: driver.h:69
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
Definition: driver.h:102
Definition: driver.h:63
Definition: driver.h:77
void drivers_init(int flags)
Definition: driver.c:325
Definition: driver.h:111
Definition: driver.h:71
Definition: driver.h:82
Definition: driver.h:70
char * s
Definition: driver.h:118
Definition: driver.h:58
Definition: driver.h:106
Definition: driver.h:68
Definition: ibxm.h:9
Definition: driver.h:83
Definition: driver.h:90
Definition: driver.h:95
Definition: driver.h:76
Definition: driver.h:55
void driver_set_nonblock_state(void)
Definition: driver.c:262
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
Definition: driver.h:59
Definition: driver.h:74
Definition: driver.h:75
Definition: driver.h:108
driver_ctl_state
Definition: driver.h:80
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
Definition: driver.h:73
Definition: driver.h:57
Definition: driver.h:60
const char * label
Definition: driver.h:117
Definition: driver.h:115
Definition: driver.h:54
Definition: driver.h:61
Definition: driver.h:62
Definition: driver.h:72
bool driver_ctl(enum driver_ctl_state state, void *data)
Definition: driver.c:475
GLbitfield flags
Definition: glext.h:7828
void driver_uninit(int flags)
Definition: driver.c:431
struct driver_ctx_info driver_ctx_info_t
ssize_t len
Definition: driver.h:119