RetroArch
Functions | Variables
switch_nx_gfx.c File Reference
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <retro_inline.h>
#include <retro_math.h>
#include <formats/image.h>
#include <gfx/scaler/scaler.h>
#include <gfx/scaler/pixconv.h>
#include <gfx/video_frame.h>
#include <switch.h>
#include "../font_driver.h"
#include "../../configuration.h"
#include "../../command.h"
#include "../../driver.h"
#include "../../retroarch.h"
#include "../../verbosity.h"
#include "../common/switch_common.h"
#include "../../tasks/tasks_internal.h"
Include dependency graph for switch_nx_gfx.c:

Functions

static int pdep (uint32_t mask, uint32_t value)
 
static uint32_t swizzle_x (uint32_t v)
 
static uint32_t swizzle_y (uint32_t v)
 
void gfx_slow_swizzling_blit (uint32_t *buffer, uint32_t *image, int w, int h, int tx, int ty, bool blend)
 
static void clear_screen (switch_video_t *sw)
 
static voidswitch_init (const video_info_t *video, const input_driver_t **input, void **input_data)
 
static void switch_update_viewport (switch_video_t *sw, video_frame_info_t *video_info)
 
static void switch_set_aspect_ratio (void *data, unsigned aspect_ratio_idx)
 
static bool switch_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 switch_set_nonblock_state (void *data, bool toggle)
 
static bool switch_alive (void *data)
 
static bool switch_focus (void *data)
 
static bool switch_suppress_screensaver (void *data, bool enable)
 
static bool switch_has_windowed (void *data)
 
static void switch_free (void *data)
 
static bool switch_set_shader (void *data, enum rarch_shader_type type, const char *path)
 
static void switch_set_rotation (void *data, unsigned rotation)
 
static void switch_viewport_info (void *data, struct video_viewport *vp)
 
static bool switch_read_viewport (void *data, uint8_t *buffer, bool is_idle)
 
static void switch_set_texture_frame (void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha)
 
static void switch_apply_state_changes (void *data)
 
static void switch_set_texture_enable (void *data, bool enable, bool full_screen)
 
static void switch_set_osd_msg (void *data, video_frame_info_t *video_info, const char *msg, const void *params, void *font)
 
static void switch_get_poke_interface (void *data, const video_poke_interface_t **iface)
 

Variables

static const video_poke_interface_t switch_poke_interface
 
video_driver_t video_switch
 

Function Documentation

◆ clear_screen()

static void clear_screen ( switch_video_t sw)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfx_slow_swizzling_blit()

void gfx_slow_swizzling_blit ( uint32_t buffer,
uint32_t image,
int  w,
int  h,
int  tx,
int  ty,
bool  blend 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pdep()

static int pdep ( uint32_t  mask,
uint32_t  value 
)
static
Here is the caller graph for this function:

◆ switch_alive()

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

◆ switch_apply_state_changes()

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

◆ switch_focus()

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

◆ switch_frame()

static bool switch_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:

◆ switch_free()

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

◆ switch_get_poke_interface()

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

◆ switch_has_windowed()

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

◆ switch_init()

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

◆ switch_read_viewport()

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

◆ switch_set_aspect_ratio()

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

◆ switch_set_nonblock_state()

static void switch_set_nonblock_state ( void data,
bool  toggle 
)
static

◆ switch_set_osd_msg()

static void switch_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:

◆ switch_set_rotation()

static void switch_set_rotation ( void data,
unsigned  rotation 
)
static

◆ switch_set_shader()

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

◆ switch_set_texture_enable()

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

◆ switch_set_texture_frame()

static void switch_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:

◆ switch_suppress_screensaver()

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

◆ switch_update_viewport()

static void switch_update_viewport ( switch_video_t sw,
video_frame_info_t video_info 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ switch_viewport_info()

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

◆ swizzle_x()

static uint32_t swizzle_x ( uint32_t  v)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ swizzle_y()

static uint32_t swizzle_y ( uint32_t  v)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ switch_poke_interface

const video_poke_interface_t switch_poke_interface
static
Initial value:
= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static void switch_set_osd_msg(void *data, video_frame_info_t *video_info, const char *msg, const void *params, void *font)
Definition: switch_nx_gfx.c:649
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void switch_apply_state_changes(void *data)
Definition: switch_nx_gfx.c:628
static void switch_set_texture_enable(void *data, bool enable, bool full_screen)
Definition: switch_nx_gfx.c:633
static void switch_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
Definition: switch_nx_gfx.c:298
static void switch_set_texture_frame(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha)
Definition: switch_nx_gfx.c:567

◆ video_switch

video_driver_t video_switch
Initial value:
= {
"switch",
NULL,
NULL,
}
static bool switch_has_windowed(void *data)
Definition: switch_nx_gfx.c:514
static bool switch_set_shader(void *data, enum rarch_shader_type type, const char *path)
Definition: switch_nx_gfx.c:535
static bool switch_suppress_screensaver(void *data, bool enable)
Definition: switch_nx_gfx.c:507
static void switch_set_nonblock_state(void *data, bool toggle)
Definition: switch_nx_gfx.c:489
static void switch_free(void *data)
Definition: switch_nx_gfx.c:520
static void switch_set_rotation(void *data, unsigned rotation)
Definition: switch_nx_gfx.c:545
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool switch_read_viewport(void *data, uint8_t *buffer, bool is_idle)
Definition: switch_nx_gfx.c:559
static bool switch_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: switch_nx_gfx.c:344
static void switch_get_poke_interface(void *data, const video_poke_interface_t **iface)
Definition: switch_nx_gfx.c:764
static void * switch_init(const video_info_t *video, const input_driver_t **input, void **input_data)
Definition: switch_nx_gfx.c:147
static void switch_viewport_info(void *data, struct video_viewport *vp)
Definition: switch_nx_gfx.c:553
static bool switch_focus(void *data)
Definition: switch_nx_gfx.c:501
static bool switch_alive(void *data)
Definition: switch_nx_gfx.c:495