Remove hacky restart function in video interface

This commit is contained in:
twinaphex 2014-05-30 17:57:21 +02:00
parent af440bf545
commit c020f362b6
11 changed files with 0 additions and 114 deletions

View File

@ -376,10 +376,6 @@ typedef struct video_driver
void (*free)(void *data);
const char *ident;
#ifdef HAVE_MENU
void (*restart)(void);
#endif
void (*set_rotation)(void *data, unsigned rotation);
void (*viewport_info)(void *data, struct rarch_viewport *vp);

View File

@ -1455,30 +1455,6 @@ static void *d3d_init(const video_info_t *info, const input_driver_t **input,
return vid;
}
static void d3d_restart(void)
{
#ifdef _XBOX
d3d_video_t *d3d = (d3d_video_t*)driver.video_data;
LPDIRECT3DDEVICE d3dr = d3d->dev;
if (!d3d)
return;
D3DPRESENT_PARAMETERS d3dpp;
video_info_t video_info = {0};
video_info.vsync = g_settings.video.vsync;
video_info.force_aspect = false;
video_info.smooth = g_settings.video.smooth;
video_info.input_scale = 2;
video_info.fullscreen = true;
video_info.rgb32 = (d3d->base_size == sizeof(uint32_t)) ? true : false;
d3d_make_d3dpp(d3d, &video_info, &d3dpp);
d3dr->Reset(&d3dpp);
#endif
}
const video_driver_t video_d3d = {
d3d_init,
d3d_frame,
@ -1488,9 +1464,6 @@ const video_driver_t video_d3d = {
d3d_set_shader,
d3d_free,
"d3d",
#ifdef HAVE_MENU
d3d_restart,
#endif
d3d_set_rotation,
d3d_viewport_info,
d3d_read_viewport,

View File

@ -2633,21 +2633,6 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
}
#endif
#if defined(HAVE_MENU)
static void gl_restart(void)
{
gl_t *gl = (gl_t*)driver.video_data;
if (!gl)
return;
void *data = driver.video_data;
driver.video_data = NULL;
gl_free(data);
init_video_input();
}
#endif
#ifdef HAVE_OVERLAY
static void gl_free_overlay(gl_t *gl);
static bool gl_overlay_load(void *data, const struct texture_image *images, unsigned num_images)
@ -3004,9 +2989,6 @@ const video_driver_t video_gl = {
gl_free,
"gl",
#if defined(HAVE_MENU)
gl_restart,
#endif
gl_set_rotation,
gl_viewport_info,

View File

@ -943,10 +943,6 @@ const video_driver_t video_lima = {
lima_gfx_free,
"lima",
#ifdef HAVE_MENU
NULL, /* restart */
#endif
lima_gfx_set_rotation,
lima_gfx_viewport_info,
NULL, /* read_viewport */

View File

@ -62,10 +62,6 @@ static void null_gfx_free(void *data)
(void)data;
}
#ifdef HAVE_MENU
static void null_gfx_restart(void) {}
#endif
const video_driver_t video_null = {
null_gfx_init,
null_gfx_frame,
@ -76,8 +72,5 @@ const video_driver_t video_null = {
null_gfx_free,
"null",
#ifdef HAVE_MENU
null_gfx_restart,
#endif
};

View File

@ -888,10 +888,6 @@ const video_driver_t video_omap = {
omap_gfx_free,
"omap",
#ifdef HAVE_MENU
NULL, /* restart */
#endif
NULL, /* set_rotation */
omap_gfx_viewport_info,
NULL, /* read_viewport */

View File

@ -791,11 +791,6 @@ static void thread_get_poke_interface(void *data, const video_poke_interface_t *
*iface = NULL;
}
#if defined(HAVE_MENU)
// all stubs for now, might not have to implement them unless we want to port this to consoles
static void thread_restart(void) {}
#endif
static const video_driver_t video_thread = {
thread_init_never_call, // Should never be called directly.
thread_frame,
@ -805,9 +800,6 @@ static const video_driver_t video_thread = {
thread_set_shader,
thread_free,
"Thread wrapper",
#if defined(HAVE_MENU)
thread_restart,
#endif
thread_set_rotation,
thread_viewport_info,
thread_read_viewport,

View File

@ -472,8 +472,6 @@ static void gx_efb_screenshot(void)
#endif
static void gx_restart(void) { }
static void *gx_init(const video_info_t *video,
const input_driver_t **input, void **input_data)
{
@ -1259,7 +1257,6 @@ const video_driver_t video_gx = {
.ident = "gx",
.set_rotation = gx_set_rotation,
.viewport_info = gx_viewport_info,
.restart = gx_restart,
#ifdef HAVE_OVERLAY
.overlay_interface = gx_get_overlay_interface,
#endif

View File

@ -410,10 +410,6 @@ static void psp_free(void *data)
free(data);
}
#ifdef HAVE_MENU
static void psp_restart(void) {}
#endif
static void psp_set_rotation(void *data, unsigned rotation)
{
psp1_video_t *psp = (psp1_video_t*)data;
@ -516,10 +512,6 @@ const video_driver_t video_psp1 = {
psp_free,
"psp1",
#if defined(HAVE_MENU)
psp_restart,
#endif
psp_set_rotation,
NULL,
NULL,

View File

@ -1385,10 +1385,6 @@ static void psp2_free(void *data)
free(psp->g_initializeHostMem);
}
#ifdef HAVE_MENU
static void psp2_restart(void) {}
#endif
static void psp2_set_rotation(void *data, unsigned rotation)
{
psp2_video_t *psp = (psp2_video_t*)data;
@ -1405,10 +1401,6 @@ const video_driver_t video_psp2 = {
psp2_free,
"psp2",
#if defined(HAVE_MENU)
psp2_restart,
#endif
psp2_set_rotation,
NULL,
NULL,

View File

@ -1243,28 +1243,6 @@ static void *d3d_init(const video_info_t *info, const input_driver_t **input, vo
return vid;
}
static void d3d_restart(void)
{
d3d_video_t *d3d = (d3d_video_t*)driver.video_data;
LPDIRECT3DDEVICE d3dr = d3d->dev;
if (!d3d)
return;
D3DPRESENT_PARAMETERS d3dpp;
video_info_t video_info = {0};
video_info.vsync = g_settings.video.vsync;
video_info.force_aspect = false;
video_info.smooth = g_settings.video.smooth;
video_info.input_scale = 2;
video_info.fullscreen = true;
video_info.rgb32 = (d3d->pixel_size == sizeof(uint32_t)) ? true : false;
d3d_make_d3dpp(d3d, &video_info, &d3dpp);
d3dr->Reset(&d3dpp);
}
const video_driver_t video_d3d = {
d3d_init,
d3d_frame,
@ -1274,7 +1252,6 @@ const video_driver_t video_d3d = {
d3d_set_shader,
d3d_free,
"d3d",
d3d_restart,
d3d_set_rotation,
NULL, /* viewport_info */
NULL, /* read_viewport */