mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-16 15:27:41 +00:00
Remove hacky restart function in video interface
This commit is contained in:
parent
af440bf545
commit
c020f362b6
4
driver.h
4
driver.h
@ -376,10 +376,6 @@ typedef struct video_driver
|
|||||||
void (*free)(void *data);
|
void (*free)(void *data);
|
||||||
const char *ident;
|
const char *ident;
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
void (*restart)(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void (*set_rotation)(void *data, unsigned rotation);
|
void (*set_rotation)(void *data, unsigned rotation);
|
||||||
void (*viewport_info)(void *data, struct rarch_viewport *vp);
|
void (*viewport_info)(void *data, struct rarch_viewport *vp);
|
||||||
|
|
||||||
|
@ -1455,30 +1455,6 @@ static void *d3d_init(const video_info_t *info, const input_driver_t **input,
|
|||||||
return vid;
|
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 = {
|
const video_driver_t video_d3d = {
|
||||||
d3d_init,
|
d3d_init,
|
||||||
d3d_frame,
|
d3d_frame,
|
||||||
@ -1488,9 +1464,6 @@ const video_driver_t video_d3d = {
|
|||||||
d3d_set_shader,
|
d3d_set_shader,
|
||||||
d3d_free,
|
d3d_free,
|
||||||
"d3d",
|
"d3d",
|
||||||
#ifdef HAVE_MENU
|
|
||||||
d3d_restart,
|
|
||||||
#endif
|
|
||||||
d3d_set_rotation,
|
d3d_set_rotation,
|
||||||
d3d_viewport_info,
|
d3d_viewport_info,
|
||||||
d3d_read_viewport,
|
d3d_read_viewport,
|
||||||
|
18
gfx/gl.c
18
gfx/gl.c
@ -2633,21 +2633,6 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
|
|||||||
}
|
}
|
||||||
#endif
|
#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
|
#ifdef HAVE_OVERLAY
|
||||||
static void gl_free_overlay(gl_t *gl);
|
static void gl_free_overlay(gl_t *gl);
|
||||||
static bool gl_overlay_load(void *data, const struct texture_image *images, unsigned num_images)
|
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_free,
|
||||||
"gl",
|
"gl",
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
gl_restart,
|
|
||||||
#endif
|
|
||||||
gl_set_rotation,
|
gl_set_rotation,
|
||||||
|
|
||||||
gl_viewport_info,
|
gl_viewport_info,
|
||||||
|
@ -943,10 +943,6 @@ const video_driver_t video_lima = {
|
|||||||
lima_gfx_free,
|
lima_gfx_free,
|
||||||
"lima",
|
"lima",
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
NULL, /* restart */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lima_gfx_set_rotation,
|
lima_gfx_set_rotation,
|
||||||
lima_gfx_viewport_info,
|
lima_gfx_viewport_info,
|
||||||
NULL, /* read_viewport */
|
NULL, /* read_viewport */
|
||||||
|
@ -62,10 +62,6 @@ static void null_gfx_free(void *data)
|
|||||||
(void)data;
|
(void)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
static void null_gfx_restart(void) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const video_driver_t video_null = {
|
const video_driver_t video_null = {
|
||||||
null_gfx_init,
|
null_gfx_init,
|
||||||
null_gfx_frame,
|
null_gfx_frame,
|
||||||
@ -76,8 +72,5 @@ const video_driver_t video_null = {
|
|||||||
null_gfx_free,
|
null_gfx_free,
|
||||||
"null",
|
"null",
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
null_gfx_restart,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -888,10 +888,6 @@ const video_driver_t video_omap = {
|
|||||||
omap_gfx_free,
|
omap_gfx_free,
|
||||||
"omap",
|
"omap",
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
NULL, /* restart */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NULL, /* set_rotation */
|
NULL, /* set_rotation */
|
||||||
omap_gfx_viewport_info,
|
omap_gfx_viewport_info,
|
||||||
NULL, /* read_viewport */
|
NULL, /* read_viewport */
|
||||||
|
@ -791,11 +791,6 @@ static void thread_get_poke_interface(void *data, const video_poke_interface_t *
|
|||||||
*iface = NULL;
|
*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 = {
|
static const video_driver_t video_thread = {
|
||||||
thread_init_never_call, // Should never be called directly.
|
thread_init_never_call, // Should never be called directly.
|
||||||
thread_frame,
|
thread_frame,
|
||||||
@ -805,9 +800,6 @@ static const video_driver_t video_thread = {
|
|||||||
thread_set_shader,
|
thread_set_shader,
|
||||||
thread_free,
|
thread_free,
|
||||||
"Thread wrapper",
|
"Thread wrapper",
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
thread_restart,
|
|
||||||
#endif
|
|
||||||
thread_set_rotation,
|
thread_set_rotation,
|
||||||
thread_viewport_info,
|
thread_viewport_info,
|
||||||
thread_read_viewport,
|
thread_read_viewport,
|
||||||
|
@ -472,8 +472,6 @@ static void gx_efb_screenshot(void)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void gx_restart(void) { }
|
|
||||||
|
|
||||||
static void *gx_init(const video_info_t *video,
|
static void *gx_init(const video_info_t *video,
|
||||||
const input_driver_t **input, void **input_data)
|
const input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
@ -1259,7 +1257,6 @@ const video_driver_t video_gx = {
|
|||||||
.ident = "gx",
|
.ident = "gx",
|
||||||
.set_rotation = gx_set_rotation,
|
.set_rotation = gx_set_rotation,
|
||||||
.viewport_info = gx_viewport_info,
|
.viewport_info = gx_viewport_info,
|
||||||
.restart = gx_restart,
|
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
.overlay_interface = gx_get_overlay_interface,
|
.overlay_interface = gx_get_overlay_interface,
|
||||||
#endif
|
#endif
|
||||||
|
@ -410,10 +410,6 @@ static void psp_free(void *data)
|
|||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
static void psp_restart(void) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void psp_set_rotation(void *data, unsigned rotation)
|
static void psp_set_rotation(void *data, unsigned rotation)
|
||||||
{
|
{
|
||||||
psp1_video_t *psp = (psp1_video_t*)data;
|
psp1_video_t *psp = (psp1_video_t*)data;
|
||||||
@ -516,10 +512,6 @@ const video_driver_t video_psp1 = {
|
|||||||
psp_free,
|
psp_free,
|
||||||
"psp1",
|
"psp1",
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
psp_restart,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
psp_set_rotation,
|
psp_set_rotation,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -1385,10 +1385,6 @@ static void psp2_free(void *data)
|
|||||||
free(psp->g_initializeHostMem);
|
free(psp->g_initializeHostMem);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
static void psp2_restart(void) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void psp2_set_rotation(void *data, unsigned rotation)
|
static void psp2_set_rotation(void *data, unsigned rotation)
|
||||||
{
|
{
|
||||||
psp2_video_t *psp = (psp2_video_t*)data;
|
psp2_video_t *psp = (psp2_video_t*)data;
|
||||||
@ -1405,10 +1401,6 @@ const video_driver_t video_psp2 = {
|
|||||||
psp2_free,
|
psp2_free,
|
||||||
"psp2",
|
"psp2",
|
||||||
|
|
||||||
#if defined(HAVE_MENU)
|
|
||||||
psp2_restart,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
psp2_set_rotation,
|
psp2_set_rotation,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -1243,28 +1243,6 @@ static void *d3d_init(const video_info_t *info, const input_driver_t **input, vo
|
|||||||
return vid;
|
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 = {
|
const video_driver_t video_d3d = {
|
||||||
d3d_init,
|
d3d_init,
|
||||||
d3d_frame,
|
d3d_frame,
|
||||||
@ -1274,7 +1252,6 @@ const video_driver_t video_d3d = {
|
|||||||
d3d_set_shader,
|
d3d_set_shader,
|
||||||
d3d_free,
|
d3d_free,
|
||||||
"d3d",
|
"d3d",
|
||||||
d3d_restart,
|
|
||||||
d3d_set_rotation,
|
d3d_set_rotation,
|
||||||
NULL, /* viewport_info */
|
NULL, /* viewport_info */
|
||||||
NULL, /* read_viewport */
|
NULL, /* read_viewport */
|
||||||
|
Loading…
Reference in New Issue
Block a user