mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
Add comments
This commit is contained in:
parent
eacac11abd
commit
bdaf00032e
@ -42,7 +42,16 @@ RETRO_BEGIN_DECLS
|
|||||||
|
|
||||||
typedef struct video_info
|
typedef struct video_info
|
||||||
{
|
{
|
||||||
|
/* Width of window.
|
||||||
|
* If fullscreen mode is requested,
|
||||||
|
* a width of 0 means the resolution of the
|
||||||
|
* desktop should be used. */
|
||||||
unsigned width;
|
unsigned width;
|
||||||
|
|
||||||
|
/* Height of window.
|
||||||
|
* If fullscreen mode is requested,
|
||||||
|
* a height of 0 means the resolutiof the desktop should be used.
|
||||||
|
*/
|
||||||
unsigned height;
|
unsigned height;
|
||||||
|
|
||||||
/* Launch in fullscreen mode instead of windowed mode. */
|
/* Launch in fullscreen mode instead of windowed mode. */
|
||||||
@ -51,6 +60,8 @@ typedef struct video_info
|
|||||||
/* Start with V-Sync enabled. */
|
/* Start with V-Sync enabled. */
|
||||||
bool vsync;
|
bool vsync;
|
||||||
|
|
||||||
|
/* If true, the output image should have the aspect ratio
|
||||||
|
* as set in aspect_ratio. */
|
||||||
bool force_aspect;
|
bool force_aspect;
|
||||||
|
|
||||||
unsigned swap_interval;
|
unsigned swap_interval;
|
||||||
@ -73,10 +84,25 @@ typedef struct video_info
|
|||||||
* otherwise nearest filtering. */
|
* otherwise nearest filtering. */
|
||||||
bool smooth;
|
bool smooth;
|
||||||
|
|
||||||
/* Maximum input size: RARCH_SCALE_BASE * input_scale */
|
/*
|
||||||
|
* input_scale defines the maximum size of the picture that will
|
||||||
|
* ever be used with the frame callback.
|
||||||
|
*
|
||||||
|
* The maximum resolution is a multiple of 256x256 size (RARCH_SCALE_BASE),
|
||||||
|
* so an input scale of 2 means you should allocate a texture or of 512x512.
|
||||||
|
*
|
||||||
|
* Maximum input size: RARCH_SCALE_BASE * input_scale
|
||||||
|
*/
|
||||||
unsigned input_scale;
|
unsigned input_scale;
|
||||||
|
|
||||||
/* Use 32bit RGBA rather than native RGB565/XBGR1555. */
|
/* Use 32bit RGBA rather than native RGB565/XBGR1555.
|
||||||
|
*
|
||||||
|
* XRGB1555 format is 16-bit and has byte ordering: 0RRRRRGGGGGBBBBB,
|
||||||
|
* in native endian.
|
||||||
|
*
|
||||||
|
* ARGB8888 is AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB, native endian.
|
||||||
|
* Alpha channel should be disregarded.
|
||||||
|
* */
|
||||||
bool rgb32;
|
bool rgb32;
|
||||||
|
|
||||||
#ifndef RARCH_INTERNAL
|
#ifndef RARCH_INTERNAL
|
||||||
@ -208,9 +234,22 @@ typedef struct video_driver
|
|||||||
const input_driver_t **input,
|
const input_driver_t **input,
|
||||||
void **input_data);
|
void **input_data);
|
||||||
|
|
||||||
|
/* Updates frame on the screen.
|
||||||
|
* Frame can be either XRGB1555, RGB565 or ARGB32 format
|
||||||
|
* depending on rgb32 setting in video_info_t.
|
||||||
|
* Pitch is the distance in bytes between two scanlines in memory.
|
||||||
|
*
|
||||||
|
* When msg is non-NULL,
|
||||||
|
* it's a message that should be displayed to the user. */
|
||||||
video_driver_frame_t frame;
|
video_driver_frame_t frame;
|
||||||
|
|
||||||
/* Should we care about syncing to vblank? Fast forwarding. */
|
/* Should we care about syncing to vblank? Fast forwarding.
|
||||||
|
*
|
||||||
|
* Requests nonblocking operation.
|
||||||
|
*
|
||||||
|
* True = VSync is turned off.
|
||||||
|
* False = VSync is turned on.
|
||||||
|
* */
|
||||||
void (*set_nonblock_state)(void *data, bool toggle);
|
void (*set_nonblock_state)(void *data, bool toggle);
|
||||||
|
|
||||||
/* Is the window still active? */
|
/* Is the window still active? */
|
||||||
|
@ -55,11 +55,20 @@ struct retro_keybind
|
|||||||
enum msg_hash_enums enum_idx;
|
enum msg_hash_enums enum_idx;
|
||||||
enum retro_key key;
|
enum retro_key key;
|
||||||
|
|
||||||
|
/* Joypad key. Joypad POV (hats)
|
||||||
|
* are embedded into this key as well. */
|
||||||
uint64_t joykey;
|
uint64_t joykey;
|
||||||
/* Default key binding value - for resetting bind to default */
|
|
||||||
|
/* Default key binding value -
|
||||||
|
* for resetting bind to default */
|
||||||
uint64_t def_joykey;
|
uint64_t def_joykey;
|
||||||
|
|
||||||
|
/* Joypad axis. Negative and positive axes
|
||||||
|
* are embedded into this variable. */
|
||||||
uint32_t joyaxis;
|
uint32_t joyaxis;
|
||||||
|
|
||||||
|
/* Default joy axis binding value -
|
||||||
|
* for resetting bind to default */
|
||||||
uint32_t def_joyaxis;
|
uint32_t def_joyaxis;
|
||||||
|
|
||||||
/* Used by input_{push,pop}_analog_dpad(). */
|
/* Used by input_{push,pop}_analog_dpad(). */
|
||||||
@ -71,14 +80,28 @@ struct retro_keybind
|
|||||||
|
|
||||||
typedef struct input_driver
|
typedef struct input_driver
|
||||||
{
|
{
|
||||||
|
/* Inits input driver.
|
||||||
|
*/
|
||||||
void *(*init)(const char *joypad_driver);
|
void *(*init)(const char *joypad_driver);
|
||||||
|
|
||||||
|
/* Polls input. Called once every frame. */
|
||||||
void (*poll)(void *data);
|
void (*poll)(void *data);
|
||||||
|
|
||||||
|
/* Queries input state for a certain key on a certain player.
|
||||||
|
* Players are 1 - MAX_USERS.
|
||||||
|
* For digital inputs, pressed key is 1, not pressed key is 0.
|
||||||
|
* Analog values have same range as a signed 16-bit integer.
|
||||||
|
*/
|
||||||
int16_t (*input_state)(void *data,
|
int16_t (*input_state)(void *data,
|
||||||
rarch_joypad_info_t joypad_info,
|
rarch_joypad_info_t joypad_info,
|
||||||
const struct retro_keybind **retro_keybinds,
|
const struct retro_keybind **retro_keybinds,
|
||||||
unsigned port, unsigned device, unsigned index, unsigned id);
|
unsigned port, unsigned device, unsigned index, unsigned id);
|
||||||
|
|
||||||
bool (*meta_key_pressed)(void *data, int key);
|
bool (*meta_key_pressed)(void *data, int key);
|
||||||
|
|
||||||
|
/* Frees the input struct. */
|
||||||
void (*free)(void *data);
|
void (*free)(void *data);
|
||||||
|
|
||||||
bool (*set_sensor_state)(void *data, unsigned port,
|
bool (*set_sensor_state)(void *data, unsigned port,
|
||||||
enum retro_sensor_action action, unsigned rate);
|
enum retro_sensor_action action, unsigned rate);
|
||||||
float (*get_sensor_input)(void *data, unsigned port, unsigned id);
|
float (*get_sensor_input)(void *data, unsigned port, unsigned id);
|
||||||
|
Loading…
Reference in New Issue
Block a user