mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
CLeanups
This commit is contained in:
parent
364ee31712
commit
b0157cd47d
@ -33,52 +33,10 @@
|
|||||||
|
|
||||||
static enum gfx_ctx_api network_ctx_api = GFX_CTX_NONE;
|
static enum gfx_ctx_api network_ctx_api = GFX_CTX_NONE;
|
||||||
|
|
||||||
static void gfx_ctx_network_check_window(void *data, bool *quit,
|
|
||||||
bool *resize, unsigned *width, unsigned *height)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool gfx_ctx_network_set_resize(void *data,
|
|
||||||
unsigned width, unsigned height)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)width;
|
|
||||||
(void)height;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gfx_ctx_network_get_video_size(void *data,
|
|
||||||
unsigned *width, unsigned *height)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *gfx_ctx_network_init(void *video_driver)
|
|
||||||
{
|
|
||||||
(void)video_driver;
|
|
||||||
|
|
||||||
return (void*)"network";
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gfx_ctx_network_destroy(void *data)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool gfx_ctx_network_set_video_mode(void *data,
|
|
||||||
unsigned width, unsigned height,
|
|
||||||
bool fullscreen)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gfx_ctx_network_input_driver(void *data,
|
static void gfx_ctx_network_input_driver(void *data,
|
||||||
const char *joypad_name,
|
const char *joypad_name,
|
||||||
input_driver_t **input, void **input_data)
|
input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
|
|
||||||
#ifdef HAVE_UDEV
|
#ifdef HAVE_UDEV
|
||||||
*input_data = input_udev.init(joypad_name);
|
*input_data = input_udev.init(joypad_name);
|
||||||
|
|
||||||
@ -92,63 +50,29 @@ static void gfx_ctx_network_input_driver(void *data,
|
|||||||
*input_data = NULL;
|
*input_data = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gfx_ctx_network_has_focus(void *data)
|
static void gfx_ctx_network_check_window(void *data, bool *quit,
|
||||||
{
|
bool *resize, unsigned *width, unsigned *height) { }
|
||||||
return true;
|
static bool gfx_ctx_network_set_resize(void *data,
|
||||||
}
|
unsigned width, unsigned height) { return false; }
|
||||||
|
static void gfx_ctx_network_get_video_size(void *data,
|
||||||
static bool gfx_ctx_network_suppress_screensaver(void *data, bool enable)
|
unsigned *width, unsigned *height) { }
|
||||||
{
|
static void *gfx_ctx_network_init(void *video_driver) { return (void*)"network"; }
|
||||||
return true;
|
static void gfx_ctx_network_destroy(void *data) { }
|
||||||
}
|
static bool gfx_ctx_network_set_video_mode(void *data,
|
||||||
|
unsigned width, unsigned height,
|
||||||
|
bool fullscreen) { return true; }
|
||||||
|
static bool gfx_ctx_network_has_focus(void *data) { return true; }
|
||||||
|
static bool gfx_ctx_network_suppress_screensaver(void *data, bool enable) { return true; }
|
||||||
static bool gfx_ctx_network_get_metrics(void *data,
|
static bool gfx_ctx_network_get_metrics(void *data,
|
||||||
enum display_metric_types type, float *value)
|
enum display_metric_types type, float *value) { return false; }
|
||||||
{
|
static enum gfx_ctx_api gfx_ctx_network_get_api(void *data) { return network_ctx_api; }
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static enum gfx_ctx_api gfx_ctx_network_get_api(void *data)
|
|
||||||
{
|
|
||||||
return network_ctx_api;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool gfx_ctx_network_bind_api(void *data,
|
static bool gfx_ctx_network_bind_api(void *data,
|
||||||
enum gfx_ctx_api api, unsigned major, unsigned minor)
|
enum gfx_ctx_api api, unsigned major, unsigned minor) { return true; }
|
||||||
{
|
static void gfx_ctx_network_show_mouse(void *data, bool state) { }
|
||||||
(void)data;
|
static void gfx_ctx_network_swap_interval(void *data, int interval) { }
|
||||||
|
static void gfx_ctx_network_set_flags(void *data, uint32_t flags) { }
|
||||||
return true;
|
static uint32_t gfx_ctx_network_get_flags(void *data) { return 0; }
|
||||||
}
|
static void gfx_ctx_network_swap_buffers(void *data) { }
|
||||||
|
|
||||||
static void gfx_ctx_network_show_mouse(void *data, bool state)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gfx_ctx_network_swap_interval(void *data, int interval)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)interval;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gfx_ctx_network_set_flags(void *data, uint32_t flags)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint32_t gfx_ctx_network_get_flags(void *data)
|
|
||||||
{
|
|
||||||
uint32_t flags = 0;
|
|
||||||
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void gfx_ctx_network_swap_buffers(void *data)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
}
|
|
||||||
|
|
||||||
const gfx_ctx_driver_t gfx_ctx_network = {
|
const gfx_ctx_driver_t gfx_ctx_network = {
|
||||||
gfx_ctx_network_init,
|
gfx_ctx_network_init,
|
||||||
|
@ -20,13 +20,11 @@
|
|||||||
|
|
||||||
static void vita_swap_interval(void *data, int interval)
|
static void vita_swap_interval(void *data, int interval)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
vglWaitVblankStart(interval);
|
vglWaitVblankStart(interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vita_get_video_size(void *data, unsigned *width, unsigned *height)
|
static void vita_get_video_size(void *data, unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
*width = 960;
|
*width = 960;
|
||||||
*height = 544;
|
*height = 544;
|
||||||
}
|
}
|
||||||
@ -50,95 +48,26 @@ static void vita_check_window(void *data, bool *quit,
|
|||||||
|
|
||||||
static void vita_swap_buffers(void *data)
|
static void vita_swap_buffers(void *data)
|
||||||
{
|
{
|
||||||
(void)data;
|
|
||||||
vglStopRendering();
|
vglStopRendering();
|
||||||
vglStartRendering();
|
vglStartRendering();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool vita_set_video_mode(void *data,
|
static bool vita_set_video_mode(void *data,
|
||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
bool fullscreen)
|
bool fullscreen) { return true; }
|
||||||
{
|
static void vita_destroy(void *data) { }
|
||||||
(void)data;
|
|
||||||
(void)width;
|
|
||||||
(void)height;
|
|
||||||
(void)fullscreen;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vita_destroy(void *data)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vita_input_driver(void *data,
|
static void vita_input_driver(void *data,
|
||||||
const char *name,
|
const char *name,
|
||||||
input_driver_t **input, void **input_data)
|
input_driver_t **input, void **input_data) { }
|
||||||
{
|
static bool vita_has_focus(void *data) { return true; }
|
||||||
(void)data;
|
static bool vita_suppress_screensaver(void *data, bool enable) { return false; }
|
||||||
(void)input;
|
static enum gfx_ctx_api vita_get_api(void *data) { return GFX_CTX_NONE; }
|
||||||
(void)input_data;
|
static bool vita_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { return true; }
|
||||||
}
|
static void vita_show_mouse(void *data, bool state) { }
|
||||||
|
static void vita_bind_hw_render(void *data, bool enable) { }
|
||||||
static bool vita_has_focus(void *data)
|
static void *vita_init(void *video_driver) { return (void*)"vita"; }
|
||||||
{
|
static uint32_t vita_get_flags(void *data) { return 0; }
|
||||||
(void)data;
|
static void vita_set_flags(void *data, uint32_t flags) { }
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool vita_suppress_screensaver(void *data, bool enable)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)enable;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static enum gfx_ctx_api vita_get_api(void *data)
|
|
||||||
{
|
|
||||||
return GFX_CTX_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool vita_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)api;
|
|
||||||
(void)major;
|
|
||||||
(void)minor;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vita_show_mouse(void *data, bool state)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)state;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vita_bind_hw_render(void *data, bool enable)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)enable;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *vita_init(void *video_driver)
|
|
||||||
{
|
|
||||||
(void)video_driver;
|
|
||||||
|
|
||||||
return (void*)"vita";
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint32_t vita_get_flags(void *data)
|
|
||||||
{
|
|
||||||
uint32_t flags = 0;
|
|
||||||
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void vita_set_flags(void *data, uint32_t flags)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
}
|
|
||||||
|
|
||||||
const gfx_ctx_driver_t vita_ctx = {
|
const gfx_ctx_driver_t vita_ctx = {
|
||||||
vita_init,
|
vita_init,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user