mirror of
https://github.com/libretro/RetroArch
synced 2024-12-28 09:29:16 +00:00
Remove sixel_ctx.c
This commit is contained in:
parent
6b466c6013
commit
255332c989
@ -1206,8 +1206,8 @@ endif
|
||||
ifeq ($(HAVE_SIXEL), 1)
|
||||
DEFINES += -DHAVE_SIXEL
|
||||
INCLUDE_DIRS += -I/usr/include/sixel
|
||||
OBJ += gfx/drivers/sixel_gfx.o gfx/drivers_font/sixel_font.o \
|
||||
gfx/drivers_context/sixel_ctx.o
|
||||
OBJ += gfx/drivers/sixel_gfx.o \
|
||||
gfx/drivers_font/sixel_font.o
|
||||
LIBS += $(SIXEL_LIBS)
|
||||
DEF_FLAGS += $(SIXEL_CFLAGS)
|
||||
endif
|
||||
|
@ -189,12 +189,10 @@ static void scroll_on_demand(int pixelheight)
|
||||
static void *sixel_gfx_init(const video_info_t *video,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
gfx_ctx_input_t inp;
|
||||
void *ctx_data = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool video_font_enable = settings->bools.video_font_enable;
|
||||
sixel_t *sixel = (sixel_t*)calloc(1, sizeof(*sixel));
|
||||
const gfx_ctx_driver_t *ctx_driver = NULL;
|
||||
const char *scale_str = NULL;
|
||||
|
||||
*input = NULL;
|
||||
@ -219,25 +217,17 @@ static void *sixel_gfx_init(const video_info_t *video,
|
||||
sixel_video_scale = 1.0;
|
||||
}
|
||||
|
||||
ctx_driver = video_context_driver_init_first(sixel,
|
||||
settings->arrays.video_context_driver,
|
||||
GFX_CTX_SIXEL_API, 1, 0, false, &ctx_data);
|
||||
#ifdef HAVE_UDEV
|
||||
*input_data = input_udev.init(joypad_name);
|
||||
|
||||
if (!ctx_driver)
|
||||
goto error;
|
||||
|
||||
if (ctx_data)
|
||||
sixel->ctx_data = ctx_data;
|
||||
|
||||
sixel->ctx_driver = ctx_driver;
|
||||
video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver);
|
||||
|
||||
RARCH_LOG("[SIXEL]: Found SIXEL context: %s\n", ctx_driver->ident);
|
||||
|
||||
inp.input = input;
|
||||
inp.input_data = input_data;
|
||||
|
||||
video_context_driver_input_driver(&inp);
|
||||
if (*input_data)
|
||||
*input = &input_udev;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
*input = NULL;
|
||||
*input_data = NULL;
|
||||
}
|
||||
|
||||
if (video_font_enable)
|
||||
font_driver_init_osd(sixel,
|
||||
@ -251,7 +241,6 @@ static void *sixel_gfx_init(const video_info_t *video,
|
||||
return sixel;
|
||||
|
||||
error:
|
||||
video_context_driver_destroy();
|
||||
if (sixel)
|
||||
free(sixel);
|
||||
return NULL;
|
||||
@ -435,7 +424,6 @@ static void sixel_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) {
|
||||
|
||||
static bool sixel_gfx_alive(void *data)
|
||||
{
|
||||
gfx_ctx_size_t size_data;
|
||||
unsigned temp_width = 0;
|
||||
unsigned temp_height = 0;
|
||||
bool quit = false;
|
||||
@ -445,9 +433,6 @@ static bool sixel_gfx_alive(void *data)
|
||||
/* Needed because some context drivers don't track their sizes */
|
||||
video_driver_get_size(&temp_width, &temp_height);
|
||||
|
||||
sixel->ctx_driver->check_window(sixel->ctx_data,
|
||||
&quit, &resize, &temp_width, &temp_height);
|
||||
|
||||
if (temp_width != 0 && temp_height != 0)
|
||||
video_driver_set_size(temp_width, temp_height);
|
||||
|
||||
@ -544,35 +529,11 @@ static void sixel_set_texture_frame(void *data,
|
||||
}
|
||||
|
||||
static void sixel_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
gfx_ctx_size_t size_data;
|
||||
size_data.width = width;
|
||||
size_data.height = height;
|
||||
video_context_driver_get_video_output_size(&size_data);
|
||||
}
|
||||
|
||||
static void sixel_get_video_output_prev(void *data)
|
||||
{
|
||||
video_context_driver_get_video_output_prev();
|
||||
}
|
||||
|
||||
static void sixel_get_video_output_next(void *data)
|
||||
{
|
||||
video_context_driver_get_video_output_next();
|
||||
}
|
||||
|
||||
unsigned *width, unsigned *height) { }
|
||||
static void sixel_get_video_output_prev(void *data) { }
|
||||
static void sixel_get_video_output_next(void *data) { }
|
||||
static void sixel_set_video_mode(void *data, unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
{
|
||||
gfx_ctx_mode_t mode;
|
||||
|
||||
mode.width = width;
|
||||
mode.height = height;
|
||||
mode.fullscreen = fullscreen;
|
||||
|
||||
video_context_driver_set_video_mode(&mode);
|
||||
}
|
||||
bool fullscreen) { }
|
||||
|
||||
static const video_poke_interface_t sixel_poke_interface = {
|
||||
NULL,
|
||||
|
@ -1,109 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2016-2019 - Brad Parker
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* SIXEL context. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../dynamic.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../ui/ui_companion_driver.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#include "../common/win32_common.h"
|
||||
#endif
|
||||
|
||||
static enum gfx_ctx_api sixel_ctx_api = GFX_CTX_NONE;
|
||||
|
||||
static void gfx_ctx_sixel_input_driver(void *data,
|
||||
const char *joypad_name,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
#ifdef HAVE_UDEV
|
||||
*input_data = input_udev.init(joypad_name);
|
||||
|
||||
if (*input_data)
|
||||
{
|
||||
*input = &input_udev;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
*input = NULL;
|
||||
*input_data = NULL;
|
||||
}
|
||||
|
||||
static void *gfx_ctx_sixel_init(void *video_driver) { return (void*)"sixel"; }
|
||||
static void gfx_ctx_sixel_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height) { }
|
||||
static bool gfx_ctx_sixel_set_resize(void *data,
|
||||
unsigned width, unsigned height) { return false; }
|
||||
static void gfx_ctx_sixel_get_video_size(void *data,
|
||||
unsigned *width, unsigned *height) { }
|
||||
static void gfx_ctx_sixel_destroy(void *data) { }
|
||||
static bool gfx_ctx_sixel_set_video_mode(void *data,
|
||||
unsigned width, unsigned height,
|
||||
bool fullscreen) { return true; }
|
||||
static bool gfx_ctx_sixel_has_focus(void *data) { return true; }
|
||||
static bool gfx_ctx_sixel_suppress_screensaver(void *data, bool enable) { return true; }
|
||||
static bool gfx_ctx_sixel_get_metrics(void *data, enum display_metric_types type, float *value) { return false; }
|
||||
static enum gfx_ctx_api gfx_ctx_sixel_get_api(void *data) { return sixel_ctx_api; }
|
||||
static bool gfx_ctx_sixel_bind_api(void *data,
|
||||
enum gfx_ctx_api api, unsigned major, unsigned minor) { return true; }
|
||||
static void gfx_ctx_sixel_show_mouse(void *data, bool state) { }
|
||||
static void gfx_ctx_sixel_swap_interval(void *data, int interval) { }
|
||||
static void gfx_ctx_sixel_set_flags(void *data, uint32_t flags) { }
|
||||
static uint32_t gfx_ctx_sixel_get_flags(void *data) { return 0; }
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_sixel = {
|
||||
gfx_ctx_sixel_init,
|
||||
gfx_ctx_sixel_destroy,
|
||||
gfx_ctx_sixel_get_api,
|
||||
gfx_ctx_sixel_bind_api,
|
||||
gfx_ctx_sixel_swap_interval,
|
||||
gfx_ctx_sixel_set_video_mode,
|
||||
gfx_ctx_sixel_get_video_size,
|
||||
NULL, /* get_refresh_rate */
|
||||
NULL, /* get_video_output_size */
|
||||
NULL, /* get_video_output_prev */
|
||||
NULL, /* get_video_output_next */
|
||||
gfx_ctx_sixel_get_metrics,
|
||||
NULL,
|
||||
NULL, /* update_title */
|
||||
gfx_ctx_sixel_check_window,
|
||||
gfx_ctx_sixel_set_resize,
|
||||
gfx_ctx_sixel_has_focus,
|
||||
gfx_ctx_sixel_suppress_screensaver,
|
||||
true, /* has_windowed */
|
||||
NULL, /* swap_buffers */
|
||||
gfx_ctx_sixel_input_driver,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
gfx_ctx_sixel_show_mouse,
|
||||
"sixel",
|
||||
gfx_ctx_sixel_get_flags,
|
||||
gfx_ctx_sixel_set_flags,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
@ -799,11 +799,9 @@ enum gfx_ctx_api
|
||||
GFX_CTX_DIRECT3D12_API,
|
||||
GFX_CTX_OPENVG_API,
|
||||
GFX_CTX_VULKAN_API,
|
||||
GFX_CTX_SIXEL_API,
|
||||
GFX_CTX_NETWORK_VIDEO_API,
|
||||
GFX_CTX_METAL_API,
|
||||
GFX_CTX_GDI_API,
|
||||
GFX_CTX_FPGA_API,
|
||||
GFX_CTX_GX_API,
|
||||
GFX_CTX_GX2_API
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user