RetroArch
Classes | Typedefs | Functions | Variables
sdl2_gfx.c File Reference
#include <stdlib.h>
#include <string.h>
#include <retro_inline.h>
#include <gfx/scaler/scaler.h>
#include "SDL.h"
#include "SDL_syswm.h"
#include "../font_driver.h"
#include "../../configuration.h"
#include "../../retroarch.h"
#include "../../verbosity.h"
Include dependency graph for sdl2_gfx.c:

Classes

struct  sdl2_tex
 
struct  _sdl2_video
 

Typedefs

typedef struct sdl2_tex sdl2_tex_t
 
typedef struct _sdl2_video sdl2_video_t
 

Functions

static void sdl2_gfx_free (void *data)
 
static INLINE void sdl_tex_zero (sdl2_tex_t *t)
 
static void sdl2_init_font (sdl2_video_t *vid, const char *font_path, unsigned font_size)
 
static void sdl2_render_msg (sdl2_video_t *vid, const char *msg)
 
static void sdl2_gfx_set_handles (sdl2_video_t *vid)
 
static void sdl2_init_renderer (sdl2_video_t *vid)
 
static void sdl_refresh_renderer (sdl2_video_t *vid)
 
static void sdl_refresh_viewport (sdl2_video_t *vid)
 
static void sdl_refresh_input_size (sdl2_video_t *vid, bool menu, bool rgb32, unsigned width, unsigned height, unsigned pitch)
 
static voidsdl2_gfx_init (const video_info_t *video, const input_driver_t **input, void **input_data)
 
static void check_window (sdl2_video_t *vid)
 
static bool sdl2_gfx_frame (void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info)
 
static void sdl2_gfx_set_nonblock_state (void *data, bool toggle)
 
static bool sdl2_gfx_alive (void *data)
 
static bool sdl2_gfx_focus (void *data)
 
static bool sdl2_gfx_suppress_screensaver (void *data, bool enable)
 
static bool sdl2_gfx_has_windowed (void *data)
 
static void sdl2_gfx_set_rotation (void *data, unsigned rotation)
 
static void sdl2_gfx_viewport_info (void *data, struct video_viewport *vp)
 
static bool sdl2_gfx_read_viewport (void *data, uint8_t *buffer, bool is_idle)
 
static void sdl2_poke_set_filtering (void *data, unsigned index, bool smooth)
 
static void sdl2_poke_set_aspect_ratio (void *data, unsigned aspect_ratio_idx)
 
static void sdl2_poke_apply_state_changes (void *data)
 
static void sdl2_poke_set_texture_frame (void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha)
 
static void sdl2_poke_texture_enable (void *data, bool enable, bool full_screen)
 
static void sdl2_poke_set_osd_msg (void *data, video_frame_info_t *video_info, const char *msg, const void *params, void *font)
 
static void sdl2_show_mouse (void *data, bool state)
 
static void sdl2_grab_mouse_toggle (void *data)
 
static void sdl2_gfx_poke_interface (void *data, const video_poke_interface_t **iface)
 
static bool sdl2_gfx_set_shader (void *data, enum rarch_shader_type type, const char *path)
 

Variables

static video_poke_interface_t sdl2_video_poke_interface
 
video_driver_t video_sdl2
 

Typedef Documentation

◆ sdl2_tex_t

typedef struct sdl2_tex sdl2_tex_t

◆ sdl2_video_t

typedef struct _sdl2_video sdl2_video_t

Function Documentation

◆ check_window()

static void check_window ( sdl2_video_t vid)
static
Here is the caller graph for this function:

◆ sdl2_gfx_alive()

static bool sdl2_gfx_alive ( void data)
static
Here is the call graph for this function:

◆ sdl2_gfx_focus()

static bool sdl2_gfx_focus ( void data)
static

◆ sdl2_gfx_frame()

static bool sdl2_gfx_frame ( void data,
const void frame,
unsigned  width,
unsigned  height,
uint64_t  frame_count,
unsigned  pitch,
const char *  msg,
video_frame_info_t video_info 
)
static
Here is the call graph for this function:

◆ sdl2_gfx_free()

