RetroArch
switch_common.h
Go to the documentation of this file.
1 #ifndef SWITCH_COMMON_H__
2 #define SWITCH_COMMON_H__
3 
4 #include <switch.h>
5 #include <gfx/scaler/scaler.h>
6 
7 #ifdef HAVE_EGL
8 #include "../common/egl_common.h"
9 #endif
10 
11 typedef struct
12 {
13  bool vsync;
14  bool rgb32;
15  bool smooth; // bilinear
16  unsigned width, height;
17  unsigned rotation;
18  struct video_viewport vp;
21  bool in_menu;
22  struct
23  {
24  bool enable;
25  bool fullscreen;
26 
28 
31 
32  unsigned tgtw;
33  unsigned tgth;
34 
35  struct scaler_ctx scaler;
36  } menu_texture;
37 
38  struct
39  {
43  } hw_scale;
44 
45  uint32_t image[1280 * 720];
46  uint32_t tmp_image[1280 * 720];
48  struct scaler_ctx scaler;
53  bool need_clear;
55 
56  bool o_size;
60 
61 typedef struct
62 {
63 #ifdef HAVE_EGL
64  egl_ctx_data_t egl;
65 #endif
66 
67  struct
68  {
69  unsigned short width;
70  unsigned short height;
71  } native_window;
72  bool resize;
73  unsigned width, height;
74  float refresh_rate;
76 
77 void gfx_slow_swizzling_blit(uint32_t *buffer, uint32_t *image, int w, int h, int tx, int ty, bool blend);
78 
79 #endif
bool o_size
Definition: switch_common.h:56
bool in_menu
Definition: switch_common.h:21
bool vsync
Definition: switch_common.h:13
struct texture_image * overlay
Definition: switch_common.h:19
unsigned tgth
Definition: switch_common.h:33
bool enable
Definition: switch_common.h:24
Definition: switch_common.h:61
GLbyte ty
Definition: glext.h:9663
unsigned width
Definition: switch_common.h:16
bool rgb32
Definition: switch_common.h:14
Definition: scaler.h:62
unsigned rotation
Definition: switch_common.h:17
void gfx_slow_swizzling_blit(uint32_t *buffer, uint32_t *image, int w, int h, int tx, int ty, bool blend)
Definition: switch_nx_gfx.c:81
bool keep_aspect
Definition: switch_common.h:51
uint32_t width
Definition: switch_common.h:29
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glext.h:6305
uint32_t height
Definition: switch_common.h:30
bool is_threaded
Definition: switch_common.h:54
Definition: switch_common.h:11
unsigned short height
Definition: switch_common.h:70
float refresh_rate
Definition: switch_common.h:74
bool overlay_enabled
Definition: switch_common.h:20
Definition: video_driver.h:686
uint32_t x_offset
Definition: switch_common.h:42
uint32_t o_height
Definition: switch_common.h:57
GLint GLint GLsizei width
Definition: glext.h:6293
Definition: image.h:42
u32 cnt
Definition: switch_common.h:47
unsigned tgtw
Definition: switch_common.h:32
bool should_resize
Definition: switch_common.h:52
unsigned short width
Definition: switch_common.h:69
uint32_t last_height
Definition: switch_common.h:50
bool smooth
Definition: switch_common.h:15
bool need_clear
Definition: switch_common.h:53
Definition: egl_common.h:54
uint32_t * pixels
Definition: switch_common.h:27
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6742
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:8390
uint32_t last_width
Definition: switch_common.h:49
Definition: video4linux2.c:51
uint32_t o_width
Definition: switch_common.h:58
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
unsigned width
Definition: switch_common.h:73
unsigned int uint32_t
Definition: stdint.h:126
bool resize
Definition: switch_common.h:72
bool fullscreen
Definition: switch_common.h:25
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293