RetroArch
libretro.h
Go to the documentation of this file.
1 /* Copyright (C) 2010-2018 The RetroArch team
2  *
3  * ---------------------------------------------------------------------------------------
4  * The following license statement only applies to this libretro API header (libretro.h).
5  * ---------------------------------------------------------------------------------------
6  *
7  * Permission is hereby granted, free of charge,
8  * to any person obtaining a copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation the rights to
10  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
11  * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef LIBRETRO_H__
24 #define LIBRETRO_H__
25 
26 #include <stdint.h>
27 #include <stddef.h>
28 #include <limits.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #ifndef __cplusplus
35 #if defined(_MSC_VER) && _MSC_VER < 1800 && !defined(SN_TARGET_PS3)
36 /* Hack applied for MSVC when compiling in C89 mode
37  * as it isn't C99-compliant. */
38 #define bool unsigned char
39 #define true 1
40 #define false 0
41 #else
42 #include <stdbool.h>
43 #endif
44 #endif
45 
46 #ifndef RETRO_CALLCONV
47 # if defined(__GNUC__) && defined(__i386__) && !defined(__x86_64__)
48 # define RETRO_CALLCONV __attribute__((cdecl))
49 # elif defined(_MSC_VER) && defined(_M_X86) && !defined(_M_X64)
50 # define RETRO_CALLCONV __cdecl
51 # else
52 # define RETRO_CALLCONV /* all other platforms only have one calling convention each */
53 # endif
54 #endif
55 
56 #ifndef RETRO_API
57 # if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
58 # ifdef RETRO_IMPORT_SYMBOLS
59 # ifdef __GNUC__
60 # define RETRO_API RETRO_CALLCONV __attribute__((__dllimport__))
61 # else
62 # define RETRO_API RETRO_CALLCONV __declspec(dllimport)
63 # endif
64 # else
65 # ifdef __GNUC__
66 # define RETRO_API RETRO_CALLCONV __attribute__((__dllexport__))
67 # else
68 # define RETRO_API RETRO_CALLCONV __declspec(dllexport)
69 # endif
70 # endif
71 # else
72 # if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__CELLOS_LV2__)
73 # define RETRO_API RETRO_CALLCONV __attribute__((__visibility__("default")))
74 # else
75 # define RETRO_API RETRO_CALLCONV
76 # endif
77 # endif
78 #endif
79 
80 /* Used for checking API/ABI mismatches that can break libretro
81  * implementations.
82  * It is not incremented for compatible changes to the API.
83  */
84 #define RETRO_API_VERSION 1
85 
86 /*
87  * Libretro's fundamental device abstractions.
88  *
89  * Libretro's input system consists of some standardized device types,
90  * such as a joypad (with/without analog), mouse, keyboard, lightgun
91  * and a pointer.
92  *
93  * The functionality of these devices are fixed, and individual cores
94  * map their own concept of a controller to libretro's abstractions.
95  * This makes it possible for frontends to map the abstract types to a
96  * real input device, and not having to worry about binding input
97  * correctly to arbitrary controller layouts.
98  */
99 
100 #define RETRO_DEVICE_TYPE_SHIFT 8
101 #define RETRO_DEVICE_MASK ((1 << RETRO_DEVICE_TYPE_SHIFT) - 1)
102 #define RETRO_DEVICE_SUBCLASS(base, id) (((id + 1) << RETRO_DEVICE_TYPE_SHIFT) | base)
103 
104 /* Input disabled. */
105 #define RETRO_DEVICE_NONE 0
106 
107 /* The JOYPAD is called RetroPad. It is essentially a Super Nintendo
108  * controller, but with additional L2/R2/L3/R3 buttons, similar to a
109  * PS1 DualShock. */
110 #define RETRO_DEVICE_JOYPAD 1
111 
112 /* The mouse is a simple mouse, similar to Super Nintendo's mouse.
113  * X and Y coordinates are reported relatively to last poll (poll callback).
114  * It is up to the libretro implementation to keep track of where the mouse
115  * pointer is supposed to be on the screen.
116  * The frontend must make sure not to interfere with its own hardware
117  * mouse pointer.
118  */
119 #define RETRO_DEVICE_MOUSE 2
120 
121 /* KEYBOARD device lets one poll for raw key pressed.
122  * It is poll based, so input callback will return with the current
123  * pressed state.
124  * For event/text based keyboard input, see
125  * RETRO_ENVIRONMENT_SET_KEYBOARD_CALLBACK.
126  */
127 #define RETRO_DEVICE_KEYBOARD 3
128 
129 /* LIGHTGUN device is similar to Guncon-2 for PlayStation 2.
130  * It reports X/Y coordinates in screen space (similar to the pointer)
131  * in the range [-0x8000, 0x7fff] in both axes, with zero being center and
132  * -0x8000 being out of bounds.
133  * As well as reporting on/off screen state. It features a trigger,
134  * start/select buttons, auxiliary action buttons and a
135  * directional pad. A forced off-screen shot can be requested for
136  * auto-reloading function in some games.
137  */
138 #define RETRO_DEVICE_LIGHTGUN 4
139 
140 /* The ANALOG device is an extension to JOYPAD (RetroPad).
141  * Similar to DualShock2 it adds two analog sticks and all buttons can
142  * be analog. This is treated as a separate device type as it returns
143  * axis values in the full analog range of [-0x7fff, 0x7fff],
144  * although some devices may return -0x8000.
145  * Positive X axis is right. Positive Y axis is down.
146  * Buttons are returned in the range [0, 0x7fff].
147  * Only use ANALOG type when polling for analog values.
148  */
149 #define RETRO_DEVICE_ANALOG 5
150 
151 /* Abstracts the concept of a pointing mechanism, e.g. touch.
152  * This allows libretro to query in absolute coordinates where on the
153  * screen a mouse (or something similar) is being placed.
154  * For a touch centric device, coordinates reported are the coordinates
155  * of the press.
156  *
157  * Coordinates in X and Y are reported as:
158  * [-0x7fff, 0x7fff]: -0x7fff corresponds to the far left/top of the screen,
159  * and 0x7fff corresponds to the far right/bottom of the screen.
160  * The "screen" is here defined as area that is passed to the frontend and
161  * later displayed on the monitor.
162  *
163  * The frontend is free to scale/resize this screen as it sees fit, however,
164  * (X, Y) = (-0x7fff, -0x7fff) will correspond to the top-left pixel of the
165  * game image, etc.
166  *
167  * To check if the pointer coordinates are valid (e.g. a touch display
168  * actually being touched), PRESSED returns 1 or 0.
169  *
170  * If using a mouse on a desktop, PRESSED will usually correspond to the
171  * left mouse button, but this is a frontend decision.
172  * PRESSED will only return 1 if the pointer is inside the game screen.
173  *
174  * For multi-touch, the index variable can be used to successively query
175  * more presses.
176  * If index = 0 returns true for _PRESSED, coordinates can be extracted
177  * with _X, _Y for index = 0. One can then query _PRESSED, _X, _Y with
178  * index = 1, and so on.
179  * Eventually _PRESSED will return false for an index. No further presses
180  * are registered at this point. */
181 #define RETRO_DEVICE_POINTER 6
182 
183 /* Buttons for the RetroPad (JOYPAD).
184  * The placement of these is equivalent to placements on the
185  * Super Nintendo controller.
186  * L2/R2/L3/R3 buttons correspond to the PS1 DualShock.
187  * Also used as id values for RETRO_DEVICE_INDEX_ANALOG_BUTTON */
188 #define RETRO_DEVICE_ID_JOYPAD_B 0
189 #define RETRO_DEVICE_ID_JOYPAD_Y 1
190 #define RETRO_DEVICE_ID_JOYPAD_SELECT 2
191 #define RETRO_DEVICE_ID_JOYPAD_START 3
192 #define RETRO_DEVICE_ID_JOYPAD_UP 4
193 #define RETRO_DEVICE_ID_JOYPAD_DOWN 5
194 #define RETRO_DEVICE_ID_JOYPAD_LEFT 6
195 #define RETRO_DEVICE_ID_JOYPAD_RIGHT 7
196 #define RETRO_DEVICE_ID_JOYPAD_A 8
197 #define RETRO_DEVICE_ID_JOYPAD_X 9
198 #define RETRO_DEVICE_ID_JOYPAD_L 10
199 #define RETRO_DEVICE_ID_JOYPAD_R 11
200 #define RETRO_DEVICE_ID_JOYPAD_L2 12
201 #define RETRO_DEVICE_ID_JOYPAD_R2 13
202 #define RETRO_DEVICE_ID_JOYPAD_L3 14
203 #define RETRO_DEVICE_ID_JOYPAD_R3 15
204 
205 /* Index / Id values for ANALOG device. */
206 #define RETRO_DEVICE_INDEX_ANALOG_LEFT 0
207 #define RETRO_DEVICE_INDEX_ANALOG_RIGHT 1
208 #define RETRO_DEVICE_INDEX_ANALOG_BUTTON 2
209 #define RETRO_DEVICE_ID_ANALOG_X 0
210 #define RETRO_DEVICE_ID_ANALOG_Y 1
211 
212 /* Id values for MOUSE. */
213 #define RETRO_DEVICE_ID_MOUSE_X 0
214 #define RETRO_DEVICE_ID_MOUSE_Y 1
215 #define RETRO_DEVICE_ID_MOUSE_LEFT 2
216 #define RETRO_DEVICE_ID_MOUSE_RIGHT 3
217 #define RETRO_DEVICE_ID_MOUSE_WHEELUP 4
218 #define RETRO_DEVICE_ID_MOUSE_WHEELDOWN 5
219 #define RETRO_DEVICE_ID_MOUSE_MIDDLE 6
220 #define RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP 7
221 #define RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN 8
222 #define RETRO_DEVICE_ID_MOUSE_BUTTON_4 9
223 #define RETRO_DEVICE_ID_MOUSE_BUTTON_5 10
224 
225 /* Id values for LIGHTGUN. */
226 #define RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X 13 /*Absolute Position*/
227 #define RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y 14 /*Absolute*/
228 #define RETRO_DEVICE_ID_LIGHTGUN_IS_OFFSCREEN 15 /*Status Check*/
229 #define RETRO_DEVICE_ID_LIGHTGUN_TRIGGER 2
230 #define RETRO_DEVICE_ID_LIGHTGUN_RELOAD 16 /*Forced off-screen shot*/
231 #define RETRO_DEVICE_ID_LIGHTGUN_AUX_A 3
232 #define RETRO_DEVICE_ID_LIGHTGUN_AUX_B 4
233 #define RETRO_DEVICE_ID_LIGHTGUN_START 6
234 #define RETRO_DEVICE_ID_LIGHTGUN_SELECT 7
235 #define RETRO_DEVICE_ID_LIGHTGUN_AUX_C 8
236 #define RETRO_DEVICE_ID_LIGHTGUN_DPAD_UP 9
237 #define RETRO_DEVICE_ID_LIGHTGUN_DPAD_DOWN 10
238 #define RETRO_DEVICE_ID_LIGHTGUN_DPAD_LEFT 11
239 #define RETRO_DEVICE_ID_LIGHTGUN_DPAD_RIGHT 12
240 /* deprecated */
241 #define RETRO_DEVICE_ID_LIGHTGUN_X 0 /*Relative Position*/
242 #define RETRO_DEVICE_ID_LIGHTGUN_Y 1 /*Relative*/
243 #define RETRO_DEVICE_ID_LIGHTGUN_CURSOR 3 /*Use Aux:A*/
244 #define RETRO_DEVICE_ID_LIGHTGUN_TURBO 4 /*Use Aux:B*/
245 #define RETRO_DEVICE_ID_LIGHTGUN_PAUSE 5 /*Use Start*/
246 
247 /* Id values for POINTER. */
248 #define RETRO_DEVICE_ID_POINTER_X 0
249 #define RETRO_DEVICE_ID_POINTER_Y 1
250 #define RETRO_DEVICE_ID_POINTER_PRESSED 2
251 
252 /* Returned from retro_get_region(). */
253 #define RETRO_REGION_NTSC 0
254 #define RETRO_REGION_PAL 1
255 
256 /* Id values for LANGUAGE */
258 {
278 
279  /* Ensure sizeof(enum) == sizeof(int) */
281 };
282 
283 /* Passed to retro_get_memory_data/size().
284  * If the memory type doesn't apply to the
285  * implementation NULL/0 can be returned.
286  */
287 #define RETRO_MEMORY_MASK 0xff
288 
289 /* Regular save RAM. This RAM is usually found on a game cartridge,
290  * backed up by a battery.
291  * If save game data is too complex for a single memory buffer,
292  * the SAVE_DIRECTORY (preferably) or SYSTEM_DIRECTORY environment
293  * callback can be used. */
294 #define RETRO_MEMORY_SAVE_RAM 0
295 
296 /* Some games have a built-in clock to keep track of time.
297  * This memory is usually just a couple of bytes to keep track of time.
298  */
299 #define RETRO_MEMORY_RTC 1
300 
301 /* System ram lets a frontend peek into a game systems main RAM. */
302 #define RETRO_MEMORY_SYSTEM_RAM 2
303 
304 /* Video ram lets a frontend peek into a game systems video RAM (VRAM). */
305 #define RETRO_MEMORY_VIDEO_RAM 3
306 
307 /* Keysyms used for ID in input state callback when polling RETRO_KEYBOARD. */
309 {
333  RETROK_0 = 48,
334  RETROK_1 = 49,
335  RETROK_2 = 50,
336  RETROK_3 = 51,
337  RETROK_4 = 52,
338  RETROK_5 = 53,
339  RETROK_6 = 54,
340  RETROK_7 = 55,
341  RETROK_8 = 56,
342  RETROK_9 = 57,
349  RETROK_AT = 64,
356  RETROK_a = 97,
357  RETROK_b = 98,
358  RETROK_c = 99,
359  RETROK_d = 100,
360  RETROK_e = 101,
361  RETROK_f = 102,
362  RETROK_g = 103,
363  RETROK_h = 104,
364  RETROK_i = 105,
365  RETROK_j = 106,
366  RETROK_k = 107,
367  RETROK_l = 108,
368  RETROK_m = 109,
369  RETROK_n = 110,
370  RETROK_o = 111,
371  RETROK_p = 112,
372  RETROK_q = 113,
373  RETROK_r = 114,
374  RETROK_s = 115,
375  RETROK_t = 116,
376  RETROK_u = 117,
377  RETROK_v = 118,
378  RETROK_w = 119,
379  RETROK_x = 120,
380  RETROK_y = 121,
381  RETROK_z = 122,
383  RETROK_BAR = 124,
387 
388  RETROK_KP0 = 256,
389  RETROK_KP1 = 257,
390  RETROK_KP2 = 258,
391  RETROK_KP3 = 259,
392  RETROK_KP4 = 260,
393  RETROK_KP5 = 261,
394  RETROK_KP6 = 262,
395  RETROK_KP7 = 263,
396  RETROK_KP8 = 264,
397  RETROK_KP9 = 265,
405 
406  RETROK_UP = 273,
407  RETROK_DOWN = 274,
409  RETROK_LEFT = 276,
411  RETROK_HOME = 278,
412  RETROK_END = 279,
415 
416  RETROK_F1 = 282,
417  RETROK_F2 = 283,
418  RETROK_F3 = 284,
419  RETROK_F4 = 285,
420  RETROK_F5 = 286,
421  RETROK_F6 = 287,
422  RETROK_F7 = 288,
423  RETROK_F8 = 289,
424  RETROK_F9 = 290,
425  RETROK_F10 = 291,
426  RETROK_F11 = 292,
427  RETROK_F12 = 293,
428  RETROK_F13 = 294,
429  RETROK_F14 = 295,
430  RETROK_F15 = 296,
431 
439  RETROK_RALT = 307,
440  RETROK_LALT = 308,
445  RETROK_MODE = 313,
447 
448  RETROK_HELP = 315,
452  RETROK_MENU = 319,
454  RETROK_EURO = 321,
455  RETROK_UNDO = 322,
457 
459 
460  RETROK_DUMMY = INT_MAX /* Ensure sizeof(enum) == sizeof(int) */
461 };
462 
464 {
465  RETROKMOD_NONE = 0x0000,
466 
471 
475 
476  RETROKMOD_DUMMY = INT_MAX /* Ensure sizeof(enum) == sizeof(int) */
477 };
478 
479 /* If set, this call is not part of the public libretro API yet. It can
480  * change or be removed at any time. */
481 #define RETRO_ENVIRONMENT_EXPERIMENTAL 0x10000
482 /* Environment callback to be used internally in frontend. */
483 #define RETRO_ENVIRONMENT_PRIVATE 0x20000
484 
485 /* Environment commands. */
486 #define RETRO_ENVIRONMENT_SET_ROTATION 1 /* const unsigned * --
487  * Sets screen rotation of graphics.
488  * Is only implemented if rotation can be accelerated by hardware.
489  * Valid values are 0, 1, 2, 3, which rotates screen by 0, 90, 180,
490  * 270 degrees counter-clockwise respectively.
491  */
492 #define RETRO_ENVIRONMENT_GET_OVERSCAN 2 /* bool * --
493  * Boolean value whether or not the implementation should use overscan,
494  * or crop away overscan.
495  */
496 #define RETRO_ENVIRONMENT_GET_CAN_DUPE 3 /* bool * --
497  * Boolean value whether or not frontend supports frame duping,
498  * passing NULL to video frame callback.
499  */
500 
501  /* Environ 4, 5 are no longer supported (GET_VARIABLE / SET_VARIABLES),
502  * and reserved to avoid possible ABI clash.
503  */
504 
505 #define RETRO_ENVIRONMENT_SET_MESSAGE 6 /* const struct retro_message * --
506  * Sets a message to be displayed in implementation-specific manner
507  * for a certain amount of 'frames'.
508  * Should not be used for trivial messages, which should simply be
509  * logged via RETRO_ENVIRONMENT_GET_LOG_INTERFACE (or as a
510  * fallback, stderr).
511  */
512 #define RETRO_ENVIRONMENT_SHUTDOWN 7 /* N/A (NULL) --
513  * Requests the frontend to shutdown.
514  * Should only be used if game has a specific
515  * way to shutdown the game from a menu item or similar.
516  */
517 #define RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL 8
518  /* const unsigned * --
519  * Gives a hint to the frontend how demanding this implementation
520  * is on a system. E.g. reporting a level of 2 means
521  * this implementation should run decently on all frontends
522  * of level 2 and up.
523  *
524  * It can be used by the frontend to potentially warn
525  * about too demanding implementations.
526  *
527  * The levels are "floating".
528  *
529  * This function can be called on a per-game basis,
530  * as certain games an implementation can play might be
531  * particularly demanding.
532  * If called, it should be called in retro_load_game().
533  */
534 #define RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY 9
535  /* const char ** --
536  * Returns the "system" directory of the frontend.
537  * This directory can be used to store system specific
538  * content such as BIOSes, configuration data, etc.
539  * The returned value can be NULL.
540  * If so, no such directory is defined,
541  * and it's up to the implementation to find a suitable directory.
542  *
543  * NOTE: Some cores used this folder also for "save" data such as
544  * memory cards, etc, for lack of a better place to put it.
545  * This is now discouraged, and if possible, cores should try to
546  * use the new GET_SAVE_DIRECTORY.
547  */
548 #define RETRO_ENVIRONMENT_SET_PIXEL_FORMAT 10
549  /* const enum retro_pixel_format * --
550  * Sets the internal pixel format used by the implementation.
551  * The default pixel format is RETRO_PIXEL_FORMAT_0RGB1555.
552  * This pixel format however, is deprecated (see enum retro_pixel_format).
553  * If the call returns false, the frontend does not support this pixel
554  * format.
555  *
556  * This function should be called inside retro_load_game() or
557  * retro_get_system_av_info().
558  */
559 #define RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS 11
560  /* const struct retro_input_descriptor * --
561  * Sets an array of retro_input_descriptors.
562  * It is up to the frontend to present this in a usable way.
563  * The array is terminated by retro_input_descriptor::description
564  * being set to NULL.
565  * This function can be called at any time, but it is recommended
566  * to call it as early as possible.
567  */
568 #define RETRO_ENVIRONMENT_SET_KEYBOARD_CALLBACK 12
569  /* const struct retro_keyboard_callback * --
570  * Sets a callback function used to notify core about keyboard events.
571  */
572 #define RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE 13
573  /* const struct retro_disk_control_callback * --
574  * Sets an interface which frontend can use to eject and insert
575  * disk images.
576  * This is used for games which consist of multiple images and
577  * must be manually swapped out by the user (e.g. PSX).
578  */
579 #define RETRO_ENVIRONMENT_SET_HW_RENDER 14
580  /* struct retro_hw_render_callback * --
581  * Sets an interface to let a libretro core render with
582  * hardware acceleration.
583  * Should be called in retro_load_game().
584  * If successful, libretro cores will be able to render to a
585  * frontend-provided framebuffer.
586  * The size of this framebuffer will be at least as large as
587  * max_width/max_height provided in get_av_info().
588  * If HW rendering is used, pass only RETRO_HW_FRAME_BUFFER_VALID or
589  * NULL to retro_video_refresh_t.
590  */
591 #define RETRO_ENVIRONMENT_GET_VARIABLE 15
592  /* struct retro_variable * --
593  * Interface to acquire user-defined information from environment
594  * that cannot feasibly be supported in a multi-system way.
595  * 'key' should be set to a key which has already been set by
596  * SET_VARIABLES.
597  * 'data' will be set to a value or NULL.
598  */
599 #define RETRO_ENVIRONMENT_SET_VARIABLES 16
600  /* const struct retro_variable * --
601  * Allows an implementation to signal the environment
602  * which variables it might want to check for later using
603  * GET_VARIABLE.
604  * This allows the frontend to present these variables to
605  * a user dynamically.
606  * This should be called the first time as early as
607  * possible (ideally in retro_set_environment).
608  * Afterward it may be called again for the core to communicate
609  * updated options to the frontend, but the number of core
610  * options must not change from the number in the initial call.
611  *
612  * 'data' points to an array of retro_variable structs
613  * terminated by a { NULL, NULL } element.
614  * retro_variable::key should be namespaced to not collide
615  * with other implementations' keys. E.g. A core called
616  * 'foo' should use keys named as 'foo_option'.
617  * retro_variable::value should contain a human readable
618  * description of the key as well as a '|' delimited list
619  * of expected values.
620  *
621  * The number of possible options should be very limited,
622  * i.e. it should be feasible to cycle through options
623  * without a keyboard.
624  *
625  * First entry should be treated as a default.
626  *
627  * Example entry:
628  * { "foo_option", "Speed hack coprocessor X; false|true" }
629  *
630  * Text before first ';' is description. This ';' must be
631  * followed by a space, and followed by a list of possible
632  * values split up with '|'.
633  *
634  * Only strings are operated on. The possible values will
635  * generally be displayed and stored as-is by the frontend.
636  */
637 #define RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE 17
638  /* bool * --
639  * Result is set to true if some variables are updated by
640  * frontend since last call to RETRO_ENVIRONMENT_GET_VARIABLE.
641  * Variables should be queried with GET_VARIABLE.
642  */
643 #define RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME 18
644  /* const bool * --
645  * If true, the libretro implementation supports calls to
646  * retro_load_game() with NULL as argument.
647  * Used by cores which can run without particular game data.
648  * This should be called within retro_set_environment() only.
649  */
650 #define RETRO_ENVIRONMENT_GET_LIBRETRO_PATH 19
651  /* const char ** --
652  * Retrieves the absolute path from where this libretro
653  * implementation was loaded.
654  * NULL is returned if the libretro was loaded statically
655  * (i.e. linked statically to frontend), or if the path cannot be
656  * determined.
657  * Mostly useful in cooperation with SET_SUPPORT_NO_GAME as assets can
658  * be loaded without ugly hacks.
659  */
660 
661  /* Environment 20 was an obsolete version of SET_AUDIO_CALLBACK.
662  * It was not used by any known core at the time,
663  * and was removed from the API. */
664 #define RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK 21
665  /* const struct retro_frame_time_callback * --
666  * Lets the core know how much time has passed since last
667  * invocation of retro_run().
668  * The frontend can tamper with the timing to fake fast-forward,
669  * slow-motion, frame stepping, etc.
670  * In this case the delta time will use the reference value
671  * in frame_time_callback..
672  */
673 #define RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK 22
674  /* const struct retro_audio_callback * --
675  * Sets an interface which is used to notify a libretro core about audio
676  * being available for writing.
677  * The callback can be called from any thread, so a core using this must
678  * have a thread safe audio implementation.
679  * It is intended for games where audio and video are completely
680  * asynchronous and audio can be generated on the fly.
681  * This interface is not recommended for use with emulators which have
682  * highly synchronous audio.
683  *
684  * The callback only notifies about writability; the libretro core still
685  * has to call the normal audio callbacks
686  * to write audio. The audio callbacks must be called from within the
687  * notification callback.
688  * The amount of audio data to write is up to the implementation.
689  * Generally, the audio callback will be called continously in a loop.
690  *
691  * Due to thread safety guarantees and lack of sync between audio and
692  * video, a frontend can selectively disallow this interface based on
693  * internal configuration. A core using this interface must also
694  * implement the "normal" audio interface.
695  *
696  * A libretro core using SET_AUDIO_CALLBACK should also make use of
697  * SET_FRAME_TIME_CALLBACK.
698  */
699 #define RETRO_ENVIRONMENT_GET_RUMBLE_INTERFACE 23
700  /* struct retro_rumble_interface * --
701  * Gets an interface which is used by a libretro core to set
702  * state of rumble motors in controllers.
703  * A strong and weak motor is supported, and they can be
704  * controlled indepedently.
705  */
706 #define RETRO_ENVIRONMENT_GET_INPUT_DEVICE_CAPABILITIES 24
707  /* uint64_t * --
708  * Gets a bitmask telling which device type are expected to be
709  * handled properly in a call to retro_input_state_t.
710  * Devices which are not handled or recognized always return
711  * 0 in retro_input_state_t.
712  * Example bitmask: caps = (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG).
713  * Should only be called in retro_run().
714  */
715 #define RETRO_ENVIRONMENT_GET_SENSOR_INTERFACE (25 | RETRO_ENVIRONMENT_EXPERIMENTAL)
716  /* struct retro_sensor_interface * --
717  * Gets access to the sensor interface.
718  * The purpose of this interface is to allow
719  * setting state related to sensors such as polling rate,
720  * enabling/disable it entirely, etc.
721  * Reading sensor state is done via the normal
722  * input_state_callback API.
723  */
724 #define RETRO_ENVIRONMENT_GET_CAMERA_INTERFACE (26 | RETRO_ENVIRONMENT_EXPERIMENTAL)
725  /* struct retro_camera_callback * --
726  * Gets an interface to a video camera driver.
727  * A libretro core can use this interface to get access to a
728  * video camera.
729  * New video frames are delivered in a callback in same
730  * thread as retro_run().
731  *
732  * GET_CAMERA_INTERFACE should be called in retro_load_game().
733  *
734  * Depending on the camera implementation used, camera frames
735  * will be delivered as a raw framebuffer,
736  * or as an OpenGL texture directly.
737  *
738  * The core has to tell the frontend here which types of
739  * buffers can be handled properly.
740  * An OpenGL texture can only be handled when using a
741  * libretro GL core (SET_HW_RENDER).
742  * It is recommended to use a libretro GL core when
743  * using camera interface.
744  *
745  * The camera is not started automatically. The retrieved start/stop
746  * functions must be used to explicitly
747  * start and stop the camera driver.
748  */
749 #define RETRO_ENVIRONMENT_GET_LOG_INTERFACE 27
750  /* struct retro_log_callback * --
751  * Gets an interface for logging. This is useful for
752  * logging in a cross-platform way
753  * as certain platforms cannot use stderr for logging.
754  * It also allows the frontend to
755  * show logging information in a more suitable way.
756  * If this interface is not used, libretro cores should
757  * log to stderr as desired.
758  */
759 #define RETRO_ENVIRONMENT_GET_PERF_INTERFACE 28
760  /* struct retro_perf_callback * --
761  * Gets an interface for performance counters. This is useful
762  * for performance logging in a cross-platform way and for detecting
763  * architecture-specific features, such as SIMD support.
764  */
765 #define RETRO_ENVIRONMENT_GET_LOCATION_INTERFACE 29
766  /* struct retro_location_callback * --
767  * Gets access to the location interface.
768  * The purpose of this interface is to be able to retrieve
769  * location-based information from the host device,
770  * such as current latitude / longitude.
771  */
772 #define RETRO_ENVIRONMENT_GET_CONTENT_DIRECTORY 30 /* Old name, kept for compatibility. */
773 #define RETRO_ENVIRONMENT_GET_CORE_ASSETS_DIRECTORY 30
774  /* const char ** --
775  * Returns the "core assets" directory of the frontend.
776  * This directory can be used to store specific assets that the
777  * core relies upon, such as art assets,
778  * input data, etc etc.
779  * The returned value can be NULL.
780  * If so, no such directory is defined,
781  * and it's up to the implementation to find a suitable directory.
782  */
783 #define RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY 31
784  /* const char ** --
785  * Returns the "save" directory of the frontend, unless there is no
786  * save directory available. The save directory should be used to
787  * store SRAM, memory cards, high scores, etc, if the libretro core
788  * cannot use the regular memory interface (retro_get_memory_data()).
789  *
790  * If the frontend cannot designate a save directory, it will return
791  * NULL to indicate that the core should attempt to operate without a
792  * save directory set.
793  *
794  * NOTE: early libretro cores used the system directory for save
795  * files. Cores that need to be backwards-compatible can still check
796  * GET_SYSTEM_DIRECTORY.
797  */
798 #define RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO 32
799  /* const struct retro_system_av_info * --
800  * Sets a new av_info structure. This can only be called from
801  * within retro_run().
802  * This should *only* be used if the core is completely altering the
803  * internal resolutions, aspect ratios, timings, sampling rate, etc.
804  * Calling this can require a full reinitialization of video/audio
805  * drivers in the frontend,
806  *
807  * so it is important to call it very sparingly, and usually only with
808  * the users explicit consent.
809  * An eventual driver reinitialize will happen so that video and
810  * audio callbacks
811  * happening after this call within the same retro_run() call will
812  * target the newly initialized driver.
813  *
814  * This callback makes it possible to support configurable resolutions
815  * in games, which can be useful to
816  * avoid setting the "worst case" in max_width/max_height.
817  *
818  * ***HIGHLY RECOMMENDED*** Do not call this callback every time
819  * resolution changes in an emulator core if it's
820  * expected to be a temporary change, for the reasons of possible
821  * driver reinitialization.
822  * This call is not a free pass for not trying to provide
823  * correct values in retro_get_system_av_info(). If you need to change
824  * things like aspect ratio or nominal width/height,
825  * use RETRO_ENVIRONMENT_SET_GEOMETRY, which is a softer variant
826  * of SET_SYSTEM_AV_INFO.
827  *
828  * If this returns false, the frontend does not acknowledge a
829  * changed av_info struct.
830  */
831 #define RETRO_ENVIRONMENT_SET_PROC_ADDRESS_CALLBACK 33
832  /* const struct retro_get_proc_address_interface * --
833  * Allows a libretro core to announce support for the
834  * get_proc_address() interface.
835  * This interface allows for a standard way to extend libretro where
836  * use of environment calls are too indirect,
837  * e.g. for cases where the frontend wants to call directly into the core.
838  *
839  * If a core wants to expose this interface, SET_PROC_ADDRESS_CALLBACK
840  * **MUST** be called from within retro_set_environment().
841  */
842 #define RETRO_ENVIRONMENT_SET_SUBSYSTEM_INFO 34
843  /* const struct retro_subsystem_info * --
844  * This environment call introduces the concept of libretro "subsystems".
845  * A subsystem is a variant of a libretro core which supports
846  * different kinds of games.
847  * The purpose of this is to support e.g. emulators which might
848  * have special needs, e.g. Super Nintendo's Super GameBoy, Sufami Turbo.
849  * It can also be used to pick among subsystems in an explicit way
850  * if the libretro implementation is a multi-system emulator itself.
851  *
852  * Loading a game via a subsystem is done with retro_load_game_special(),
853  * and this environment call allows a libretro core to expose which
854  * subsystems are supported for use with retro_load_game_special().
855  * A core passes an array of retro_game_special_info which is terminated
856  * with a zeroed out retro_game_special_info struct.
857  *
858  * If a core wants to use this functionality, SET_SUBSYSTEM_INFO
859  * **MUST** be called from within retro_set_environment().
860  */
861 #define RETRO_ENVIRONMENT_SET_CONTROLLER_INFO 35
862  /* const struct retro_controller_info * --
863  * This environment call lets a libretro core tell the frontend
864  * which controller subclasses are recognized in calls to
865  * retro_set_controller_port_device().
866  *
867  * Some emulators such as Super Nintendo support multiple lightgun
868  * types which must be specifically selected from. It is therefore
869  * sometimes necessary for a frontend to be able to tell the core
870  * about a special kind of input device which is not specifcally
871  * provided by the Libretro API.
872  *
873  * In order for a frontend to understand the workings of those devices,
874  * they must be defined as a specialized subclass of the generic device
875  * types already defined in the libretro API.
876  *
877  * The core must pass an array of const struct retro_controller_info which
878  * is terminated with a blanked out struct. Each element of the
879  * retro_controller_info struct corresponds to the ascending port index
880  * that is passed to retro_set_controller_port_device() when that function
881  * is called to indicate to the core that the frontend has changed the
882  * active device subclass. SEE ALSO: retro_set_controller_port_device()
883  *
884  * The ascending input port indexes provided by the core in the struct
885  * are generally presented by frontends as ascending User # or Player #,
886  * such as Player 1, Player 2, Player 3, etc. Which device subclasses are
887  * supported can vary per input port.
888  *
889  * The first inner element of each entry in the retro_controller_info array
890  * is a retro_controller_description struct that specifies the names and
891  * codes of all device subclasses that are available for the corresponding
892  * User or Player, beginning with the generic Libretro device that the
893  * subclasses are derived from. The second inner element of each entry is the
894  * total number of subclasses that are listed in the retro_controller_description.
895  *
896  * NOTE: Even if special device types are set in the libretro core,
897  * libretro should only poll input based on the base input device types.
898  */
899 #define RETRO_ENVIRONMENT_SET_MEMORY_MAPS (36 | RETRO_ENVIRONMENT_EXPERIMENTAL)
900  /* const struct retro_memory_map * --
901  * This environment call lets a libretro core tell the frontend
902  * about the memory maps this core emulates.
903  * This can be used to implement, for example, cheats in a core-agnostic way.
904  *
905  * Should only be used by emulators; it doesn't make much sense for
906  * anything else.
907  * It is recommended to expose all relevant pointers through
908  * retro_get_memory_* as well.
909  *
910  * Can be called from retro_init and retro_load_game.
911  */
912 #define RETRO_ENVIRONMENT_SET_GEOMETRY 37
913  /* const struct retro_game_geometry * --
914  * This environment call is similar to SET_SYSTEM_AV_INFO for changing
915  * video parameters, but provides a guarantee that drivers will not be
916  * reinitialized.
917  * This can only be called from within retro_run().
918  *
919  * The purpose of this call is to allow a core to alter nominal
920  * width/heights as well as aspect ratios on-the-fly, which can be
921  * useful for some emulators to change in run-time.
922  *
923  * max_width/max_height arguments are ignored and cannot be changed
924  * with this call as this could potentially require a reinitialization or a
925  * non-constant time operation.
926  * If max_width/max_height are to be changed, SET_SYSTEM_AV_INFO is required.
927  *
928  * A frontend must guarantee that this environment call completes in
929  * constant time.
930  */
931 #define RETRO_ENVIRONMENT_GET_USERNAME 38
932  /* const char **
933  * Returns the specified username of the frontend, if specified by the user.
934  * This username can be used as a nickname for a core that has online facilities
935  * or any other mode where personalization of the user is desirable.
936  * The returned value can be NULL.
937  * If this environ callback is used by a core that requires a valid username,
938  * a default username should be specified by the core.
939  */
940 #define RETRO_ENVIRONMENT_GET_LANGUAGE 39
941  /* unsigned * --
942  * Returns the specified language of the frontend, if specified by the user.
943  * It can be used by the core for localization purposes.
944  */
945 #define RETRO_ENVIRONMENT_GET_CURRENT_SOFTWARE_FRAMEBUFFER (40 | RETRO_ENVIRONMENT_EXPERIMENTAL)
946  /* struct retro_framebuffer * --
947  * Returns a preallocated framebuffer which the core can use for rendering
948  * the frame into when not using SET_HW_RENDER.
949  * The framebuffer returned from this call must not be used
950  * after the current call to retro_run() returns.
951  *
952  * The goal of this call is to allow zero-copy behavior where a core
953  * can render directly into video memory, avoiding extra bandwidth cost by copying
954  * memory from core to video memory.
955  *
956  * If this call succeeds and the core renders into it,
957  * the framebuffer pointer and pitch can be passed to retro_video_refresh_t.
958  * If the buffer from GET_CURRENT_SOFTWARE_FRAMEBUFFER is to be used,
959  * the core must pass the exact
960  * same pointer as returned by GET_CURRENT_SOFTWARE_FRAMEBUFFER;
961  * i.e. passing a pointer which is offset from the
962  * buffer is undefined. The width, height and pitch parameters
963  * must also match exactly to the values obtained from GET_CURRENT_SOFTWARE_FRAMEBUFFER.
964  *
965  * It is possible for a frontend to return a different pixel format
966  * than the one used in SET_PIXEL_FORMAT. This can happen if the frontend
967  * needs to perform conversion.
968  *
969  * It is still valid for a core to render to a different buffer
970  * even if GET_CURRENT_SOFTWARE_FRAMEBUFFER succeeds.
971  *
972  * A frontend must make sure that the pointer obtained from this function is
973  * writeable (and readable).
974  */
975 #define RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE (41 | RETRO_ENVIRONMENT_EXPERIMENTAL)
976  /* const struct retro_hw_render_interface ** --
977  * Returns an API specific rendering interface for accessing API specific data.
978  * Not all HW rendering APIs support or need this.
979  * The contents of the returned pointer is specific to the rendering API
980  * being used. See the various headers like libretro_vulkan.h, etc.
981  *
982  * GET_HW_RENDER_INTERFACE cannot be called before context_reset has been called.
983  * Similarly, after context_destroyed callback returns,
984  * the contents of the HW_RENDER_INTERFACE are invalidated.
985  */
986 #define RETRO_ENVIRONMENT_SET_SUPPORT_ACHIEVEMENTS (42 | RETRO_ENVIRONMENT_EXPERIMENTAL)
987  /* const bool * --
988  * If true, the libretro implementation supports achievements
989  * either via memory descriptors set with RETRO_ENVIRONMENT_SET_MEMORY_MAPS
990  * or via retro_get_memory_data/retro_get_memory_size.
991  *
992  * This must be called before the first call to retro_run.
993  */
994 #define RETRO_ENVIRONMENT_SET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE (43 | RETRO_ENVIRONMENT_EXPERIMENTAL)
995  /* const struct retro_hw_render_context_negotiation_interface * --
996  * Sets an interface which lets the libretro core negotiate with frontend how a context is created.
997  * The semantics of this interface depends on which API is used in SET_HW_RENDER earlier.
998  * This interface will be used when the frontend is trying to create a HW rendering context,
999  * so it will be used after SET_HW_RENDER, but before the context_reset callback.
1000  */
1001 #define RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS 44
1002  /* uint64_t * --
1003  * Sets quirk flags associated with serialization. The frontend will zero any flags it doesn't
1004  * recognize or support. Should be set in either retro_init or retro_load_game, but not both.
1005  */
1006 #define RETRO_ENVIRONMENT_SET_HW_SHARED_CONTEXT (44 | RETRO_ENVIRONMENT_EXPERIMENTAL)
1007  /* N/A (null) * --
1008  * The frontend will try to use a 'shared' hardware context (mostly applicable
1009  * to OpenGL) when a hardware context is being set up.
1010  *
1011  * Returns true if the frontend supports shared hardware contexts and false
1012  * if the frontend does not support shared hardware contexts.
1013  *
1014  * This will do nothing on its own until SET_HW_RENDER env callbacks are
1015  * being used.
1016  */
1017 #define RETRO_ENVIRONMENT_GET_VFS_INTERFACE (45 | RETRO_ENVIRONMENT_EXPERIMENTAL)
1018  /* struct retro_vfs_interface_info * --
1019  * Gets access to the VFS interface.
1020  * VFS presence needs to be queried prior to load_game or any
1021  * get_system/save/other_directory being called to let front end know
1022  * core supports VFS before it starts handing out paths.
1023  * It is recomended to do so in retro_set_environment
1024  */
1025 #define RETRO_ENVIRONMENT_GET_LED_INTERFACE (46 | RETRO_ENVIRONMENT_EXPERIMENTAL)
1026  /* struct retro_led_interface * --
1027  * Gets an interface which is used by a libretro core to set
1028  * state of LEDs.
1029  */
1030 #define RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE (47 | RETRO_ENVIRONMENT_EXPERIMENTAL)
1031  /* int * --
1032  * Tells the core if the frontend wants audio or video.
1033  * If disabled, the frontend will discard the audio or video,
1034  * so the core may decide to skip generating a frame or generating audio.
1035  * This is mainly used for increasing performance.
1036  * Bit 0 (value 1): Enable Video
1037  * Bit 1 (value 2): Enable Audio
1038  * Bit 2 (value 4): Use Fast Savestates.
1039  * Bit 3 (value 8): Hard Disable Audio
1040  * Other bits are reserved for future use and will default to zero.
1041  * If video is disabled:
1042  * * The frontend wants the core to not generate any video,
1043  * including presenting frames via hardware acceleration.
1044  * * The frontend's video frame callback will do nothing.
1045  * * After running the frame, the video output of the next frame should be
1046  * no different than if video was enabled, and saving and loading state
1047  * should have no issues.
1048  * If audio is disabled:
1049  * * The frontend wants the core to not generate any audio.
1050  * * The frontend's audio callbacks will do nothing.
1051  * * After running the frame, the audio output of the next frame should be
1052  * no different than if audio was enabled, and saving and loading state
1053  * should have no issues.
1054  * Fast Savestates:
1055  * * Guaranteed to be created by the same binary that will load them.
1056  * * Will not be written to or read from the disk.
1057  * * Suggest that the core assumes loading state will succeed.
1058  * * Suggest that the core updates its memory buffers in-place if possible.
1059  * * Suggest that the core skips clearing memory.
1060  * * Suggest that the core skips resetting the system.
1061  * * Suggest that the core may skip validation steps.
1062  * Hard Disable Audio:
1063  * * Used for a secondary core when running ahead.
1064  * * Indicates that the frontend will never need audio from the core.
1065  * * Suggests that the core may stop synthesizing audio, but this should not
1066  * compromise emulation accuracy.
1067  * * Audio output for the next frame does not matter, and the frontend will
1068  * never need an accurate audio state in the future.
1069  * * State will never be saved when using Hard Disable Audio.
1070  */
1071 #define RETRO_ENVIRONMENT_GET_MIDI_INTERFACE (48 | RETRO_ENVIRONMENT_EXPERIMENTAL)
1072  /* struct retro_midi_interface ** --
1073  * Returns a MIDI interface that can be used for raw data I/O.
1074  */
1075 
1076 #define RETRO_ENVIRONMENT_GET_FASTFORWARDING (49 | RETRO_ENVIRONMENT_EXPERIMENTAL)
1077  /* bool * --
1078  * Boolean value that indicates whether or not the frontend is in
1079  * fastforwarding mode.
1080  */
1081 
1082 /* VFS functionality */
1083 
1084 /* File paths:
1085  * File paths passed as parameters when using this api shall be well formed unix-style,
1086  * using "/" (unquoted forward slash) as directory separator regardless of the platform's native separator.
1087  * Paths shall also include at least one forward slash ("game.bin" is an invalid path, use "./game.bin" instead).
1088  * Other than the directory separator, cores shall not make assumptions about path format:
1089  * "C:/path/game.bin", "http://example.com/game.bin", "#game/game.bin", "./game.bin" (without quotes) are all valid paths.
1090  * Cores may replace the basename or remove path components from the end, and/or add new components;
1091  * however, cores shall not append "./", "../" or multiple consecutive forward slashes ("//") to paths they request to front end.
1092  * The frontend is encouraged to make such paths work as well as it can, but is allowed to give up if the core alters paths too much.
1093  * Frontends are encouraged, but not required, to support native file system paths (modulo replacing the directory separator, if applicable).
1094  * Cores are allowed to try using them, but must remain functional if the front rejects such requests.
1095  * Cores are encouraged to use the libretro-common filestream functions for file I/O,
1096  * as they seamlessly integrate with VFS, deal with directory separator replacement as appropriate
1097  * and provide platform-specific fallbacks in cases where front ends do not support VFS. */
1098 
1099 /* Opaque file handle
1100  * Introduced in VFS API v1 */
1101 struct retro_vfs_file_handle;
1102 
1103 /* File open flags
1104  * Introduced in VFS API v1 */
1105 #define RETRO_VFS_FILE_ACCESS_READ (1 << 0) /* Read only mode */
1106 #define RETRO_VFS_FILE_ACCESS_WRITE (1 << 1) /* Write only mode, discard contents and overwrites existing file unless RETRO_VFS_FILE_ACCESS_UPDATE is also specified */
1107 #define RETRO_VFS_FILE_ACCESS_READ_WRITE (RETRO_VFS_FILE_ACCESS_READ | RETRO_VFS_FILE_ACCESS_WRITE) /* Read-write mode, discard contents and overwrites existing file unless RETRO_VFS_FILE_ACCESS_UPDATE is also specified*/
1108 #define RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING (1 << 2) /* Prevents discarding content of existing files opened for writing */
1109 
1110 /* These are only hints. The frontend may choose to ignore them. Other than RAM/CPU/etc use,
1111  and how they react to unlikely external interference (for example someone else writing to that file,
1112  or the file's server going down), behavior will not change. */
1113 #define RETRO_VFS_FILE_ACCESS_HINT_NONE (0)
1114 /* Indicate that the file will be accessed many times. The frontend should aggressively cache everything. */
1115 #define RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS (1 << 0)
1116 
1117 /* Seek positions */
1118 #define RETRO_VFS_SEEK_POSITION_START 0
1119 #define RETRO_VFS_SEEK_POSITION_CURRENT 1
1120 #define RETRO_VFS_SEEK_POSITION_END 2
1121 
1122 /* Get path from opaque handle. Returns the exact same path passed to file_open when getting the handle
1123  * Introduced in VFS API v1 */
1124 typedef const char *(RETRO_CALLCONV *retro_vfs_get_path_t)(struct retro_vfs_file_handle *stream);
1125 
1126 /* Open a file for reading or writing. If path points to a directory, this will
1127  * fail. Returns the opaque file handle, or NULL for error.
1128  * Introduced in VFS API v1 */
1129 typedef struct retro_vfs_file_handle *(RETRO_CALLCONV *retro_vfs_open_t)(const char *path, unsigned mode, unsigned hints);
1130 
1131 /* Close the file and release its resources. Must be called if open_file returns non-NULL. Returns 0 on succes, -1 on failure.
1132  * Whether the call succeeds ot not, the handle passed as parameter becomes invalid and should no longer be used.
1133  * Introduced in VFS API v1 */
1134 typedef int (RETRO_CALLCONV *retro_vfs_close_t)(struct retro_vfs_file_handle *stream);
1135 
1136 /* Return the size of the file in bytes, or -1 for error.
1137  * Introduced in VFS API v1 */
1138 typedef int64_t (RETRO_CALLCONV *retro_vfs_size_t)(struct retro_vfs_file_handle *stream);
1139 
1140 /* Truncate file to specified size. Returns 0 on success or -1 on error
1141  * Introduced in VFS API v2 */
1142 typedef int64_t (RETRO_CALLCONV *retro_vfs_truncate_t)(struct retro_vfs_file_handle *stream, int64_t length);
1143 
1144 /* Get the current read / write position for the file. Returns - 1 for error.
1145  * Introduced in VFS API v1 */
1146 typedef int64_t (RETRO_CALLCONV *retro_vfs_tell_t)(struct retro_vfs_file_handle *stream);
1147 
1148 /* Set the current read/write position for the file. Returns the new position, -1 for error.
1149  * Introduced in VFS API v1 */
1150 typedef int64_t (RETRO_CALLCONV *retro_vfs_seek_t)(struct retro_vfs_file_handle *stream, int64_t offset, int seek_position);
1151 
1152 /* Read data from a file. Returns the number of bytes read, or -1 for error.
1153  * Introduced in VFS API v1 */
1154 typedef int64_t (RETRO_CALLCONV *retro_vfs_read_t)(struct retro_vfs_file_handle *stream, void *s, uint64_t len);
1155 
1156 /* Write data to a file. Returns the number of bytes written, or -1 for error.
1157  * Introduced in VFS API v1 */
1158 typedef int64_t (RETRO_CALLCONV *retro_vfs_write_t)(struct retro_vfs_file_handle *stream, const void *s, uint64_t len);
1159 
1160 /* Flush pending writes to file, if using buffered IO. Returns 0 on sucess, or -1 on failure.
1161  * Introduced in VFS API v1 */
1162 typedef int (RETRO_CALLCONV *retro_vfs_flush_t)(struct retro_vfs_file_handle *stream);
1163 
1164 /* Delete the specified file. Returns 0 on success, -1 on failure
1165  * Introduced in VFS API v1 */
1166 typedef int (RETRO_CALLCONV *retro_vfs_remove_t)(const char *path);
1167 
1168 /* Rename the specified file. Returns 0 on success, -1 on failure
1169  * Introduced in VFS API v1 */
1170 typedef int (RETRO_CALLCONV *retro_vfs_rename_t)(const char *old_path, const char *new_path);
1171 
1173 {
1174  /* VFS API v1 */
1186  /* VFS API v2 */
1188 };
1189 
1191 {
1192  /* Set by core: should this be higher than the version the front end supports,
1193  * front end will return false in the RETRO_ENVIRONMENT_GET_VFS_INTERFACE call
1194  * Introduced in VFS API v1 */
1196 
1197  /* Frontend writes interface pointer here. The frontend also sets the actual
1198  * version, must be at least required_interface_version.
1199  * Introduced in VFS API v1 */
1201 };
1202 
1204 {
1211 };
1212 
1213 /* Base struct. All retro_hw_render_interface_* types
1214  * contain at least these fields. */
1216 {
1219 };
1220 
1223 {
1225 };
1226 
1227 /* Retrieves the current state of the MIDI input.
1228  * Returns true if it's enabled, false otherwise. */
1230 
1231 /* Retrieves the current state of the MIDI output.
1232  * Returns true if it's enabled, false otherwise */
1234 
1235 /* Reads next byte from the input stream.
1236  * Returns true if byte is read, false otherwise. */
1238 
1239 /* Writes byte to the output stream.
1240  * 'delta_time' is in microseconds and represent time elapsed since previous write.
1241  * Returns true if byte is written, false otherwise. */
1243 
1244 /* Flushes previously written data.
1245  * Returns true if successful, false otherwise. */
1247 
1249 {
1255 };
1256 
1258 {
1261 };
1262 
1263 /* Base struct. All retro_hw_render_context_negotiation_interface_* types
1264  * contain at least these fields. */
1266 {
1269 };
1270 
1271 /* Serialized state is incomplete in some way. Set if serialization is
1272  * usable in typical end-user cases but should not be relied upon to
1273  * implement frame-sensitive frontend features such as netplay or
1274  * rerecording. */
1275 #define RETRO_SERIALIZATION_QUIRK_INCOMPLETE (1 << 0)
1276 /* The core must spend some time initializing before serialization is
1277  * supported. retro_serialize() will initially fail; retro_unserialize()
1278  * and retro_serialize_size() may or may not work correctly either. */
1279 #define RETRO_SERIALIZATION_QUIRK_MUST_INITIALIZE (1 << 1)
1280 /* Serialization size may change within a session. */
1281 #define RETRO_SERIALIZATION_QUIRK_CORE_VARIABLE_SIZE (1 << 2)
1282 /* Set by the frontend to acknowledge that it supports variable-sized
1283  * states. */
1284 #define RETRO_SERIALIZATION_QUIRK_FRONT_VARIABLE_SIZE (1 << 3)
1285 /* Serialized state can only be loaded during the same session. */
1286 #define RETRO_SERIALIZATION_QUIRK_SINGLE_SESSION (1 << 4)
1287 /* Serialized state cannot be loaded on an architecture with a different
1288  * endianness from the one it was saved on. */
1289 #define RETRO_SERIALIZATION_QUIRK_ENDIAN_DEPENDENT (1 << 5)
1290 /* Serialized state cannot be loaded on a different platform from the one it
1291  * was saved on for reasons other than endianness, such as word size
1292  * dependence */
1293 #define RETRO_SERIALIZATION_QUIRK_PLATFORM_DEPENDENT (1 << 6)
1294 
1295 #define RETRO_MEMDESC_CONST (1 << 0) /* The frontend will never change this memory area once retro_load_game has returned. */
1296 #define RETRO_MEMDESC_BIGENDIAN (1 << 1) /* The memory area contains big endian data. Default is little endian. */
1297 #define RETRO_MEMDESC_SYSTEM_RAM (1 << 2) /* The memory area is system RAM. This is main RAM of the gaming system. */
1298 #define RETRO_MEMDESC_SAVE_RAM (1 << 3) /* The memory area is save RAM. This RAM is usually found on a game cartridge, backed up by a battery. */
1299 #define RETRO_MEMDESC_VIDEO_RAM (1 << 4) /* The memory area is video RAM (VRAM) */
1300 #define RETRO_MEMDESC_ALIGN_2 (1 << 16) /* All memory access in this area is aligned to their own size, or 2, whichever is smaller. */
1301 #define RETRO_MEMDESC_ALIGN_4 (2 << 16)
1302 #define RETRO_MEMDESC_ALIGN_8 (3 << 16)
1303 #define RETRO_MEMDESC_MINSIZE_2 (1 << 24) /* All memory in this region is accessed at least 2 bytes at the time. */
1304 #define RETRO_MEMDESC_MINSIZE_4 (2 << 24)
1305 #define RETRO_MEMDESC_MINSIZE_8 (3 << 24)
1307 {
1309 
1310  /* Pointer to the start of the relevant ROM or RAM chip.
1311  * It's strongly recommended to use 'offset' if possible, rather than
1312  * doing math on the pointer.
1313  *
1314  * If the same byte is mapped my multiple descriptors, their descriptors
1315  * must have the same pointer.
1316  * If 'start' does not point to the first byte in the pointer, put the
1317  * difference in 'offset' instead.
1318  *
1319  * May be NULL if there's nothing usable here (e.g. hardware registers and
1320  * open bus). No flags should be set if the pointer is NULL.
1321  * It's recommended to minimize the number of descriptors if possible,
1322  * but not mandatory. */
1323  void *ptr;
1324  size_t offset;
1325 
1326  /* This is the location in the emulated address space
1327  * where the mapping starts. */
1328  size_t start;
1329 
1330  /* Which bits must be same as in 'start' for this mapping to apply.
1331  * The first memory descriptor to claim a certain byte is the one
1332  * that applies.
1333  * A bit which is set in 'start' must also be set in this.
1334  * Can be zero, in which case each byte is assumed mapped exactly once.
1335  * In this case, 'len' must be a power of two. */
1336  size_t select;
1337 
1338  /* If this is nonzero, the set bits are assumed not connected to the
1339  * memory chip's address pins. */
1340  size_t disconnect;
1341 
1342  /* This one tells the size of the current memory area.
1343  * If, after start+disconnect are applied, the address is higher than
1344  * this, the highest bit of the address is cleared.
1345  *
1346  * If the address is still too high, the next highest bit is cleared.
1347  * Can be zero, in which case it's assumed to be infinite (as limited
1348  * by 'select' and 'disconnect'). */
1349  size_t len;
1350 
1351  /* To go from emulated address to physical address, the following
1352  * order applies:
1353  * Subtract 'start', pick off 'disconnect', apply 'len', add 'offset'. */
1354 
1355  /* The address space name must consist of only a-zA-Z0-9_-,
1356  * should be as short as feasible (maximum length is 8 plus the NUL),
1357  * and may not be any other address space plus one or more 0-9A-F
1358  * at the end.
1359  * However, multiple memory descriptors for the same address space is
1360  * allowed, and the address space name can be empty. NULL is treated
1361  * as empty.
1362  *
1363  * Address space names are case sensitive, but avoid lowercase if possible.
1364  * The same pointer may exist in multiple address spaces.
1365  *
1366  * Examples:
1367  * blank+blank - valid (multiple things may be mapped in the same namespace)
1368  * 'Sp'+'Sp' - valid (multiple things may be mapped in the same namespace)
1369  * 'A'+'B' - valid (neither is a prefix of each other)
1370  * 'S'+blank - valid ('S' is not in 0-9A-F)
1371  * 'a'+blank - valid ('a' is not in 0-9A-F)
1372  * 'a'+'A' - valid (neither is a prefix of each other)
1373  * 'AR'+blank - valid ('R' is not in 0-9A-F)
1374  * 'ARB'+blank - valid (the B can't be part of the address either, because
1375  * there is no namespace 'AR')
1376  * blank+'B' - not valid, because it's ambigous which address space B1234
1377  * would refer to.
1378  * The length can't be used for that purpose; the frontend may want
1379  * to append arbitrary data to an address, without a separator. */
1380  const char *addrspace;
1381 
1382  /* TODO: When finalizing this one, add a description field, which should be
1383  * "WRAM" or something roughly equally long. */
1384 
1385  /* TODO: When finalizing this one, replace 'select' with 'limit', which tells
1386  * which bits can vary and still refer to the same address (limit = ~select).
1387  * TODO: limit? range? vary? something else? */
1388 
1389  /* TODO: When finalizing this one, if 'len' is above what 'select' (or
1390  * 'limit') allows, it's bankswitched. Bankswitched data must have both 'len'
1391  * and 'select' != 0, and the mappings don't tell how the system switches the
1392  * banks. */
1393 
1394  /* TODO: When finalizing this one, fix the 'len' bit removal order.
1395  * For len=0x1800, pointer 0x1C00 should go to 0x1400, not 0x0C00.
1396  * Algorithm: Take bits highest to lowest, but if it goes above len, clear
1397  * the most recent addition and continue on the next bit.
1398  * TODO: Can the above be optimized? Is "remove the lowest bit set in both
1399  * pointer and 'len'" equivalent? */
1400 
1401  /* TODO: Some emulators (MAME?) emulate big endian systems by only accessing
1402  * the emulated memory in 32-bit chunks, native endian. But that's nothing
1403  * compared to Darek Mihocka <http://www.emulators.com/docs/nx07_vm101.htm>
1404  * (section Emulation 103 - Nearly Free Byte Reversal) - he flips the ENTIRE
1405  * RAM backwards! I'll want to represent both of those, via some flags.
1406  *
1407  * I suspect MAME either didn't think of that idea, or don't want the #ifdef.
1408  * Not sure which, nor do I really care. */
1409 
1410  /* TODO: Some of those flags are unused and/or don't really make sense. Clean
1411  * them up. */
1412 };
1413 
1414 /* The frontend may use the largest value of 'start'+'select' in a
1415  * certain namespace to infer the size of the address space.
1416  *
1417  * If the address space is larger than that, a mapping with .ptr=NULL
1418  * should be at the end of the array, with .select set to all ones for
1419  * as long as the address space is big.
1420  *
1421  * Sample descriptors (minus .ptr, and RETRO_MEMFLAG_ on the flags):
1422  * SNES WRAM:
1423  * .start=0x7E0000, .len=0x20000
1424  * (Note that this must be mapped before the ROM in most cases; some of the
1425  * ROM mappers
1426  * try to claim $7E0000, or at least $7E8000.)
1427  * SNES SPC700 RAM:
1428  * .addrspace="S", .len=0x10000
1429  * SNES WRAM mirrors:
1430  * .flags=MIRROR, .start=0x000000, .select=0xC0E000, .len=0x2000
1431  * .flags=MIRROR, .start=0x800000, .select=0xC0E000, .len=0x2000
1432  * SNES WRAM mirrors, alternate equivalent descriptor:
1433  * .flags=MIRROR, .select=0x40E000, .disconnect=~0x1FFF
1434  * (Various similar constructions can be created by combining parts of
1435  * the above two.)
1436  * SNES LoROM (512KB, mirrored a couple of times):
1437  * .flags=CONST, .start=0x008000, .select=0x408000, .disconnect=0x8000, .len=512*1024
1438  * .flags=CONST, .start=0x400000, .select=0x400000, .disconnect=0x8000, .len=512*1024
1439  * SNES HiROM (4MB):
1440  * .flags=CONST, .start=0x400000, .select=0x400000, .len=4*1024*1024
1441  * .flags=CONST, .offset=0x8000, .start=0x008000, .select=0x408000, .len=4*1024*1024
1442  * SNES ExHiROM (8MB):
1443  * .flags=CONST, .offset=0, .start=0xC00000, .select=0xC00000, .len=4*1024*1024
1444  * .flags=CONST, .offset=4*1024*1024, .start=0x400000, .select=0xC00000, .len=4*1024*1024
1445  * .flags=CONST, .offset=0x8000, .start=0x808000, .select=0xC08000, .len=4*1024*1024
1446  * .flags=CONST, .offset=4*1024*1024+0x8000, .start=0x008000, .select=0xC08000, .len=4*1024*1024
1447  * Clarify the size of the address space:
1448  * .ptr=NULL, .select=0xFFFFFF
1449  * .len can be implied by .select in many of them, but was included for clarity.
1450  */
1451 
1453 {
1456 };
1457 
1459 {
1460  /* Human-readable description of the controller. Even if using a generic
1461  * input device type, this can be set to the particular device type the
1462  * core uses. */
1463  const char *desc;
1464 
1465  /* Device type passed to retro_set_controller_port_device(). If the device
1466  * type is a sub-class of a generic input device type, use the
1467  * RETRO_DEVICE_SUBCLASS macro to create an ID.
1468  *
1469  * E.g. RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_JOYPAD, 1). */
1470  unsigned id;
1471 };
1472 
1474 {
1476  unsigned num_types;
1477 };
1478 
1480 {
1481  /* The extension associated with a memory type, e.g. "psram". */
1482  const char *extension;
1483 
1484  /* The memory type for retro_get_memory(). This should be at
1485  * least 0x100 to avoid conflict with standardized
1486  * libretro memory types. */
1487  unsigned type;
1488 };
1489 
1491 {
1492  /* Describes what the content is (SGB BIOS, GB ROM, etc). */
1493  const char *desc;
1494 
1495  /* Same definition as retro_get_system_info(). */
1496  const char *valid_extensions;
1497 
1498  /* Same definition as retro_get_system_info(). */
1500 
1501  /* Same definition as retro_get_system_info(). */
1503 
1504  /* This is set if the content is required to load a game.
1505  * If this is set to false, a zeroed-out retro_game_info can be passed. */
1506  bool required;
1507 
1508  /* Content can have multiple associated persistent
1509  * memory types (retro_get_memory()). */
1511  unsigned num_memory;
1512 };
1513 
1515 {
1516  /* Human-readable string of the subsystem type, e.g. "Super GameBoy" */
1517  const char *desc;
1518 
1519  /* A computer friendly short string identifier for the subsystem type.
1520  * This name must be [a-z].
1521  * E.g. if desc is "Super GameBoy", this can be "sgb".
1522  * This identifier can be used for command-line interfaces, etc.
1523  */
1524  const char *ident;
1525 
1526  /* Infos for each content file. The first entry is assumed to be the
1527  * "most significant" content for frontend purposes.
1528  * E.g. with Super GameBoy, the first content should be the GameBoy ROM,
1529  * as it is the most "significant" content to a user.
1530  * If a frontend creates new file paths based on the content used
1531  * (e.g. savestates), it should use the path for the first ROM to do so. */
1533 
1534  /* Number of content files associated with a subsystem. */
1535  unsigned num_roms;
1536 
1537  /* The type passed to retro_load_game_special(). */
1538  unsigned id;
1539 };
1540 
1542 
1543 /* libretro API extension functions:
1544  * (None here so far).
1545  *
1546  * Get a symbol from a libretro core.
1547  * Cores should only return symbols which are actual
1548  * extensions to the libretro API.
1549  *
1550  * Frontends should not use this to obtain symbols to standard
1551  * libretro entry points (static linking or dlsym).
1552  *
1553  * The symbol name must be equal to the function name,
1554  * e.g. if void retro_foo(void); exists, the symbol must be called "retro_foo".
1555  * The returned function pointer must be cast to the corresponding type.
1556  */
1558 
1560 {
1562 };
1563 
1565 {
1570 
1572 };
1573 
1574 /* Logging function. Takes log level argument as well. */
1576  const char *fmt, ...);
1577 
1579 {
1581 };
1582 
1583 /* Performance related functions */
1584 
1585 /* ID values for SIMD CPU features */
1586 #define RETRO_SIMD_SSE (1 << 0)
1587 #define RETRO_SIMD_SSE2 (1 << 1)
1588 #define RETRO_SIMD_VMX (1 << 2)
1589 #define RETRO_SIMD_VMX128 (1 << 3)
1590 #define RETRO_SIMD_AVX (1 << 4)
1591 #define RETRO_SIMD_NEON (1 << 5)
1592 #define RETRO_SIMD_SSE3 (1 << 6)
1593 #define RETRO_SIMD_SSSE3 (1 << 7)
1594 #define RETRO_SIMD_MMX (1 << 8)
1595 #define RETRO_SIMD_MMXEXT (1 << 9)
1596 #define RETRO_SIMD_SSE4 (1 << 10)
1597 #define RETRO_SIMD_SSE42 (1 << 11)
1598 #define RETRO_SIMD_AVX2 (1 << 12)
1599 #define RETRO_SIMD_VFPU (1 << 13)
1600 #define RETRO_SIMD_PS (1 << 14)
1601 #define RETRO_SIMD_AES (1 << 15)
1602 #define RETRO_SIMD_VFPV3 (1 << 16)
1603 #define RETRO_SIMD_VFPV4 (1 << 17)
1604 #define RETRO_SIMD_POPCNT (1 << 18)
1605 #define RETRO_SIMD_MOVBE (1 << 19)
1606 #define RETRO_SIMD_CMOV (1 << 20)
1607 #define RETRO_SIMD_ASIMD (1 << 21)
1608 
1611 
1613 {
1614  const char *ident;
1618 
1620 };
1621 
1622 /* Returns current time in microseconds.
1623  * Tries to use the most accurate timer available.
1624  */
1626 
1627 /* A simple counter. Usually nanoseconds, but can also be CPU cycles.
1628  * Can be used directly if desired (when creating a more sophisticated
1629  * performance counter system).
1630  * */
1632 
1633 /* Returns a bit-mask of detected CPU features (RETRO_SIMD_*). */
1635 
1636 /* Asks frontend to log and/or display the state of performance counters.
1637  * Performance counters can always be poked into manually as well.
1638  */
1640 
1641 /* Register a performance counter.
1642  * ident field must be set with a discrete value and other values in
1643  * retro_perf_counter must be 0.
1644  * Registering can be called multiple times. To avoid calling to
1645  * frontend redundantly, you can check registered field first. */
1647 
1648 /* Starts a registered counter. */
1650 
1651 /* Stops a registered counter. */
1653 
1654 /* For convenience it can be useful to wrap register, start and stop in macros.
1655  * E.g.:
1656  * #ifdef LOG_PERFORMANCE
1657  * #define RETRO_PERFORMANCE_INIT(perf_cb, name) static struct retro_perf_counter name = {#name}; if (!name.registered) perf_cb.perf_register(&(name))
1658  * #define RETRO_PERFORMANCE_START(perf_cb, name) perf_cb.perf_start(&(name))
1659  * #define RETRO_PERFORMANCE_STOP(perf_cb, name) perf_cb.perf_stop(&(name))
1660  * #else
1661  * ... Blank macros ...
1662  * #endif
1663  *
1664  * These can then be used mid-functions around code snippets.
1665  *
1666  * extern struct retro_perf_callback perf_cb; * Somewhere in the core.
1667  *
1668  * void do_some_heavy_work(void)
1669  * {
1670  * RETRO_PERFORMANCE_INIT(cb, work_1;
1671  * RETRO_PERFORMANCE_START(cb, work_1);
1672  * heavy_work_1();
1673  * RETRO_PERFORMANCE_STOP(cb, work_1);
1674  *
1675  * RETRO_PERFORMANCE_INIT(cb, work_2);
1676  * RETRO_PERFORMANCE_START(cb, work_2);
1677  * heavy_work_2();
1678  * RETRO_PERFORMANCE_STOP(cb, work_2);
1679  * }
1680  *
1681  * void retro_deinit(void)
1682  * {
1683  * perf_cb.perf_log(); * Log all perf counters here for example.
1684  * }
1685  */
1686 
1688 {
1691 
1697 };
1698 
1699 /* FIXME: Document the sensor API and work out behavior.
1700  * It will be marked as experimental until then.
1701  */
1703 {
1706 
1708 };
1709 
1710 /* Id values for SENSOR types. */
1711 #define RETRO_SENSOR_ACCELEROMETER_X 0
1712 #define RETRO_SENSOR_ACCELEROMETER_Y 1
1713 #define RETRO_SENSOR_ACCELEROMETER_Z 2
1714 
1716  enum retro_sensor_action action, unsigned rate);
1717 
1718 typedef float (RETRO_CALLCONV *retro_sensor_get_input_t)(unsigned port, unsigned id);
1719 
1721 {
1724 };
1725 
1727 {
1730 
1732 };
1733 
1734 /* Starts the camera driver. Can only be called in retro_run(). */
1736 
1737 /* Stops the camera driver. Can only be called in retro_run(). */
1739 
1740 /* Callback which signals when the camera driver is initialized
1741  * and/or deinitialized.
1742  * retro_camera_start_t can be called in initialized callback.
1743  */
1745 
1746 /* A callback for raw framebuffer data. buffer points to an XRGB8888 buffer.
1747  * Width, height and pitch are similar to retro_video_refresh_t.
1748  * First pixel is top-left origin.
1749  */
1751  unsigned width, unsigned height, size_t pitch);
1752 
1753 /* A callback for when OpenGL textures are used.
1754  *
1755  * texture_id is a texture owned by camera driver.
1756  * Its state or content should be considered immutable, except for things like
1757  * texture filtering and clamping.
1758  *
1759  * texture_target is the texture target for the GL texture.
1760  * These can include e.g. GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE, and possibly
1761  * more depending on extensions.
1762  *
1763  * affine points to a packed 3x3 column-major matrix used to apply an affine
1764  * transform to texture coordinates. (affine_matrix * vec3(coord_x, coord_y, 1.0))
1765  * After transform, normalized texture coord (0, 0) should be bottom-left
1766  * and (1, 1) should be top-right (or (width, height) for RECTANGLE).
1767  *
1768  * GL-specific typedefs are avoided here to avoid relying on gl.h in
1769  * the API definition.
1770  */
1772  unsigned texture_target, const float *affine);
1773 
1775 {
1776  /* Set by libretro core.
1777  * Example bitmask: caps = (1 << RETRO_CAMERA_BUFFER_OPENGL_TEXTURE) | (1 << RETRO_CAMERA_BUFFER_RAW_FRAMEBUFFER).
1778  */
1780 
1781  /* Desired resolution for camera. Is only used as a hint. */
1782  unsigned width;
1783  unsigned height;
1784 
1785  /* Set by frontend. */
1788 
1789  /* Set by libretro core if raw framebuffer callbacks will be used. */
1791 
1792  /* Set by libretro core if OpenGL texture callbacks will be used. */
1794 
1795  /* Set by libretro core. Called after camera driver is initialized and
1796  * ready to be started.
1797  * Can be NULL, in which this callback is not called.
1798  */
1800 
1801  /* Set by libretro core. Called right before camera driver is
1802  * deinitialized.
1803  * Can be NULL, in which this callback is not called.
1804  */
1806 };
1807 
1808 /* Sets the interval of time and/or distance at which to update/poll
1809  * location-based data.
1810  *
1811  * To ensure compatibility with all location-based implementations,
1812  * values for both interval_ms and interval_distance should be provided.
1813  *
1814  * interval_ms is the interval expressed in milliseconds.
1815  * interval_distance is the distance interval expressed in meters.
1816  */
1817 typedef void (RETRO_CALLCONV *retro_location_set_interval_t)(unsigned interval_ms,
1818  unsigned interval_distance);
1819 
1820 /* Start location services. The device will start listening for changes to the
1821  * current location at regular intervals (which are defined with
1822  * retro_location_set_interval_t). */
1824 
1825 /* Stop location services. The device will stop listening for changes
1826  * to the current location. */
1828 
1829 /* Get the position of the current location. Will set parameters to
1830  * 0 if no new location update has happened since the last time. */
1831 typedef bool (RETRO_CALLCONV *retro_location_get_position_t)(double *lat, double *lon,
1832  double *horiz_accuracy, double *vert_accuracy);
1833 
1834 /* Callback which signals when the location driver is initialized
1835  * and/or deinitialized.
1836  * retro_location_start_t can be called in initialized callback.
1837  */
1839 
1841 {
1846 
1849 };
1850 
1852 {
1855 
1857 };
1858 
1859 /* Sets rumble state for joypad plugged in port 'port'.
1860  * Rumble effects are controlled independently,
1861  * and setting e.g. strong rumble does not override weak rumble.
1862  * Strength has a range of [0, 0xffff].
1863  *
1864  * Returns true if rumble state request was honored.
1865  * Calling this before first retro_run() is likely to return false. */
1867  enum retro_rumble_effect effect, uint16_t strength);
1868 
1870 {
1872 };
1873 
1874 /* Notifies libretro that audio data should be written. */
1876 
1877 /* True: Audio driver in frontend is active, and callback is
1878  * expected to be called regularily.
1879  * False: Audio driver in frontend is paused or inactive.
1880  * Audio callback will not be called until set_state has been
1881  * called with true.
1882  * Initial state is false (inactive).
1883  */
1885 
1887 {
1890 };
1891 
1892 /* Notifies a libretro core of time spent since last invocation
1893  * of retro_run() in microseconds.
1894  *
1895  * It will be called right before retro_run() every frame.
1896  * The frontend can tamper with timing to support cases like
1897  * fast-forward, slow-motion and framestepping.
1898  *
1899  * In those scenarios the reference frame time value will be used. */
1903 {
1905  /* Represents the time of one frame. It is computed as
1906  * 1000000 / fps, but the implementation will resolve the
1907  * rounding to ensure that framestepping, etc is exact. */
1909 };
1910 
1911 /* Pass this to retro_video_refresh_t if rendering to hardware.
1912  * Passing NULL to retro_video_refresh_t is still a frame dupe as normal.
1913  * */
1914 #define RETRO_HW_FRAME_BUFFER_VALID ((void*)-1)
1915 
1916 /* Invalidates the current HW context.
1917  * Any GL state is lost, and must not be deinitialized explicitly.
1918  * If explicit deinitialization is desired by the libretro core,
1919  * it should implement context_destroy callback.
1920  * If called, all GPU resources must be reinitialized.
1921  * Usually called when frontend reinits video driver.
1922  * Also called first time video driver is initialized,
1923  * allowing libretro core to initialize resources.
1924  */
1926 
1927 /* Gets current framebuffer which is to be rendered to.
1928  * Could change every frame potentially.
1929  */
1931 
1932 /* Get a symbol from HW context. */
1934 
1936 {
1938  /* OpenGL 2.x. Driver can choose to use latest compatibility context. */
1940  /* OpenGL ES 2.0. */
1942  /* Modern desktop core GL context. Use version_major/
1943  * version_minor fields to set GL version. */
1945  /* OpenGL ES 3.0 */
1947  /* OpenGL ES 3.1+. Set version_major/version_minor. For GLES2 and GLES3,
1948  * use the corresponding enums directly. */
1950 
1951  /* Vulkan, see RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE. */
1953 
1954  /* Direct3D, set version_major to select the type of interface
1955  * returned by RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE */
1957 
1959 };
1960 
1962 {
1963  /* Which API to use. Set by libretro core. */
1965 
1966  /* Called when a context has been created or when it has been reset.
1967  * An OpenGL context is only valid after context_reset() has been called.
1968  *
1969  * When context_reset is called, OpenGL resources in the libretro
1970  * implementation are guaranteed to be invalid.
1971  *
1972  * It is possible that context_reset is called multiple times during an
1973  * application lifecycle.
1974  * If context_reset is called without any notification (context_destroy),
1975  * the OpenGL context was lost and resources should just be recreated
1976  * without any attempt to "free" old resources.
1977  */
1979 
1980  /* Set by frontend.
1981  * TODO: This is rather obsolete. The frontend should not
1982  * be providing preallocated framebuffers. */
1984 
1985  /* Set by frontend.
1986  * Can return all relevant functions, including glClear on Windows. */
1988 
1989  /* Set if render buffers should have depth component attached.
1990  * TODO: Obsolete. */
1991  bool depth;
1992 
1993  /* Set if stencil buffers should be attached.
1994  * TODO: Obsolete. */
1995  bool stencil;
1996 
1997  /* If depth and stencil are true, a packed 24/8 buffer will be added.
1998  * Only attaching stencil is invalid and will be ignored. */
1999 
2000  /* Use conventional bottom-left origin convention. If false,
2001  * standard libretro top-left origin semantics are used.
2002  * TODO: Move to GL specific interface. */
2004 
2005  /* Major version number for core GL context or GLES 3.1+. */
2006  unsigned version_major;
2007 
2008  /* Minor version number for core GL context or GLES 3.1+. */
2009  unsigned version_minor;
2010 
2011  /* If this is true, the frontend will go very far to avoid
2012  * resetting context in scenarios like toggling fullscreen, etc.
2013  * TODO: Obsolete? Maybe frontend should just always assume this ...
2014  */
2016 
2017  /* The reset callback might still be called in extreme situations
2018  * such as if the context is lost beyond recovery.
2019  *
2020  * For optimal stability, set this to false, and allow context to be
2021  * reset at any time.
2022  */
2023 
2024  /* A callback to be called before the context is destroyed in a
2025  * controlled way by the frontend. */
2027 
2028  /* OpenGL resources can be deinitialized cleanly at this step.
2029  * context_destroy can be set to NULL, in which resources will
2030  * just be destroyed without any notification.
2031  *
2032  * Even when context_destroy is non-NULL, it is possible that
2033  * context_reset is called without any destroy notification.
2034  * This happens if context is lost by external factors (such as
2035  * notified by GL_ARB_robustness).
2036  *
2037  * In this case, the context is assumed to be already dead,
2038  * and the libretro implementation must not try to free any OpenGL
2039  * resources in the subsequent context_reset.
2040  */
2041 
2042  /* Creates a debug context. */
2044 };
2045 
2046 /* Callback type passed in RETRO_ENVIRONMENT_SET_KEYBOARD_CALLBACK.
2047  * Called by the frontend in response to keyboard events.
2048  * down is set if the key is being pressed, or false if it is being released.
2049  * keycode is the RETROK value of the char.
2050  * character is the text character of the pressed key. (UTF-32).
2051  * key_modifiers is a set of RETROKMOD values or'ed together.
2052  *
2053  * The pressed/keycode state can be indepedent of the character.
2054  * It is also possible that multiple characters are generated from a
2055  * single keypress.
2056  * Keycode events should be treated separately from character events.
2057  * However, when possible, the frontend should try to synchronize these.
2058  * If only a character is posted, keycode should be RETROK_UNKNOWN.
2059  *
2060  * Similarily if only a keycode event is generated with no corresponding
2061  * character, character should be 0.
2062  */
2063 typedef void (RETRO_CALLCONV *retro_keyboard_event_t)(bool down, unsigned keycode,
2064  uint32_t character, uint16_t key_modifiers);
2065 
2067 {
2069 };
2070 
2071 /* Callbacks for RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE.
2072  * Should be set for implementations which can swap out multiple disk
2073  * images in runtime.
2074  *
2075  * If the implementation can do this automatically, it should strive to do so.
2076  * However, there are cases where the user must manually do so.
2077  *
2078  * Overview: To swap a disk image, eject the disk image with
2079  * set_eject_state(true).
2080  * Set the disk index with set_image_index(index). Insert the disk again
2081  * with set_eject_state(false).
2082  */
2083 
2084 /* If ejected is true, "ejects" the virtual disk tray.
2085  * When ejected, the disk image index can be set.
2086  */
2088 
2089 /* Gets current eject state. The initial state is 'not ejected'. */
2091 
2092 /* Gets current disk index. First disk is index 0.
2093  * If return value is >= get_num_images(), no disk is currently inserted.
2094  */
2096 
2097 /* Sets image index. Can only be called when disk is ejected.
2098  * The implementation supports setting "no disk" by using an
2099  * index >= get_num_images().
2100  */
2102 
2103 /* Gets total number of images which are available to use. */
2105 
2106 struct retro_game_info;
2107 
2108 /* Replaces the disk image associated with index.
2109  * Arguments to pass in info have same requirements as retro_load_game().
2110  * Virtual disk tray must be ejected when calling this.
2111  *
2112  * Replacing a disk image with info = NULL will remove the disk image
2113  * from the internal list.
2114  * As a result, calls to get_image_index() can change.
2115  *
2116  * E.g. replace_image_index(1, NULL), and previous get_image_index()
2117  * returned 4 before.
2118  * Index 1 will be removed, and the new index is 3.
2119  */
2120 typedef bool (RETRO_CALLCONV *retro_replace_image_index_t)(unsigned index,
2121  const struct retro_game_info *info);
2122 
2123 /* Adds a new valid index (get_num_images()) to the internal disk list.
2124  * This will increment subsequent return values from get_num_images() by 1.
2125  * This image index cannot be used until a disk image has been set
2126  * with replace_image_index. */
2128 
2130 {
2133 
2137 
2138  retro_replace_image_index_t replace_image_index;
2140 };
2141 
2143 {
2144  /* 0RGB1555, native endian.
2145  * 0 bit must be set to 0.
2146  * This pixel format is default for compatibility concerns only.
2147  * If a 15/16-bit pixel format is desired, consider using RGB565. */
2149 
2150  /* XRGB8888, native endian.
2151  * X bits are ignored. */
2153 
2154  /* RGB565, native endian.
2155  * This pixel format is the recommended format to use if a 15/16-bit
2156  * format is desired as it is the pixel format that is typically
2157  * available on a wide range of low-power devices.
2158  *
2159  * It is also natively supported in APIs like OpenGL ES. */
2161 
2162  /* Ensure sizeof() == sizeof(int). */
2164 };
2165 
2167 {
2168  const char *msg; /* Message to be displayed. */
2169  unsigned frames; /* Duration in frames of message. */
2170 };
2171 
2172 /* Describes how the libretro implementation maps a libretro input bind
2173  * to its internal input system through a human readable string.
2174  * This string can be used to better let a user configure input. */
2176 {
2177  /* Associates given parameters with a description. */
2178  unsigned port;
2179  unsigned device;
2180  unsigned index;
2181  unsigned id;
2182 
2183  /* Human readable description for parameters.
2184  * The pointer must remain valid until
2185  * retro_unload_game() is called. */
2186  const char *description;
2187 };
2188 
2190 {
2191  /* All pointers are owned by libretro implementation, and pointers must
2192  * remain valid until retro_deinit() is called. */
2193 
2194  const char *library_name; /* Descriptive name of library. Should not
2195  * contain any version numbers, etc. */
2196  const char *library_version; /* Descriptive version of core. */
2197 
2198  const char *valid_extensions; /* A string listing probably content
2199  * extensions the core will be able to
2200  * load, separated with pipe.
2201  * I.e. "bin|rom|iso".
2202  * Typically used for a GUI to filter
2203  * out extensions. */
2204 
2205  /* Libretro cores that need to have direct access to their content
2206  * files, including cores which use the path of the content files to
2207  * determine the paths of other files, should set need_fullpath to true.
2208  *
2209  * Cores should strive for setting need_fullpath to false,
2210  * as it allows the frontend to perform patching, etc.
2211  *
2212  * If need_fullpath is true and retro_load_game() is called:
2213  * - retro_game_info::path is guaranteed to have a valid path
2214  * - retro_game_info::data and retro_game_info::size are invalid
2215  *
2216  * If need_fullpath is false and retro_load_game() is called:
2217  * - retro_game_info::path may be NULL
2218  * - retro_game_info::data and retro_game_info::size are guaranteed
2219  * to be valid
2220  *
2221  * See also:
2222  * - RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY
2223  * - RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY
2224  */
2226 
2227  /* If true, the frontend is not allowed to extract any archives before
2228  * loading the real content.
2229  * Necessary for certain libretro implementations that load games
2230  * from zipped archives. */
2232 };
2233 
2235 {
2236  unsigned base_width; /* Nominal video width of game. */
2237  unsigned base_height; /* Nominal video height of game. */
2238  unsigned max_width; /* Maximum possible width of game. */
2239  unsigned max_height; /* Maximum possible height of game. */
2240 
2241  float aspect_ratio; /* Nominal aspect ratio of game. If
2242  * aspect_ratio is <= 0.0, an aspect ratio
2243  * of base_width / base_height is assumed.
2244  * A frontend could override this setting,
2245  * if desired. */
2246 };
2247 
2249 {
2250  double fps; /* FPS of video content. */
2251  double sample_rate; /* Sampling rate of audio. */
2252 };
2253 
2255 {
2258 };
2259 
2261 {
2262  /* Variable to query in RETRO_ENVIRONMENT_GET_VARIABLE.
2263  * If NULL, obtains the complete environment string if more
2264  * complex parsing is necessary.
2265  * The environment string is formatted as key-value pairs
2266  * delimited by semicolons as so:
2267  * "key1=value1;key2=value2;..."
2268  */
2269  const char *key;
2270 
2271  /* Value to be obtained. If key does not exist, it is set to NULL. */
2272  const char *value;
2273 };
2274 
2276 {
2277  const char *path; /* Path to game, UTF-8 encoded.
2278  * Sometimes used as a reference for building other paths.
2279  * May be NULL if game was loaded from stdin or similar,
2280  * but in this case some cores will be unable to load `data`.
2281  * So, it is preferable to fabricate something here instead
2282  * of passing NULL, which will help more cores to succeed.
2283  * retro_system_info::need_fullpath requires
2284  * that this path is valid. */
2285  const void *data; /* Memory buffer of loaded game. Will be NULL
2286  * if need_fullpath was set. */
2287  size_t size; /* Size of memory buffer. */
2288  const char *meta; /* String of implementation specific meta-data. */
2289 };
2290 
2291 #define RETRO_MEMORY_ACCESS_WRITE (1 << 0)
2292  /* The core will write to the buffer provided by retro_framebuffer::data. */
2293 #define RETRO_MEMORY_ACCESS_READ (1 << 1)
2294  /* The core will read from retro_framebuffer::data. */
2295 #define RETRO_MEMORY_TYPE_CACHED (1 << 0)
2296  /* The memory in data is cached.
2297  * If not cached, random writes and/or reading from the buffer is expected to be very slow. */
2299 {
2300  void *data; /* The framebuffer which the core can render into.
2301  Set by frontend in GET_CURRENT_SOFTWARE_FRAMEBUFFER.
2302  The initial contents of data are unspecified. */
2303  unsigned width; /* The framebuffer width used by the core. Set by core. */
2304  unsigned height; /* The framebuffer height used by the core. Set by core. */
2305  size_t pitch; /* The number of bytes between the beginning of a scanline,
2306  and beginning of the next scanline.
2307  Set by frontend in GET_CURRENT_SOFTWARE_FRAMEBUFFER. */
2308  enum retro_pixel_format format; /* The pixel format the core must use to render into data.
2309  This format could differ from the format used in
2310  SET_PIXEL_FORMAT.
2311  Set by frontend in GET_CURRENT_SOFTWARE_FRAMEBUFFER. */
2312 
2313  unsigned access_flags; /* How the core will access the memory in the framebuffer.
2314  RETRO_MEMORY_ACCESS_* flags.
2315  Set by core. */
2316  unsigned memory_flags; /* Flags telling core how the memory has been mapped.
2317  RETRO_MEMORY_TYPE_* flags.
2318  Set by frontend in GET_CURRENT_SOFTWARE_FRAMEBUFFER. */
2319 };
2320 
2321 /* Callbacks */
2322 
2323 /* Environment callback. Gives implementations a way of performing
2324  * uncommon tasks. Extensible. */
2325 typedef bool (RETRO_CALLCONV *retro_environment_t)(unsigned cmd, void *data);
2326 
2327 /* Render a frame. Pixel format is 15-bit 0RGB1555 native endian
2328  * unless changed (see RETRO_ENVIRONMENT_SET_PIXEL_FORMAT).
2329  *
2330  * Width and height specify dimensions of buffer.
2331  * Pitch specifices length in bytes between two lines in buffer.
2332  *
2333  * For performance reasons, it is highly recommended to have a frame
2334  * that is packed in memory, i.e. pitch == width * byte_per_pixel.
2335  * Certain graphic APIs, such as OpenGL ES, do not like textures
2336  * that are not packed in memory.
2337  */
2338 typedef void (RETRO_CALLCONV *retro_video_refresh_t)(const void *data, unsigned width,
2339  unsigned height, size_t pitch);
2340 
2341 /* Renders a single audio frame. Should only be used if implementation
2342  * generates a single sample at a time.
2343  * Format is signed 16-bit native endian.
2344  */
2346 
2347 /* Renders multiple audio frames in one go.
2348  *
2349  * One frame is defined as a sample of left and right channels, interleaved.
2350  * I.e. int16_t buf[4] = { l, r, l, r }; would be 2 frames.
2351  * Only one of the audio callbacks must ever be used.
2352  */
2354  size_t frames);
2355 
2356 /* Polls input. */
2358 
2359 /* Queries for input for player 'port'. device will be masked with
2360  * RETRO_DEVICE_MASK.
2361  *
2362  * Specialization of devices such as RETRO_DEVICE_JOYPAD_MULTITAP that
2363  * have been set with retro_set_controller_port_device()
2364  * will still use the higher level RETRO_DEVICE_JOYPAD to request input.
2365  */
2366 typedef int16_t (RETRO_CALLCONV *retro_input_state_t)(unsigned port, unsigned device,
2367  unsigned index, unsigned id);
2368 
2369 /* Sets callbacks. retro_set_environment() is guaranteed to be called
2370  * before retro_init().
2371  *
2372  * The rest of the set_* functions are guaranteed to have been called
2373  * before the first call to retro_run() is made. */
2380 
2381 /* Library global initialization/deinitialization. */
2382 RETRO_API void retro_init(void);
2383 RETRO_API void retro_deinit(void);
2384 
2385 /* Must return RETRO_API_VERSION. Used to validate ABI compatibility
2386  * when the API is revised. */
2387 RETRO_API unsigned retro_api_version(void);
2388 
2389 /* Gets statically known system info. Pointers provided in *info
2390  * must be statically allocated.
2391  * Can be called at any time, even before retro_init(). */
2393 
2394 /* Gets information about system audio/video timings and geometry.
2395  * Can be called only after retro_load_game() has successfully completed.
2396  * NOTE: The implementation of this function might not initialize every
2397  * variable if needed.
2398  * E.g. geom.aspect_ratio might not be initialized if core doesn't
2399  * desire a particular aspect ratio. */
2401 
2402 /* Sets device to be used for player 'port'.
2403  * By default, RETRO_DEVICE_JOYPAD is assumed to be plugged into all
2404  * available ports.
2405  * Setting a particular device type is not a guarantee that libretro cores
2406  * will only poll input based on that particular device type. It is only a
2407  * hint to the libretro core when a core cannot automatically detect the
2408  * appropriate input device type on its own. It is also relevant when a
2409  * core can change its behavior depending on device type.
2410  *
2411  * As part of the core's implementation of retro_set_controller_port_device,
2412  * the core should call RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS to notify the
2413  * frontend if the descriptions for any controls have changed as a
2414  * result of changing the device type.
2415  */
2416 RETRO_API void retro_set_controller_port_device(unsigned port, unsigned device);
2417 
2418 /* Resets the current game. */
2419 RETRO_API void retro_reset(void);
2420 
2421 /* Runs the game for one video frame.
2422  * During retro_run(), input_poll callback must be called at least once.
2423  *
2424  * If a frame is not rendered for reasons where a game "dropped" a frame,
2425  * this still counts as a frame, and retro_run() should explicitly dupe
2426  * a frame if GET_CAN_DUPE returns true.
2427  * In this case, the video callback can take a NULL argument for data.
2428  */
2429 RETRO_API void retro_run(void);
2430 
2431 /* Returns the amount of data the implementation requires to serialize
2432  * internal state (save states).
2433  * Between calls to retro_load_game() and retro_unload_game(), the
2434  * returned size is never allowed to be larger than a previous returned
2435  * value, to ensure that the frontend can allocate a save state buffer once.
2436  */
2437 RETRO_API size_t retro_serialize_size(void);
2438 
2439 /* Serializes internal state. If failed, or size is lower than
2440  * retro_serialize_size(), it should return false, true otherwise. */
2441 RETRO_API bool retro_serialize(void *data, size_t size);
2442 RETRO_API bool retro_unserialize(const void *data, size_t size);
2443 
2444 RETRO_API void retro_cheat_reset(void);
2445 RETRO_API void retro_cheat_set(unsigned index, bool enabled, const char *code);
2446 
2447 /* Loads a game.
2448  * Return true to indicate successful loading and false to indicate load failure.
2449  */
2450 RETRO_API bool retro_load_game(const struct retro_game_info *game);
2451 
2452 /* Loads a "special" kind of game. Should not be used,
2453  * except in extreme cases. */
2455  unsigned game_type,
2456  const struct retro_game_info *info, size_t num_info
2457 );
2458 
2459 /* Unloads the currently loaded game. Called before retro_deinit(void). */
2460 RETRO_API void retro_unload_game(void);
2461 
2462 /* Gets region of game. */
2463 RETRO_API unsigned retro_get_region(void);
2464 
2465 /* Gets region of memory. */
2466 RETRO_API void *retro_get_memory_data(unsigned id);
2467 RETRO_API size_t retro_get_memory_size(unsigned id);
2468 
2469 #ifdef __cplusplus
2470 }
2471 #endif
2472 
2473 #endif
Definition: libretro.h:339
retro_midi_read_t read
Definition: libretro.h:1252
retro_time_t(RETRO_CALLCONV * retro_perf_get_time_usec_t)(void)
Definition: libretro.h:1625
const char * key
Definition: libretro.h:2269
Definition: libretro.h:440
Definition: libretro.h:409
Definition: libretro.h:441
RETRO_API bool retro_unserialize(const void *data, size_t size)
Definition: ffmpeg_core.c:1693
float aspect_ratio
Definition: libretro.h:2241
size_t size
Definition: libretro.h:2287
void * data
Definition: libretro.h:2300
Definition: libretro.h:317
uint64_t flags
Definition: libretro.h:1308
RETRO_API bool retro_load_game_special(unsigned game_type, const struct retro_game_info *info, size_t num_info)
Definition: ffmpeg_core.c:1673
RETRO_API size_t retro_serialize_size(void)
Definition: ffmpeg_core.c:1681
retro_hw_context_type
Definition: libretro.h:1935
retro_vfs_get_path_t get_path
Definition: libretro.h:1175
RETRO_API void retro_set_input_poll(retro_input_poll_t)
Definition: ffmpeg_core.c:307
Definition: libretro.h:1567
Definition: libretro.h:1729
Definition: libretro.h:1209
retro_perf_tick_t call_cnt
Definition: libretro.h:1617
RETRO_API bool retro_serialize(void *data, size_t size)
Definition: ffmpeg_core.c:1686
retro_set_image_index_t set_image_index
Definition: libretro.h:2135
Definition: libretro.h:439
const char * ident
Definition: libretro.h:1614
Definition: libretro.h:376
_W64 unsigned int uintptr_t
Definition: stdint.h:165
Definition: libretro.h:2189
Definition: libretro.h:1222
void(RETRO_CALLCONV * retro_camera_stop_t)(void)
Definition: libretro.h:1738
RETRO_API void retro_reset(void)
Definition: ffmpeg_core.c:322
Definition: libretro.h:414
Definition: libretro.h:366
GLenum mode
Definition: glext.h:6857
Definition: libretro.h:338
Definition: libretro.h:1208
bool(RETRO_CALLCONV * retro_set_rumble_state_t)(unsigned port, enum retro_rumble_effect effect, uint16_t strength)
Definition: libretro.h:1866
retro_language
Definition: libretro.h:257
Definition: libretro.h:470
Definition: libretro.h:329
Definition: libretro.h:310
Definition: libretro.h:1205
Definition: libretro.h:273
RETRO_API void retro_unload_game(void)
Definition: ffmpeg_core.c:1465
GLuint buffer
Definition: glext.h:6555
Definition: libretro.h:337
Definition: libretro.h:343
Definition: libretro.h:335
bool debug_context
Definition: libretro.h:2043
bool(RETRO_CALLCONV * retro_get_eject_state_t)(void)
Definition: libretro.h:2090
Definition: libretro.h:350
Definition: libretro.h:1853
size_t(RETRO_CALLCONV * retro_audio_sample_batch_t)(const int16_t *data, size_t frames)
Definition: libretro.h:2353
Definition: libretro.h:1941
Definition: libretro.h:351
retro_add_image_index_t add_image_index
Definition: libretro.h:2139
int64_t(RETRO_CALLCONV * retro_vfs_read_t)(struct retro_vfs_file_handle *stream, void *s, uint64_t len)
Definition: libretro.h:1154
Definition: libretro.h:328
RETRO_API bool retro_load_game(const struct retro_game_info *game)
Definition: ffmpeg_core.c:1557
Definition: libretro.h:267
bool(RETRO_CALLCONV * retro_set_image_index_t)(unsigned index)
Definition: libretro.h:2101
Definition: libretro.h:372
retro_perf_log_t perf_log
Definition: libretro.h:1696
Definition: libretro.h:269
retro_sensor_action
Definition: libretro.h:1702
Definition: libretro.h:314
Definition: libretro.h:280
bool bottom_left_origin
Definition: libretro.h:2003
Definition: libretro.h:2275
void(RETRO_CALLCONV * retro_location_lifetime_status_t)(void)
Definition: libretro.h:1838
Definition: libretro.h:1458
retro_location_start_t start
Definition: libretro.h:1842
Definition: libretro.h:362
void(RETRO_CALLCONV * retro_location_set_interval_t)(unsigned interval_ms, unsigned interval_distance)
Definition: libretro.h:1817
GLsizei const GLchar ** path
Definition: glext.h:7901
unsigned interface_version
Definition: libretro.h:1268
unsigned index
Definition: libretro.h:2180
retro_get_proc_address_t get_proc_address
Definition: libretro.h:1561
bool block_extract
Definition: libretro.h:1502
bool(RETRO_CALLCONV * retro_midi_output_enabled_t)(void)
Definition: libretro.h:1233
void(RETRO_CALLCONV * retro_audio_callback_t)(void)
Definition: libretro.h:1875
retro_hw_context_reset_t context_destroy
Definition: libretro.h:2026
retro_perf_get_counter_t get_perf_counter
Definition: libretro.h:1692
Definition: libretro.h:386
unsigned max_width
Definition: libretro.h:2238
GLenum GLsizei len
Definition: glext.h:7389
Definition: libretro.h:397
Definition: libretro.h:1704
Definition: libretro.h:450
size_t len
Definition: libretro.h:1349
RETRO_API void retro_set_controller_port_device(unsigned port, unsigned device)
Definition: ffmpeg_core.c:232
retro_vfs_size_t size
Definition: libretro.h:1178
unsigned num_memory
Definition: libretro.h:1511
bool(RETRO_CALLCONV * retro_set_sensor_state_t)(unsigned port, enum retro_sensor_action action, unsigned rate)
Definition: libretro.h:1715
bool(RETRO_CALLCONV * retro_midi_write_t)(uint8_t byte, uint32_t delta_time)
Definition: libretro.h:1242
GLsizeiptr size
Definition: glext.h:6559
Definition: libretro.h:438
Definition: libretro.h:465
bool depth
Definition: libretro.h:1991
Definition: libretro.h:320
Definition: libretro.h:468
const char * value
Definition: libretro.h:2272
retro_vfs_rename_t rename
Definition: libretro.h:1185
Definition: libretro.h:1952
Definition: libretro.h:354
Definition: libretro.h:1707
GLenum GLuint id
Definition: glext.h:6233
includes all by default used to find thumbnails Please choose a single playlist first Add Entry Add Folder Select Files< multiple > Please fill out all required fields RetroArch updated successfully Please restart the application for the changes to take effect Contributors Move Down Load Remove Add Pass No shader passes Reset All Passes Download thumbnail Start on Download All Thumbnails This Playlist Configured in port
Definition: msg_hash_us.h:7699
int(RETRO_CALLCONV * retro_vfs_remove_t)(const char *path)
Definition: libretro.h:1166
retro_audio_callback_t callback
Definition: libretro.h:1888
RETRO_API void retro_run(void)
Definition: ffmpeg_core.c:430
Definition: libretro.h:410
Definition: libretro.h:326
Definition: libretro.h:353
unsigned id
Definition: libretro.h:1538
bool(RETRO_CALLCONV * retro_environment_t)(unsigned cmd, void *data)
Definition: libretro.h:2325
Definition: libretro.h:420
static float delta_time
Definition: menu_animation.c:68
float(RETRO_CALLCONV * retro_sensor_get_input_t)(unsigned port, unsigned id)
Definition: libretro.h:1718
void(RETRO_CALLCONV * retro_location_stop_t)(void)
Definition: libretro.h:1827
Definition: libretro.h:404
Definition: libretro.h:2152
Definition: libretro.h:1949
GLdouble s
Definition: glext.h:6390
bool registered
Definition: libretro.h:1619
Definition: libretro.h:2129
Definition: libretro.h:276
Definition: libretro.h:1172
void(RETRO_CALLCONV * retro_video_refresh_t)(const void *data, unsigned width, unsigned height, size_t pitch)
Definition: libretro.h:2338
const struct retro_game_info * info
Definition: libretro.h:2121
retro_perf_tick_t total
Definition: libretro.h:1616
Definition: libretro.h:368
unsigned char byte
Definition: jsonsax_full.c:47
retro_set_eject_state_t set_eject_state
Definition: libretro.h:2131
Definition: libretro.h:1559
RETRO_API unsigned retro_get_region(void)
Definition: ffmpeg_core.c:1668
Definition: libretro.h:365
enum retro_hw_render_interface_type interface_type
Definition: libretro.h:1217
Definition: libretro.h:1902
int64_t retro_time_t
Definition: libretro.h:1610
retro_replace_image_index_t replace_image_index
Definition: libretro.h:2138
Definition: libretro.h:473
const char * valid_extensions
Definition: libretro.h:1496
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
struct retro_system_timing timing
Definition: libretro.h:2257
struct retro_vfs_file_handle *RETRO_CALLCONV * retro_vfs_open_t(const char *path, unsigned mode, unsigned hints)
Definition: libretro.h:1129
Definition: libretro.h:336
int(RETRO_CALLCONV * retro_vfs_flush_t)(struct retro_vfs_file_handle *stream)
Definition: libretro.h:1162
Definition: libretro.h:322
retro_camera_start_t start
Definition: libretro.h:1786
retro_sensor_get_input_t get_sensor_input
Definition: libretro.h:1723
const char * extension
Definition: libretro.h:1482
const struct retro_controller_description * types
Definition: libretro.h:1475
bool block_extract
Definition: libretro.h:2231
retro_get_num_images_t get_num_images
Definition: libretro.h:2136
RETRO_API void retro_get_system_info(struct retro_system_info *info)
Definition: ffmpeg_core.c:238
Definition: ibxm.h:9
Definition: libretro.h:271
Definition: libretro.h:1566
Definition: libretro.h:2160
Definition: libretro.h:474
GLdouble GLdouble right
Definition: glext.h:11766
const char * description
Definition: libretro.h:2186
size_t select
Definition: libretro.h:1336
unsigned access_flags
Definition: libretro.h:2313
Definition: libretro.h:352
Definition: libretro.h:346
void * ptr
Definition: libretro.h:1323
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
Definition: libretro.h:1856
Definition: libretro.h:373
typedef bool(RETRO_CALLCONV *retro_replace_image_index_t)(unsigned index
retro_hw_render_interface_type
Definition: libretro.h:1203
Definition: libretro.h:323
Definition: libretro.h:456
retro_get_cpu_features_t get_cpu_features
Definition: libretro.h:1690
retro_pixel_format
Definition: libretro.h:2142
Definition: libretro.h:380
Definition: libretro.h:451
retro_set_rumble_state_t set_rumble_state
Definition: libretro.h:1871
Definition: libretro.h:356
retro_keyboard_event_t callback
Definition: libretro.h:2068
Definition: libretro.h:2248
void(RETRO_CALLCONV * retro_proc_address_t)(void)
Definition: libretro.h:1541
retro_set_led_state_t set_led_state
Definition: libretro.h:1224
Definition: libretro.h:261
Definition: libretro.h:428
Definition: libretro.h:394
Definition: libretro.h:1206
Definition: libretro.h:1774
size_t offset
Definition: libretro.h:1324
Definition: libretro.h:311
Definition: libretro.h:341
Definition: libretro.h:2175
Definition: libretro.h:1215
const char * library_version
Definition: libretro.h:2196
Definition: libretro.h:408
retro_vfs_remove_t remove
Definition: libretro.h:1184
Definition: libretro.h:344
Definition: libretro.h:2066
unsigned memory_flags
Definition: libretro.h:2316
Definition: libretro.h:277
Definition: libretro.h:378
retro_hw_context_reset_t context_reset
Definition: libretro.h:1978
Definition: libretro.h:370
void(RETRO_CALLCONV * retro_audio_sample_t)(int16_t left, int16_t right)
Definition: libretro.h:2345
Definition: libretro.h:454
RETRO_API void retro_set_audio_sample(retro_audio_sample_t)
Definition: ffmpeg_core.c:297
Definition: libretro.h:259
retro_log_level
Definition: libretro.h:1564
Definition: libretro.h:411
Definition: libretro.h:1886
Definition: libretro.h:358
const char * library_name
Definition: libretro.h:2194
Definition: libretro.h:1571
unsigned(RETRO_CALLCONV * retro_get_num_images_t)(void)
Definition: libretro.h:2104
retro_midi_write_t write
Definition: libretro.h:1253
const char * addrspace
Definition: libretro.h:1380
unsigned width
Definition: libretro.h:2303
retro_location_get_position_t get_position
Definition: libretro.h:1844
Definition: libretro.h:421
RETRO_API size_t retro_get_memory_size(unsigned id)
Definition: ffmpeg_core.c:1706
Definition: libretro.h:426
ubyte cmd
Definition: wiiuse_internal.h:319
retro_camera_frame_opengl_texture_t frame_opengl_texture
Definition: libretro.h:1793
RETRO_API void retro_set_input_state(retro_input_state_t)
Definition: ffmpeg_core.c:312
Definition: libretro.h:403
Definition: libretro.h:1479
retro_mod
Definition: libretro.h:463
const void * data
Definition: libretro.h:2285
Definition: libretro.h:1958
GLuint counter
Definition: glext.h:12023
Definition: libretro.h:445
Definition: libretro.h:333
bool need_fullpath
Definition: libretro.h:1499
void(RETRO_CALLCONV * retro_perf_stop_t)(struct retro_perf_counter *counter)
Definition: libretro.h:1652
void(RETRO_CALLCONV * retro_set_led_state_t)(int led, int state)
Definition: libretro.h:1221
Definition: libretro.h:2260
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:8417
Definition: libretro.h:1452
Definition: libretro.h:371
Definition: libretro.h:476
bool(RETRO_CALLCONV * retro_camera_start_t)(void)
Definition: libretro.h:1735
Definition: libretro.h:367
Definition: libretro.h:262
const char * desc
Definition: libretro.h:1463
bool need_fullpath
Definition: libretro.h:2225
RETRO_API unsigned retro_api_version(void)
Definition: ffmpeg_core.c:227
Definition: libretro.h:2148
Definition: libretro.h:2234
retro_hw_get_proc_address_t get_proc_address
Definition: libretro.h:1987
uint64_t(RETRO_CALLCONV * retro_get_cpu_features_t)(void)
Definition: libretro.h:1634
Definition: libretro.h:1248
Definition: libretro.h:422
const char * ident
Definition: libretro.h:1524
Definition: libretro.h:318
void(RETRO_CALLCONV * retro_keyboard_event_t)(bool down, unsigned keycode, uint32_t character, uint16_t key_modifiers)
Definition: libretro.h:2063
Definition: libretro.h:1946
enum retro_hw_render_context_negotiation_interface_type interface_type
Definition: libretro.h:1267
Definition: libretro.h:327
retro_vfs_close_t close
Definition: libretro.h:1177
unsigned base_height
Definition: libretro.h:2237
void(RETRO_CALLCONV * retro_frame_time_callback_t)(retro_usec_t usec)
Definition: libretro.h:1901
Definition: libretro.h:1937
Definition: libretro.h:1939
Definition: libretro.h:2166
Definition: libretro.h:1190
GLint level
Definition: glext.h:6293
bool(RETRO_CALLCONV * retro_add_image_index_t)(void)
Definition: libretro.h:2127
RETRO_API void retro_set_video_refresh(retro_video_refresh_t)
Definition: ffmpeg_core.c:317
unsigned device
Definition: libretro.h:2179
Definition: libretro.h:435
void(RETRO_CALLCONV * retro_perf_start_t)(struct retro_perf_counter *counter)
Definition: libretro.h:1649
Definition: libretro.h:325
signed short int16_t
Definition: stdint.h:122
const char * meta
Definition: libretro.h:2288
Definition: libretro.h:393
int64_t(RETRO_CALLCONV * retro_vfs_seek_t)(struct retro_vfs_file_handle *stream, int64_t offset, int seek_position)
Definition: libretro.h:1150
uint64_t caps
Definition: libretro.h:1779
retro_proc_address_t(RETRO_CALLCONV * retro_get_proc_address_t)(const char *sym)
Definition: libretro.h:1557
retro_vfs_tell_t tell
Definition: libretro.h:1179
Definition: libretro.h:382
size_t start
Definition: libretro.h:1328
Definition: libretro.h:334
Definition: libretro.h:321
const struct retro_subsystem_memory_info * memory
Definition: libretro.h:1510
Definition: libretro.h:1612
retro_midi_flush_t flush
Definition: libretro.h:1254
retro_location_stop_t stop
Definition: libretro.h:1843
#define RETRO_CALLCONV
Definition: libretro.h:52
Definition: libretro.h:434
Definition: libretro.h:452
retro_hw_render_context_negotiation_interface_type
Definition: libretro.h:1257
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
retro_key
Definition: libretro.h:308
unsigned height
Definition: libretro.h:1783
retro_set_sensor_state_t set_sensor_state
Definition: libretro.h:1722
Definition: libretro.h:407
int64_t(RETRO_CALLCONV * retro_vfs_tell_t)(struct retro_vfs_file_handle *stream)
Definition: libretro.h:1146
Definition: libretro.h:1514
bool stencil
Definition: libretro.h:1995
uint64_t retro_perf_tick_t
Definition: libretro.h:1609
Definition: libretro.h:268
retro_camera_lifetime_status_t initialized
Definition: libretro.h:1799
retro_frame_time_callback_t callback
Definition: libretro.h:1904
static struct frame frames[2]
Definition: ffmpeg_core.c:162
Definition: libretro.h:349
Definition: libretro.h:406
unsigned type
Definition: libretro.h:1487
Definition: libretro.h:453
Definition: libretro.h:2298
Definition: libretro.h:449
size_t disconnect
Definition: libretro.h:1340
RETRO_API void retro_set_environment(retro_environment_t)
Definition: ffmpeg_core.c:272
Definition: libretro.h:1473
Definition: libretro.h:443
Definition: libretro.h:399
Definition: libretro.h:392
Definition: libretro.h:324
RETRO_API void retro_cheat_set(unsigned index, bool enabled, const char *code)
Definition: ffmpeg_core.c:1715
bool(RETRO_CALLCONV * retro_midi_flush_t)(void)
Definition: libretro.h:1246
Definition: libretro.h:2254
retro_camera_lifetime_status_t deinitialized
Definition: libretro.h:1805
Definition: libretro.h:1306
Definition: libretro.h:361
Definition: inftrees.h:27
unsigned height
Definition: libretro.h:2304
retro_rumble_effect
Definition: libretro.h:1851
retro_vfs_seek_t seek
Definition: libretro.h:1180
Definition: libretro.h:436
int64_t(RETRO_CALLCONV * retro_vfs_size_t)(struct retro_vfs_file_handle *stream)
Definition: libretro.h:1138
Definition: libretro.h:1210
retro_log_printf_t log
Definition: libretro.h:1580
void(RETRO_CALLCONV * retro_log_printf_t)(enum retro_log_level level, const char *fmt,...)
Definition: libretro.h:1575
unsigned(RETRO_CALLCONV * retro_get_image_index_t)(void)
Definition: libretro.h:2095
int64_t(RETRO_CALLCONV * retro_vfs_write_t)(struct retro_vfs_file_handle *stream, const void *s, uint64_t len)
Definition: libretro.h:1158
void(RETRO_CALLCONV * retro_camera_frame_raw_framebuffer_t)(const uint32_t *buffer, unsigned width, unsigned height, size_t pitch)
Definition: libretro.h:1750
double sample_rate
Definition: libretro.h:2251
bool(RETRO_CALLCONV * retro_location_get_position_t)(double *lat, double *lon, double *horiz_accuracy, double *vert_accuracy)
Definition: libretro.h:1831
unsigned max_height
Definition: libretro.h:2239
Definition: libretro.h:1869
bool required
Definition: libretro.h:1506
Definition: libretro.h:357
Definition: libretro.h:458
retro_vfs_flush_t flush
Definition: libretro.h:1183
Definition: libretro.h:1944
Definition: libretro.h:469
retro_camera_frame_raw_framebuffer_t frame_raw_framebuffer
Definition: libretro.h:1790
void(RETRO_CALLCONV * retro_perf_register_t)(struct retro_perf_counter *counter)
Definition: libretro.h:1646
Definition: libretro.h:472
uint32_t required_interface_version
Definition: libretro.h:1195
Definition: libretro.h:272
Definition: libretro.h:433
Definition: libretro.h:319
unsigned base_width
Definition: libretro.h:2236
retro_vfs_truncate_t truncate
Definition: libretro.h:1187
unsigned version_minor
Definition: libretro.h:2009
Definition: libretro.h:1720
Definition: libretro.h:402
Definition: libretro.h:332
unsigned num_types
Definition: libretro.h:1476
Definition: libretro.h:315
Definition: libretro.h:395
GLuint index
Definition: glext.h:6671
Definition: libretro.h:274
bool(RETRO_CALLCONV * retro_location_start_t)(void)
Definition: libretro.h:1823
Definition: libretro.h:429
unsigned frames
Definition: libretro.h:2169
Definition: libretro.h:1728
unsigned port
Definition: libretro.h:2178
Definition: libretro.h:1854
Definition: libretro.h:330
uintptr_t(RETRO_CALLCONV * retro_hw_get_current_framebuffer_t)(void)
Definition: libretro.h:1930
Definition: libretro.h:1578
const struct retro_memory_descriptor * descriptors
Definition: libretro.h:1454
retro_perf_stop_t perf_stop
Definition: libretro.h:1695
Definition: libretro.h:412
unsigned version_major
Definition: libretro.h:2006
Definition: libretro.h:416
RETRO_API void retro_deinit(void)
Definition: ffmpeg_core.c:224
Definition: libretro.h:379
retro_camera_stop_t stop
Definition: libretro.h:1787
Definition: libretro.h:1956
Definition: libretro.h:1490
Definition: libretro.h:418
retro_perf_tick_t start
Definition: libretro.h:1615
Definition: libretro.h:355
Definition: libretro.h:363
Definition: libretro.h:263
Definition: libretro.h:369
Definition: libretro.h:377
Definition: libretro.h:375
Definition: libretro.h:430
Definition: libretro.h:383
Definition: libretro.h:448
Definition: libretro.h:398
Definition: libretro.h:390
GLuint GLuint stream
Definition: glext.h:8189
void(RETRO_CALLCONV * retro_perf_log_t)(void)
Definition: libretro.h:1639
retro_perf_tick_t(RETRO_CALLCONV * retro_perf_get_counter_t)(void)
Definition: libretro.h:1631
Definition: libretro.h:266
int(RETRO_CALLCONV * retro_vfs_rename_t)(const char *old_path, const char *new_path)
Definition: libretro.h:1170
const char * path
Definition: libretro.h:2277
Definition: libretro.h:260
Definition: libretro.h:316
void(RETRO_CALLCONV * retro_audio_set_state_callback_t)(bool enabled)
Definition: libretro.h:1884
retro_perf_start_t perf_start
Definition: libretro.h:1694
retro_location_lifetime_status_t initialized
Definition: libretro.h:1847
Definition: libretro.h:413
const char * desc
Definition: libretro.h:1493
Definition: libretro.h:391
Definition: libretro.h:270
GLint GLint GLsizei width
Definition: glext.h:6293
Definition: libretro.h:437
Definition: libretro.h:388
retro_perf_get_time_usec_t get_time_usec
Definition: libretro.h:1689
Definition: libretro.h:384
Definition: libretro.h:1840
retro_vfs_read_t read
Definition: libretro.h:1181
retro_get_image_index_t get_image_index
Definition: libretro.h:2134
const struct retro_subsystem_rom_info * roms
Definition: libretro.h:1532
enum retro_hw_context_type context_type
Definition: libretro.h:1964
enum retro_pixel_format format
Definition: libretro.h:2308
Definition: libretro.h:424
signed __int64 int64_t
Definition: stdint.h:135
Definition: libretro.h:1687
Definition: libretro.h:442
Definition: libretro.h:423
RETRO_API void retro_get_system_av_info(struct retro_system_av_info *info)
Definition: ffmpeg_core.c:247
Definition: libretro.h:264
const char * msg
Definition: libretro.h:2168
void(RETRO_CALLCONV * retro_camera_lifetime_status_t)(void)
Definition: libretro.h:1744
Definition: libretro.h:2163
unsigned width
Definition: libretro.h:1782
Definition: libretro.h:389
bool cache_context
Definition: libretro.h:2015
Definition: libretro.h:455
retro_hw_get_current_framebuffer_t get_current_framebuffer
Definition: libretro.h:1983
retro_location_lifetime_status_t deinitialized
Definition: libretro.h:1848
RETRO_API void retro_init(void)
Definition: ffmpeg_core.c:212
RETRO_API void retro_set_audio_sample_batch(retro_audio_sample_batch_t)
Definition: ffmpeg_core.c:302
Definition: libretro.h:364
Definition: libretro.h:342
Definition: libretro.h:446
Definition: libretro.h:340
Definition: libretro.h:401
Definition: libretro.h:345
Definition: libretro.h:275
unsigned id
Definition: libretro.h:2181
retro_proc_address_t(RETRO_CALLCONV * retro_hw_get_proc_address_t)(const char *sym)
Definition: libretro.h:1933
size_t pitch
Definition: libretro.h:2305
#define RETRO_API
Definition: libretro.h:75
Definition: libretro.h:1569
Definition: libretro.h:385
Definition: libretro.h:1705
retro_midi_output_enabled_t output_enabled
Definition: libretro.h:1251
retro_vfs_write_t write
Definition: libretro.h:1182
retro_camera_buffer
Definition: libretro.h:1726
Definition: libretro.h:265
Definition: libretro.h:427
const char * desc
Definition: libretro.h:1517
Definition: libretro.h:1207
Definition: libretro.h:312
Definition: libretro.h:359
RETRO_API void retro_cheat_reset(void)
Definition: ffmpeg_core.c:1712
unsigned interface_version
Definition: libretro.h:1218
retro_midi_input_enabled_t input_enabled
Definition: libretro.h:1250
double fps
Definition: libretro.h:2250
retro_usec_t reference
Definition: libretro.h:1908
bool(RETRO_CALLCONV * retro_midi_input_enabled_t)(void)
Definition: libretro.h:1229
GLintptr offset
Definition: glext.h:6560
GLint left
Definition: glext.h:8393
Definition: libretro.h:444
void(RETRO_CALLCONV * retro_input_poll_t)(void)
Definition: libretro.h:2357
retro_get_eject_state_t get_eject_state
Definition: libretro.h:2132
int(RETRO_CALLCONV * retro_vfs_close_t)(struct retro_vfs_file_handle *stream)
Definition: libretro.h:1134
Definition: libretro.h:360
bool(RETRO_CALLCONV * retro_midi_read_t)(uint8_t *byte)
Definition: libretro.h:1237
struct retro_game_geometry geometry
Definition: libretro.h:2256
Definition: libretro.h:432
unsigned short uint16_t
Definition: stdint.h:125
void(RETRO_CALLCONV * retro_hw_context_reset_t)(void)
Definition: libretro.h:1925
Definition: libretro.h:400
Definition: libretro.h:467
struct nk_device device
Definition: nk_common.c:44
bool down
Definition: connect_wiiupro.c:51
unsigned __int64 uint64_t
Definition: stdint.h:136
RETRO_API void * retro_get_memory_data(unsigned id)
Definition: ffmpeg_core.c:1700
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233
unsigned num_descriptors
Definition: libretro.h:1455
Definition: libretro.h:381
unsigned char uint8_t
Definition: stdint.h:124
void(RETRO_CALLCONV * retro_camera_frame_opengl_texture_t)(unsigned texture_id, unsigned texture_target, const float *affine)
Definition: libretro.h:1771
Definition: libretro.h:419
unsigned int uint32_t
Definition: stdint.h:126
Definition: libretro.h:331
Definition: libretro.h:425
retro_location_set_interval_t set_interval
Definition: libretro.h:1845
const char * valid_extensions
Definition: libretro.h:2198
unsigned id
Definition: libretro.h:1470
Definition: libretro.h:1568
Definition: libretro.h:1731
Definition: libretro.h:396
Definition: libretro.h:347
Definition: libretro.h:348
int64_t(RETRO_CALLCONV * retro_vfs_truncate_t)(struct retro_vfs_file_handle *stream, int64_t length)
Definition: libretro.h:1142
Definition: libretro.h:1961
Definition: libretro.h:417
Definition: libretro.h:374
retro_vfs_open_t open
Definition: libretro.h:1176
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
Definition: libretro.h:460
retro_audio_set_state_callback_t set_state
Definition: libretro.h:1889
const char *(RETRO_CALLCONV * retro_vfs_get_path_t)(struct retro_vfs_file_handle *stream)
Definition: libretro.h:1124
retro_perf_register_t perf_register
Definition: libretro.h:1693
int16_t(RETRO_CALLCONV * retro_input_state_t)(unsigned port, unsigned device, unsigned index, unsigned id)
Definition: libretro.h:2366
bool(RETRO_CALLCONV * retro_set_eject_state_t)(bool ejected)
Definition: libretro.h:2087
unsigned num_roms
Definition: libretro.h:1535
int64_t retro_usec_t
Definition: libretro.h:1900
struct retro_vfs_interface * iface
Definition: libretro.h:1200
Definition: libretro.h:313