static void sdl2_gfx_free ( void data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl2_gfx_has_windowed()

static bool sdl2_gfx_has_windowed ( void data)
static
Here is the call graph for this function:

◆ sdl2_gfx_init()

static void* sdl2_gfx_init ( const video_info_t video,
const input_driver_t **  input,
void **  input_data 
)
static
Here is the call graph for this function:

◆ sdl2_gfx_poke_interface()

static void sdl2_gfx_poke_interface ( void data,
const video_poke_interface_t **  iface 
)
static
Here is the call graph for this function:

◆ sdl2_gfx_read_viewport()

static bool sdl2_gfx_read_viewport ( void data,
uint8_t buffer,
bool  is_idle 
)
static
Here is the call graph for this function:

◆ sdl2_gfx_set_handles()

static void sdl2_gfx_set_handles ( sdl2_video_t vid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl2_gfx_set_nonblock_state()

static void sdl2_gfx_set_nonblock_state ( void data,
bool  toggle 
)
static
Here is the call graph for this function:

◆ sdl2_gfx_set_rotation()

static void sdl2_gfx_set_rotation ( void data,
unsigned  rotation 
)
static

◆ sdl2_gfx_set_shader()

static bool sdl2_gfx_set_shader ( void data,
enum rarch_shader_type  type,
const char *  path 
)
static
Here is the call graph for this function:

◆ sdl2_gfx_suppress_screensaver()

static bool sdl2_gfx_suppress_screensaver ( void data,
bool  enable 
)
static
Here is the call graph for this function:

◆ sdl2_gfx_viewport_info()

static void sdl2_gfx_viewport_info ( void data,
struct video_viewport vp 
)
static

◆ sdl2_grab_mouse_toggle()

static void sdl2_grab_mouse_toggle ( void data)
static

◆ sdl2_init_font()

static void sdl2_init_font ( sdl2_video_t vid,
const char *  font_path,
unsigned  font_size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl2_init_renderer()

static void sdl2_init_renderer ( sdl2_video_t vid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl2_poke_apply_state_changes()

static void sdl2_poke_apply_state_changes ( void data)
static

◆ sdl2_poke_set_aspect_ratio()

static void sdl2_poke_set_aspect_ratio ( void data,
unsigned  aspect_ratio_idx 
)
static
Here is the call graph for this function:

◆ sdl2_poke_set_filtering()

static void sdl2_poke_set_filtering ( void data,
unsigned  index,
bool  smooth 
)
static
Here is the call graph for this function:

◆ sdl2_poke_set_osd_msg()

static void sdl2_poke_set_osd_msg ( void data,
video_frame_info_t video_info,
const char *  msg,
const void params,
void font 
)
static
Here is the call graph for this function:

◆ sdl2_poke_set_texture_frame()

static void sdl2_poke_set_texture_frame ( void data,
const void frame,
bool  rgb32,
unsigned  width,
unsigned  height,
float  alpha 
)
static
Here is the call graph for this function:

◆ sdl2_poke_texture_enable()

static void sdl2_poke_texture_enable ( void data,
bool  enable,
bool  full_screen 
)
static

◆ sdl2_render_msg()

static void sdl2_render_msg ( sdl2_video_t vid,
const char *  msg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl2_show_mouse()

static void sdl2_show_mouse ( void data,
bool  state 
)
static
Here is the call graph for this function:

◆ sdl_refresh_input_size()

static void sdl_refresh_input_size ( sdl2_video_t vid,
bool  menu,
bool  rgb32,
unsigned  width,
unsigned  height,
unsigned  pitch 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl_refresh_renderer()

static void sdl_refresh_renderer ( sdl2_video_t vid)
static
Here is the caller graph for this function:

◆ sdl_refresh_viewport()

static void sdl_refresh_viewport ( sdl2_video_t vid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl_tex_zero()

static INLINE void sdl_tex_zero ( sdl2_tex_t t)
static
Here is the caller graph for this function:

Variable Documentation

◆ sdl2_video_poke_interface

video_poke_interface_t sdl2_video_poke_interface
static
Initial value:
= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static void sdl2_poke_texture_enable(void *data, bool enable, bool full_screen)
Definition: sdl2_gfx.c:691
static void sdl2_poke_set_osd_msg(void *data, video_frame_info_t *video_info, const char *msg, const void *params, void *font)
Definition: sdl2_gfx.c:702
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void sdl2_grab_mouse_toggle(void *data)
Definition: sdl2_gfx.c:718
static void sdl2_poke_set_filtering(void *data, unsigned index, bool smooth)
Definition: sdl2_gfx.c:634
static void sdl2_poke_set_texture_frame(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha)
Definition: sdl2_gfx.c:676
static void sdl2_poke_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
Definition: sdl2_gfx.c:642
static void sdl2_show_mouse(void *data, bool state)
Definition: sdl2_gfx.c:712
static void sdl2_poke_apply_state_changes(void *data)
Definition: sdl2_gfx.c:670

◆ video_sdl2

video_driver_t video_sdl2
Initial value:
= {
"sdl2",
NULL,
}
static void sdl2_gfx_set_nonblock_state(void *data, bool toggle)
Definition: sdl2_gfx.c:531
static void * sdl2_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data)
Definition: sdl2_gfx.c:377
static bool sdl2_gfx_has_windowed(void *data)
Definition: sdl2_gfx.c:569
static void sdl2_gfx_free(void *data)
Definition: sdl2_gfx.c:578
static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle)
Definition: sdl2_gfx.c:612
static bool sdl2_gfx_alive(void *data)
Definition: sdl2_gfx.c:539
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void sdl2_gfx_set_rotation(void *data, unsigned rotation)
Definition: sdl2_gfx.c:598
static bool sdl2_gfx_focus(void *data)
Definition: sdl2_gfx.c:546
static void sdl2_gfx_poke_interface(void *data, const video_poke_interface_t **iface)
Definition: sdl2_gfx.c:750
static bool sdl2_gfx_set_shader(void *data, enum rarch_shader_type type, const char *path)
Definition: sdl2_gfx.c:756
static void sdl2_gfx_viewport_info(void *data, struct video_viewport *vp)
Definition: sdl2_gfx.c:606
static bool sdl2_gfx_suppress_screensaver(void *data, bool enable)
Definition: sdl2_gfx.c:553
static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info)
Definition: sdl2_gfx.c:490