mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Remove some unused variables
This commit is contained in:
parent
ac5d6ade25
commit
9a0ecaab4b
@ -36,7 +36,6 @@ typedef struct RegOp
|
|||||||
typedef struct fpga
|
typedef struct fpga
|
||||||
{
|
{
|
||||||
bool rgb32;
|
bool rgb32;
|
||||||
bool menu_rgb32;
|
|
||||||
unsigned menu_width;
|
unsigned menu_width;
|
||||||
unsigned menu_height;
|
unsigned menu_height;
|
||||||
unsigned menu_pitch;
|
unsigned menu_pitch;
|
||||||
|
@ -65,7 +65,6 @@ typedef struct gdi
|
|||||||
int win_minor;
|
int win_minor;
|
||||||
|
|
||||||
bool rgb32;
|
bool rgb32;
|
||||||
bool menu_rgb32;
|
|
||||||
bool lte_win98;
|
bool lte_win98;
|
||||||
bool menu_enable;
|
bool menu_enable;
|
||||||
bool menu_full_screen;
|
bool menu_full_screen;
|
||||||
|
@ -97,7 +97,6 @@ typedef struct gl1
|
|||||||
GLuint texture[GFX_MAX_TEXTURES];
|
GLuint texture[GFX_MAX_TEXTURES];
|
||||||
|
|
||||||
bool fullscreen;
|
bool fullscreen;
|
||||||
bool menu_rgb32;
|
|
||||||
bool menu_size_changed;
|
bool menu_size_changed;
|
||||||
bool rgb32;
|
bool rgb32;
|
||||||
bool supports_bgra;
|
bool supports_bgra;
|
||||||
@ -105,12 +104,10 @@ typedef struct gl1
|
|||||||
bool should_resize;
|
bool should_resize;
|
||||||
bool menu_texture_enable;
|
bool menu_texture_enable;
|
||||||
bool menu_texture_full_screen;
|
bool menu_texture_full_screen;
|
||||||
bool have_sync;
|
|
||||||
bool smooth;
|
bool smooth;
|
||||||
bool menu_smooth;
|
bool menu_smooth;
|
||||||
bool overlay_enable;
|
bool overlay_enable;
|
||||||
bool overlay_full_screen;
|
bool overlay_full_screen;
|
||||||
bool shared_context_use;
|
|
||||||
} gl1_t;
|
} gl1_t;
|
||||||
|
|
||||||
static INLINE void gl1_bind_texture(GLuint id, GLint wrap_mode, GLint mag_filter,
|
static INLINE void gl1_bind_texture(GLuint id, GLint wrap_mode, GLint mag_filter,
|
||||||
|
@ -95,10 +95,6 @@ static const GLfloat gl1_white_color[] = {
|
|||||||
1, 1, 1, 1,
|
1, 1, 1, 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define gl1_context_bind_hw_render(gl1, enable) \
|
|
||||||
if (gl1->shared_context_use) \
|
|
||||||
gl1->ctx_driver->bind_hw_render(gl1->ctx_data, enable)
|
|
||||||
|
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
static void gl1_render_overlay(gl1_t *gl,
|
static void gl1_render_overlay(gl1_t *gl,
|
||||||
unsigned width,
|
unsigned width,
|
||||||
@ -762,8 +758,6 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
|||||||
video_info->xmb_shadows_enable = false;
|
video_info->xmb_shadows_enable = false;
|
||||||
video_info->menu_shader_pipeline = 0;
|
video_info->menu_shader_pipeline = 0;
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, false);
|
|
||||||
|
|
||||||
if (gl1->should_resize)
|
if (gl1->should_resize)
|
||||||
{
|
{
|
||||||
gfx_ctx_mode_t mode;
|
gfx_ctx_mode_t mode;
|
||||||
@ -1015,8 +1009,6 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
|||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, true);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1030,8 +1022,6 @@ static void gl1_gfx_set_nonblock_state(void *data, bool state,
|
|||||||
if (!gl1)
|
if (!gl1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, false);
|
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
interval = swap_interval;
|
interval = swap_interval;
|
||||||
|
|
||||||
@ -1041,7 +1031,6 @@ static void gl1_gfx_set_nonblock_state(void *data, bool state,
|
|||||||
interval = -1;
|
interval = -1;
|
||||||
gl1->ctx_driver->swap_interval(gl1->ctx_data, interval);
|
gl1->ctx_driver->swap_interval(gl1->ctx_data, interval);
|
||||||
}
|
}
|
||||||
gl1_context_bind_hw_render(gl1, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gl1_gfx_alive(void *data)
|
static bool gl1_gfx_alive(void *data)
|
||||||
@ -1092,8 +1081,6 @@ static void gl1_gfx_free(void *data)
|
|||||||
if (!gl1)
|
if (!gl1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, false);
|
|
||||||
|
|
||||||
if (gl1->menu_frame)
|
if (gl1->menu_frame)
|
||||||
free(gl1->menu_frame);
|
free(gl1->menu_frame);
|
||||||
gl1->menu_frame = NULL;
|
gl1->menu_frame = NULL;
|
||||||
@ -1182,14 +1169,12 @@ static bool gl1_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle)
|
|||||||
if (!gl1)
|
if (!gl1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, false);
|
|
||||||
|
|
||||||
num_pixels = gl1->vp.width * gl1->vp.height;
|
num_pixels = gl1->vp.width * gl1->vp.height;
|
||||||
|
|
||||||
gl1->readback_buffer_screenshot = malloc(num_pixels * sizeof(uint32_t));
|
gl1->readback_buffer_screenshot = malloc(num_pixels * sizeof(uint32_t));
|
||||||
|
|
||||||
if (!gl1->readback_buffer_screenshot)
|
if (!gl1->readback_buffer_screenshot)
|
||||||
goto error;
|
return false;
|
||||||
|
|
||||||
if (!is_idle)
|
if (!is_idle)
|
||||||
video_driver_cached_frame();
|
video_driver_cached_frame();
|
||||||
@ -1202,13 +1187,7 @@ static bool gl1_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle)
|
|||||||
free(gl1->readback_buffer_screenshot);
|
free(gl1->readback_buffer_screenshot);
|
||||||
gl1->readback_buffer_screenshot = NULL;
|
gl1->readback_buffer_screenshot = NULL;
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, true);
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
|
||||||
gl1_context_bind_hw_render(gl1, true);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl1_set_texture_frame(void *data,
|
static void gl1_set_texture_frame(void *data,
|
||||||
@ -1225,8 +1204,6 @@ static void gl1_set_texture_frame(void *data,
|
|||||||
|
|
||||||
gl1->menu_smooth = menu_linear_filter;
|
gl1->menu_smooth = menu_linear_filter;
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, false);
|
|
||||||
|
|
||||||
if (rgb32)
|
if (rgb32)
|
||||||
pitch = width * 4;
|
pitch = width * 4;
|
||||||
|
|
||||||
@ -1261,8 +1238,6 @@ static void gl1_set_texture_frame(void *data,
|
|||||||
gl1->menu_bits = rgb32 ? 32 : 16;
|
gl1->menu_bits = rgb32 ? 32 : 16;
|
||||||
gl1->menu_size_changed = true;
|
gl1->menu_size_changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gl1_get_video_output_size(void *data,
|
static void gl1_get_video_output_size(void *data,
|
||||||
@ -1564,17 +1539,12 @@ static bool gl1_overlay_load(void *data,
|
|||||||
if (!gl)
|
if (!gl)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl, false);
|
|
||||||
|
|
||||||
gl1_free_overlay(gl);
|
gl1_free_overlay(gl);
|
||||||
gl->overlay_tex = (GLuint*)
|
gl->overlay_tex = (GLuint*)
|
||||||
calloc(num_images, sizeof(*gl->overlay_tex));
|
calloc(num_images, sizeof(*gl->overlay_tex));
|
||||||
|
|
||||||
if (!gl->overlay_tex)
|
if (!gl->overlay_tex)
|
||||||
{
|
|
||||||
gl1_context_bind_hw_render(gl, true);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
gl->overlay_vertex_coord = (GLfloat*)
|
gl->overlay_vertex_coord = (GLfloat*)
|
||||||
calloc(2 * 4 * num_images, sizeof(GLfloat));
|
calloc(2 * 4 * num_images, sizeof(GLfloat));
|
||||||
@ -1610,7 +1580,6 @@ static bool gl1_overlay_load(void *data,
|
|||||||
gl->overlay_color_coord[16 * i + j] = 1.0f;
|
gl->overlay_color_coord[16 * i + j] = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl, true);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,6 @@ static unsigned network_video_pitch = 0;
|
|||||||
static unsigned network_video_bits = 0;
|
static unsigned network_video_bits = 0;
|
||||||
static unsigned network_menu_bits = 0;
|
static unsigned network_menu_bits = 0;
|
||||||
static bool network_rgb32 = false;
|
static bool network_rgb32 = false;
|
||||||
static bool network_menu_rgb32 = false;
|
|
||||||
static unsigned *network_video_temp_buf = NULL;
|
static unsigned *network_video_temp_buf = NULL;
|
||||||
|
|
||||||
static void gfx_ctx_network_input_driver(
|
static void gfx_ctx_network_input_driver(
|
||||||
|
@ -106,19 +106,15 @@ static const gfx_ctx_driver_t* rsx_get_context(rsx_t* rsx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_THREADS
|
#ifndef HAVE_THREADS
|
||||||
static bool rsx_tasks_finder(retro_task_t *task,void *userdata)
|
static bool rsx_tasks_finder(retro_task_t *task,void *userdata) { return task; }
|
||||||
{
|
|
||||||
return task;
|
|
||||||
}
|
|
||||||
task_finder_data_t rsx_tasks_finder_data = {rsx_tasks_finder, NULL};
|
task_finder_data_t rsx_tasks_finder_data = {rsx_tasks_finder, NULL};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int rsx_make_buffer(rsxBuffer * buffer, u16 width, u16 height, int id)
|
static int rsx_make_buffer(rsxBuffer * buffer, u16 width, u16 height, int id)
|
||||||
{
|
{
|
||||||
int depth = sizeof(u32);
|
int depth = sizeof(u32);
|
||||||
int pitch = depth * width;
|
int pitch = depth * width;
|
||||||
int size = depth * width * height;
|
int size = depth * width * height;
|
||||||
|
|
||||||
buffer->ptr = (uint32_t*)rsxMemalign (64, size);
|
buffer->ptr = (uint32_t*)rsxMemalign (64, size);
|
||||||
if (!buffer->ptr)
|
if (!buffer->ptr)
|
||||||
goto error;
|
goto error;
|
||||||
@ -130,17 +126,16 @@ static int rsx_make_buffer(rsxBuffer * buffer, u16 width, u16 height, int id)
|
|||||||
if (gcmSetDisplayBuffer (id, buffer->offset, pitch, width, height) != 0)
|
if (gcmSetDisplayBuffer (id, buffer->offset, pitch, width, height) != 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
buffer->width = width;
|
buffer->width = width;
|
||||||
buffer->height = height;
|
buffer->height = height;
|
||||||
buffer->id = id;
|
buffer->id = id;
|
||||||
|
|
||||||
return TRUE;
|
return 1;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (buffer->ptr)
|
if (buffer->ptr)
|
||||||
rsxFree (buffer->ptr);
|
rsxFree (buffer->ptr);
|
||||||
|
return 0;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rsx_flip(gcmContextData *context, s32 buffer)
|
static int rsx_flip(gcmContextData *context, s32 buffer)
|
||||||
@ -150,10 +145,9 @@ static int rsx_flip(gcmContextData *context, s32 buffer)
|
|||||||
rsxFlushBuffer (context);
|
rsxFlushBuffer (context);
|
||||||
/* Prevent the RSX from continuing until the flip has finished. */
|
/* Prevent the RSX from continuing until the flip has finished. */
|
||||||
gcmSetWaitFlip (context);
|
gcmSetWaitFlip (context);
|
||||||
|
return 1;
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
return FALSE;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GCM_LABEL_INDEX 255
|
#define GCM_LABEL_INDEX 255
|
||||||
@ -778,6 +772,8 @@ static void rsx_load_texture_data(rsx_t* rsx, rsx_texture_t *texture,
|
|||||||
bool rgb32, bool menu, enum texture_filter_type filter_type)
|
bool rgb32, bool menu, enum texture_filter_type filter_type)
|
||||||
{
|
{
|
||||||
u32 mag_filter, min_filter;
|
u32 mag_filter, min_filter;
|
||||||
|
u8 *texbuffer = (u8 *)texture->data;
|
||||||
|
const u8 *data = (u8 *)frame;
|
||||||
|
|
||||||
if (!texture->data)
|
if (!texture->data)
|
||||||
{
|
{
|
||||||
@ -785,48 +781,46 @@ static void rsx_load_texture_data(rsx_t* rsx, rsx_texture_t *texture,
|
|||||||
rsxAddressToOffset(texture->data, &texture->offset);
|
rsxAddressToOffset(texture->data, &texture->offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 *texbuffer = (u8 *)texture->data;
|
|
||||||
const u8 *data = (u8 *)frame;
|
|
||||||
memcpy(texbuffer, data, height * pitch);
|
memcpy(texbuffer, data, height * pitch);
|
||||||
|
|
||||||
texture->tex.format = (rgb32 ? GCM_TEXTURE_FORMAT_A8R8G8B8 :
|
texture->tex.format = (rgb32 ? GCM_TEXTURE_FORMAT_A8R8G8B8 :
|
||||||
menu ? GCM_TEXTURE_FORMAT_A4R4G4B4 : GCM_TEXTURE_FORMAT_R5G6B5) | GCM_TEXTURE_FORMAT_LIN;
|
menu ? GCM_TEXTURE_FORMAT_A4R4G4B4 : GCM_TEXTURE_FORMAT_R5G6B5) | GCM_TEXTURE_FORMAT_LIN;
|
||||||
texture->tex.mipmap = 1;
|
texture->tex.mipmap = 1;
|
||||||
texture->tex.dimension = GCM_TEXTURE_DIMS_2D;
|
texture->tex.dimension = GCM_TEXTURE_DIMS_2D;
|
||||||
texture->tex.cubemap = GCM_FALSE;
|
texture->tex.cubemap = GCM_FALSE;
|
||||||
texture->tex.remap = ((GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_B_SHIFT) |
|
texture->tex.remap = ((GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_B_SHIFT) |
|
||||||
(GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_G_SHIFT) |
|
(GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_G_SHIFT) |
|
||||||
(GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_R_SHIFT) |
|
(GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_R_SHIFT) |
|
||||||
(GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_A_SHIFT) |
|
(GCM_TEXTURE_REMAP_TYPE_REMAP << GCM_TEXTURE_REMAP_TYPE_A_SHIFT) |
|
||||||
(GCM_TEXTURE_REMAP_COLOR_B << GCM_TEXTURE_REMAP_COLOR_B_SHIFT) |
|
(GCM_TEXTURE_REMAP_COLOR_B << GCM_TEXTURE_REMAP_COLOR_B_SHIFT) |
|
||||||
(GCM_TEXTURE_REMAP_COLOR_G << GCM_TEXTURE_REMAP_COLOR_G_SHIFT) |
|
(GCM_TEXTURE_REMAP_COLOR_G << GCM_TEXTURE_REMAP_COLOR_G_SHIFT) |
|
||||||
(GCM_TEXTURE_REMAP_COLOR_R << GCM_TEXTURE_REMAP_COLOR_R_SHIFT) |
|
(GCM_TEXTURE_REMAP_COLOR_R << GCM_TEXTURE_REMAP_COLOR_R_SHIFT) |
|
||||||
(GCM_TEXTURE_REMAP_COLOR_A << GCM_TEXTURE_REMAP_COLOR_A_SHIFT));
|
(GCM_TEXTURE_REMAP_COLOR_A << GCM_TEXTURE_REMAP_COLOR_A_SHIFT));
|
||||||
texture->tex.width = width;
|
texture->tex.width = width;
|
||||||
texture->tex.height = height;
|
texture->tex.height = height;
|
||||||
texture->tex.depth = 1;
|
texture->tex.depth = 1;
|
||||||
texture->tex.location = GCM_LOCATION_RSX;
|
texture->tex.location = GCM_LOCATION_RSX;
|
||||||
texture->tex.pitch = pitch;
|
texture->tex.pitch = pitch;
|
||||||
texture->tex.offset = texture->offset;
|
texture->tex.offset = texture->offset;
|
||||||
|
|
||||||
switch (filter_type)
|
switch (filter_type)
|
||||||
{
|
{
|
||||||
case TEXTURE_FILTER_MIPMAP_NEAREST:
|
case TEXTURE_FILTER_MIPMAP_NEAREST:
|
||||||
case TEXTURE_FILTER_NEAREST:
|
case TEXTURE_FILTER_NEAREST:
|
||||||
min_filter = GCM_TEXTURE_NEAREST;
|
min_filter = GCM_TEXTURE_NEAREST;
|
||||||
mag_filter = GCM_TEXTURE_NEAREST;
|
mag_filter = GCM_TEXTURE_NEAREST;
|
||||||
break;
|
break;
|
||||||
case TEXTURE_FILTER_MIPMAP_LINEAR:
|
case TEXTURE_FILTER_MIPMAP_LINEAR:
|
||||||
case TEXTURE_FILTER_LINEAR:
|
case TEXTURE_FILTER_LINEAR:
|
||||||
default:
|
default:
|
||||||
min_filter = GCM_TEXTURE_LINEAR;
|
min_filter = GCM_TEXTURE_LINEAR;
|
||||||
mag_filter = GCM_TEXTURE_LINEAR;
|
mag_filter = GCM_TEXTURE_LINEAR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
texture->min_filter = min_filter;
|
texture->min_filter = min_filter;
|
||||||
texture->mag_filter = mag_filter;
|
texture->mag_filter = mag_filter;
|
||||||
texture->wrap_s = GCM_TEXTURE_CLAMP_TO_EDGE;
|
texture->wrap_s = GCM_TEXTURE_CLAMP_TO_EDGE;
|
||||||
texture->wrap_t = GCM_TEXTURE_CLAMP_TO_EDGE;
|
texture->wrap_t = GCM_TEXTURE_CLAMP_TO_EDGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rsx_set_texture(rsx_t* rsx, rsx_texture_t *texture)
|
static void rsx_set_texture(rsx_t* rsx, rsx_texture_t *texture)
|
||||||
@ -841,10 +835,10 @@ static void rsx_set_texture(rsx_t* rsx, rsx_texture_t *texture)
|
|||||||
static void rsx_clear_surface(rsx_t* rsx)
|
static void rsx_clear_surface(rsx_t* rsx)
|
||||||
{
|
{
|
||||||
rsxSetColorMask(rsx->context,
|
rsxSetColorMask(rsx->context,
|
||||||
GCM_COLOR_MASK_R |
|
GCM_COLOR_MASK_R
|
||||||
GCM_COLOR_MASK_G |
|
| GCM_COLOR_MASK_G
|
||||||
GCM_COLOR_MASK_B |
|
| GCM_COLOR_MASK_B
|
||||||
GCM_COLOR_MASK_A);
|
| GCM_COLOR_MASK_A);
|
||||||
|
|
||||||
rsxSetColorMaskMrt(rsx->context, 0);
|
rsxSetColorMaskMrt(rsx->context, 0);
|
||||||
|
|
||||||
@ -859,12 +853,12 @@ static void rsx_clear_surface(rsx_t* rsx)
|
|||||||
rsxSetClearColor(rsx->context, 0);
|
rsxSetClearColor(rsx->context, 0);
|
||||||
rsxSetClearDepthStencil(rsx->context, 0xffffff00);
|
rsxSetClearDepthStencil(rsx->context, 0xffffff00);
|
||||||
rsxClearSurface(rsx->context,
|
rsxClearSurface(rsx->context,
|
||||||
GCM_CLEAR_R |
|
GCM_CLEAR_R
|
||||||
GCM_CLEAR_G |
|
| GCM_CLEAR_G
|
||||||
GCM_CLEAR_B |
|
| GCM_CLEAR_B
|
||||||
GCM_CLEAR_A |
|
| GCM_CLEAR_A
|
||||||
GCM_CLEAR_S |
|
| GCM_CLEAR_S
|
||||||
GCM_CLEAR_Z);
|
| GCM_CLEAR_Z);
|
||||||
rsxSetZControl(rsx->context, 0, 1, 1);
|
rsxSetZControl(rsx->context, 0, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -946,25 +940,26 @@ static void rsx_draw_menu_vertices(rsx_t* rsx)
|
|||||||
|
|
||||||
static void rsx_update_screen(rsx_t* gcm)
|
static void rsx_update_screen(rsx_t* gcm)
|
||||||
{
|
{
|
||||||
rsxBuffer *buffer;
|
rsxBuffer *buffer = NULL;
|
||||||
|
|
||||||
#if defined(HAVE_MENU_BUFFER)
|
#if defined(HAVE_MENU_BUFFER)
|
||||||
if (gcm->menu_frame_enable) {
|
if (gcm->menu_frame_enable)
|
||||||
buffer = &gcm->menuBuffers[gcm->menuBuffer];
|
{
|
||||||
gcm->menuBuffer = (gcm->menuBuffer+1)%MAX_MENU_BUFFERS;
|
buffer = &gcm->menuBuffers[gcm->menuBuffer];
|
||||||
gcm->nextBuffer = MAX_BUFFERS + gcm->menuBuffer;
|
gcm->menuBuffer = (gcm->menuBuffer+1)%MAX_MENU_BUFFERS;
|
||||||
} else {
|
gcm->nextBuffer = MAX_BUFFERS + gcm->menuBuffer;
|
||||||
buffer = &gcm->buffers[gcm->currentBuffer];
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buffer = &gcm->buffers[gcm->currentBuffer];
|
||||||
gcm->currentBuffer = (gcm->currentBuffer+1)%MAX_BUFFERS;
|
gcm->currentBuffer = (gcm->currentBuffer+1)%MAX_BUFFERS;
|
||||||
gcm->nextBuffer = gcm->currentBuffer;
|
gcm->nextBuffer = gcm->currentBuffer;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
buffer = &gcm->buffers[gcm->currentBuffer];
|
buffer = &gcm->buffers[gcm->currentBuffer];
|
||||||
gcm->currentBuffer = (gcm->currentBuffer+1)%MAX_BUFFERS;
|
gcm->currentBuffer = (gcm->currentBuffer+1)%MAX_BUFFERS;
|
||||||
gcm->nextBuffer = gcm->currentBuffer;
|
gcm->nextBuffer = gcm->currentBuffer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
rsx_flip(gcm->context, buffer->id);
|
rsx_flip(gcm->context, buffer->id);
|
||||||
if (gcm->vsync)
|
if (gcm->vsync)
|
||||||
rsx_wait_flip();
|
rsx_wait_flip();
|
||||||
@ -979,10 +974,10 @@ static bool rsx_frame(void* data, const void* frame,
|
|||||||
uint64_t frame_count,
|
uint64_t frame_count,
|
||||||
unsigned pitch, const char* msg, video_frame_info_t *video_info)
|
unsigned pitch, const char* msg, video_frame_info_t *video_info)
|
||||||
{
|
{
|
||||||
rsx_t* gcm = (rsx_t*)data;
|
rsx_t *gcm = (rsx_t*)data;
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
bool statistics_show = video_info->statistics_show;
|
bool statistics_show = video_info->statistics_show;
|
||||||
struct font_params *osd_params = (struct font_params*)
|
struct font_params *osd_params = (struct font_params*)
|
||||||
&video_info->osd_stat_params;
|
&video_info->osd_stat_params;
|
||||||
bool menu_is_alive = video_info->menu_is_alive;
|
bool menu_is_alive = video_info->menu_is_alive;
|
||||||
#endif
|
#endif
|
||||||
@ -1042,24 +1037,9 @@ static void rsx_set_nonblock_state(void* data, bool toggle,
|
|||||||
gcm->vsync = !toggle;
|
gcm->vsync = !toggle;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool rsx_alive(void* data)
|
static bool rsx_alive(void* data) { return true; }
|
||||||
{
|
static bool rsx_focus(void* data) { return true; }
|
||||||
(void)data;
|
static bool rsx_suppress_screensaver(void* data, bool enable) { return false; }
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool rsx_focus(void* data)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool rsx_suppress_screensaver(void* data, bool enable)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)enable;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void rsx_free(void* data)
|
static void rsx_free(void* data)
|
||||||
{
|
{
|
||||||
@ -1099,11 +1079,11 @@ static void rsx_free(void* data)
|
|||||||
static void rsx_set_texture_frame(void* data, const void* frame, bool rgb32,
|
static void rsx_set_texture_frame(void* data, const void* frame, bool rgb32,
|
||||||
unsigned width, unsigned height, float alpha)
|
unsigned width, unsigned height, float alpha)
|
||||||
{
|
{
|
||||||
rsx_t* gcm = (rsx_t*)data;
|
rsx_t* gcm = (rsx_t*)data;
|
||||||
|
|
||||||
gcm->menu_texture_alpha = alpha;
|
gcm->menu_texture_alpha = alpha;
|
||||||
gcm->menu_width = width;
|
gcm->menu_width = width;
|
||||||
gcm->menu_height = height;
|
gcm->menu_height = height;
|
||||||
rsx_load_texture_data(gcm, &gcm->menu_texture, frame, width, height, width * (rgb32 ? 4 : 2),
|
rsx_load_texture_data(gcm, &gcm->menu_texture, frame, width, height, width * (rgb32 ? 4 : 2),
|
||||||
rgb32, true, gcm->smooth ? TEXTURE_FILTER_LINEAR : TEXTURE_FILTER_NEAREST);
|
rgb32, true, gcm->smooth ? TEXTURE_FILTER_LINEAR : TEXTURE_FILTER_NEAREST);
|
||||||
}
|
}
|
||||||
@ -1111,23 +1091,20 @@ static void rsx_set_texture_frame(void* data, const void* frame, bool rgb32,
|
|||||||
static void rsx_set_texture_enable(void* data, bool state, bool full_screen)
|
static void rsx_set_texture_enable(void* data, bool state, bool full_screen)
|
||||||
{
|
{
|
||||||
rsx_t* gcm = (rsx_t*)data;
|
rsx_t* gcm = (rsx_t*)data;
|
||||||
|
if (gcm)
|
||||||
if (!gcm)
|
gcm->menu_frame_enable = state;
|
||||||
return;
|
|
||||||
|
|
||||||
gcm->menu_frame_enable = state;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rsx_set_rotation(void* data, unsigned rotation)
|
static void rsx_set_rotation(void* data, unsigned rotation)
|
||||||
{
|
{
|
||||||
rsx_t* gcm = (rsx_t*)data;
|
rsx_t* gcm = (rsx_t*)data;
|
||||||
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
|
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
|
||||||
|
|
||||||
if (!gcm)
|
if (!gcm)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gcm->rotation = 90 * rotation;
|
gcm->rotation = 90 * rotation;
|
||||||
gcm->should_resize = true;
|
gcm->should_resize = true;
|
||||||
rsx_set_projection(gcm, &ortho, true);
|
rsx_set_projection(gcm, &ortho, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1141,7 +1118,7 @@ static void rsx_set_filtering(void* data, unsigned index, bool smooth, bool ctx_
|
|||||||
|
|
||||||
static void rsx_set_aspect_ratio(void* data, unsigned aspect_ratio_idx)
|
static void rsx_set_aspect_ratio(void* data, unsigned aspect_ratio_idx)
|
||||||
{
|
{
|
||||||
rsx_t* gcm = (rsx_t*)data;
|
rsx_t* gcm = (rsx_t*)data;
|
||||||
|
|
||||||
if(!gcm)
|
if(!gcm)
|
||||||
return;
|
return;
|
||||||
@ -1153,7 +1130,6 @@ static void rsx_set_aspect_ratio(void* data, unsigned aspect_ratio_idx)
|
|||||||
static void rsx_apply_state_changes(void* data)
|
static void rsx_apply_state_changes(void* data)
|
||||||
{
|
{
|
||||||
rsx_t* gcm = (rsx_t*)data;
|
rsx_t* gcm = (rsx_t*)data;
|
||||||
|
|
||||||
if (gcm)
|
if (gcm)
|
||||||
gcm->should_resize = true;
|
gcm->should_resize = true;
|
||||||
|
|
||||||
@ -1162,7 +1138,6 @@ static void rsx_apply_state_changes(void* data)
|
|||||||
static void rsx_viewport_info(void* data, struct video_viewport* vp)
|
static void rsx_viewport_info(void* data, struct video_viewport* vp)
|
||||||
{
|
{
|
||||||
rsx_t* gcm = (rsx_t*)data;
|
rsx_t* gcm = (rsx_t*)data;
|
||||||
|
|
||||||
if (gcm)
|
if (gcm)
|
||||||
*vp = gcm->vp;
|
*vp = gcm->vp;
|
||||||
}
|
}
|
||||||
@ -1173,17 +1148,11 @@ static void rsx_set_osd_msg(void *data,
|
|||||||
const void *params, void *font)
|
const void *params, void *font)
|
||||||
{
|
{
|
||||||
rsx_t* gcm = (rsx_t*)data;
|
rsx_t* gcm = (rsx_t*)data;
|
||||||
|
|
||||||
if (gcm && gcm->msg_rendering_enabled)
|
if (gcm && gcm->msg_rendering_enabled)
|
||||||
font_driver_render_msg(data, msg, params, font);
|
font_driver_render_msg(data, msg, params, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t rsx_get_flags(void *data)
|
static uint32_t rsx_get_flags(void *data) { return 0; }
|
||||||
{
|
|
||||||
uint32_t flags = 0;
|
|
||||||
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const video_poke_interface_t rsx_poke_interface = {
|
static const video_poke_interface_t rsx_poke_interface = {
|
||||||
rsx_get_flags,
|
rsx_get_flags,
|
||||||
@ -1214,28 +1183,13 @@ static const video_poke_interface_t rsx_poke_interface = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void rsx_get_poke_interface(void* data,
|
static void rsx_get_poke_interface(void* data,
|
||||||
const video_poke_interface_t** iface)
|
const video_poke_interface_t** iface) { *iface = &rsx_poke_interface; }
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
*iface = &rsx_poke_interface;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool rsx_set_shader(void* data,
|
static bool rsx_set_shader(void* data,
|
||||||
enum rarch_shader_type type, const char* path)
|
enum rarch_shader_type type, const char* path) { return false; }
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)type;
|
|
||||||
(void)path;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_GFX_WIDGETS
|
#ifdef HAVE_GFX_WIDGETS
|
||||||
static bool rsx_widgets_enabled(void *data)
|
static bool rsx_widgets_enabled(void *data) { return true; }
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
video_driver_t video_gcm =
|
video_driver_t video_gcm =
|
||||||
|
@ -67,8 +67,6 @@ static unsigned sixel_video_pitch = 0;
|
|||||||
static unsigned sixel_video_bits = 0;
|
static unsigned sixel_video_bits = 0;
|
||||||
static unsigned sixel_menu_bits = 0;
|
static unsigned sixel_menu_bits = 0;
|
||||||
static double sixel_video_scale = 1;
|
static double sixel_video_scale = 1;
|
||||||
static bool sixel_rgb32 = false;
|
|
||||||
static bool sixel_menu_rgb32 = false;
|
|
||||||
static unsigned *sixel_temp_buf = NULL;
|
static unsigned *sixel_temp_buf = NULL;
|
||||||
|
|
||||||
static int sixel_write(char *data, int size, void *priv)
|
static int sixel_write(char *data, int size, void *priv)
|
||||||
@ -201,7 +199,6 @@ static void *sixel_gfx_init(const video_info_t *video,
|
|||||||
*input = NULL;
|
*input = NULL;
|
||||||
*input_data = NULL;
|
*input_data = NULL;
|
||||||
|
|
||||||
sixel_rgb32 = video->rgb32;
|
|
||||||
sixel_video_bits = video->rgb32 ? 32 : 16;
|
sixel_video_bits = video->rgb32 ? 32 : 16;
|
||||||
|
|
||||||
if (video->rgb32)
|
if (video->rgb32)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user