mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-12 04:46:39 +00:00
(RARCH_CONSOLE) Get rid of video_stop_func
This commit is contained in:
parent
1e22908756
commit
34619412bc
3
driver.c
3
driver.c
@ -343,9 +343,6 @@ void global_uninit_drivers(void)
|
||||
{
|
||||
if (driver.video_data)
|
||||
{
|
||||
#ifdef RARCH_CONSOLE
|
||||
driver.video->stop();
|
||||
#endif
|
||||
driver.video_data = NULL;
|
||||
}
|
||||
|
||||
|
1
driver.h
1
driver.h
@ -368,7 +368,6 @@ typedef struct video_driver
|
||||
|
||||
#if defined(HAVE_RMENU) || defined(HAVE_RGUI)
|
||||
void (*start)(void);
|
||||
void (*stop)(void);
|
||||
void (*restart)(void);
|
||||
#endif
|
||||
|
||||
|
@ -122,7 +122,6 @@ static inline bool input_key_pressed_func(int key)
|
||||
#define video_free_func() MAKENAME_VIDEO(_free)(driver.video_data)
|
||||
#define video_set_nonblock_state_func(state) MAKENAME_VIDEO(_set_nonblock_state)(driver.video_data, state)
|
||||
#define video_set_rotation_func(rotation) MAKENAME_VIDEO(_set_rotation)(driver.video_data, rotation)
|
||||
#define video_stop_func() MAKENAME_VIDEO(_stop)()
|
||||
#define video_start_func() MAKENAME_VIDEO(_start)()
|
||||
#define video_set_shader_func(type, path) MAKENAME_VIDEO(_set_shader)(driver.video_data, type, path)
|
||||
#define video_xml_shader_func(path) driver.video->xml_shader(driver.video_data, path)
|
||||
|
@ -912,6 +912,17 @@ static bool osk_callback_enter_filename_init(void *data)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static void rgui_init_textures(void)
|
||||
{
|
||||
#ifdef HAVE_MENU_PANEL
|
||||
texture_image_load("D:\\Media\\menuMainRomSelectPanel.png", menu_panel);
|
||||
#endif
|
||||
texture_image_load(g_extern.menu_texture_path, menu_texture);
|
||||
|
||||
if (driver.video_poke && driver.video_poke->set_texture_frame)
|
||||
driver.video_poke->set_texture_frame(driver.video_data, menu_texture->pixels,
|
||||
true, menu_texture->width, menu_texture->height, 1.0f);
|
||||
}
|
||||
|
||||
static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t input)
|
||||
{
|
||||
@ -939,7 +950,9 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK);
|
||||
}
|
||||
|
||||
|
||||
driver.video->restart();
|
||||
rgui_init_textures();
|
||||
}
|
||||
break;
|
||||
case SETTING_PAL60_MODE:
|
||||
@ -959,6 +972,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
|
||||
}
|
||||
|
||||
driver.video->restart();
|
||||
rgui_init_textures();
|
||||
}
|
||||
}
|
||||
|
||||
@ -968,7 +982,9 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
|
||||
{
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK);
|
||||
|
||||
driver.video->restart();
|
||||
rgui_init_textures();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1110,14 +1126,19 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
|
||||
if ((input & (1ULL << DEVICE_NAV_LEFT)) || (input & (1ULL << DEVICE_NAV_RIGHT)) || (input & (1ULL << DEVICE_NAV_B)))
|
||||
{
|
||||
settings_set(1ULL << S_TRIPLE_BUFFERING);
|
||||
|
||||
driver.video->restart();
|
||||
rgui_init_textures();
|
||||
}
|
||||
if (input & (1ULL << DEVICE_NAV_START))
|
||||
{
|
||||
settings_set(1ULL << S_DEF_TRIPLE_BUFFERING);
|
||||
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE)))
|
||||
{
|
||||
driver.video->restart();
|
||||
rgui_init_textures();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SETTING_DEFAULT_VIDEO_ALL:
|
||||
@ -3162,6 +3183,7 @@ int rgui_iterate(rgui_handle_t *rgui)
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
rgui_handle_t *rgui_init(void)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)calloc(1, sizeof(*rgui));
|
||||
@ -3171,14 +3193,10 @@ rgui_handle_t *rgui_init(void)
|
||||
menu_texture = (struct texture_image*)calloc(1, sizeof(*menu_texture));
|
||||
#ifdef HAVE_MENU_PANEL
|
||||
menu_panel = (struct texture_image*)calloc(1, sizeof(*menu_panel));
|
||||
texture_image_load("D:\\Media\\menuMainRomSelectPanel.png", menu_panel);
|
||||
#endif
|
||||
|
||||
texture_image_load(g_extern.menu_texture_path, menu_texture);
|
||||
rgui_init_textures();
|
||||
|
||||
if (driver.video_poke && driver.video_poke->set_texture_frame)
|
||||
driver.video_poke->set_texture_frame(driver.video_data, menu_texture->pixels,
|
||||
true, menu_texture->width, menu_texture->height, 1.0f);
|
||||
|
||||
#ifdef HAVE_OSKUTIL
|
||||
oskutil_params *osk = &g_extern.console.misc.oskutil_handle;
|
||||
|
12
gfx/gl.c
12
gfx/gl.c
@ -2097,13 +2097,6 @@ static void gl_start(void)
|
||||
gl->font_ctx = gl_font_init_first(gl, g_settings.video.font_path, g_settings.video.font_size);
|
||||
}
|
||||
|
||||
static void gl_stop(void)
|
||||
{
|
||||
void *data = driver.video_data;
|
||||
driver.video_data = NULL;
|
||||
gl_free(data);
|
||||
}
|
||||
|
||||
static void gl_restart(void)
|
||||
{
|
||||
gl_t *gl = (gl_t*)driver.video_data;
|
||||
@ -2111,7 +2104,9 @@ static void gl_restart(void)
|
||||
if (!gl)
|
||||
return;
|
||||
|
||||
gl_stop();
|
||||
void *data = driver.video_data;
|
||||
driver.video_data = NULL;
|
||||
gl_free(data);
|
||||
#ifdef HAVE_CG
|
||||
gl_cg_invalidate_context();
|
||||
#endif
|
||||
@ -2405,7 +2400,6 @@ const video_driver_t video_gl = {
|
||||
|
||||
#if defined(HAVE_RGUI) || defined(HAVE_RMENU)
|
||||
gl_start,
|
||||
gl_stop,
|
||||
gl_restart,
|
||||
#endif
|
||||
gl_set_rotation,
|
||||
|
@ -65,7 +65,6 @@ static void null_gfx_free(void *data)
|
||||
#ifdef RARCH_CONSOLE
|
||||
static void null_gfx_start(void) {}
|
||||
static void null_gfx_restart(void) {}
|
||||
static void null_gfx_stop(void) {}
|
||||
#endif
|
||||
|
||||
const video_driver_t video_null = {
|
||||
@ -80,7 +79,6 @@ const video_driver_t video_null = {
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
null_gfx_start,
|
||||
null_gfx_stop,
|
||||
null_gfx_restart,
|
||||
#endif
|
||||
};
|
||||
|
@ -706,7 +706,6 @@ static void thread_get_poke_interface(void *data, const video_poke_interface_t *
|
||||
// all stubs for now, might not have to implement them unless we want to port this to consoles
|
||||
static void thread_start(void) {}
|
||||
static void thread_stop(void) {}
|
||||
static void thread_restart(void) {}
|
||||
#endif
|
||||
|
||||
static const video_driver_t video_thread = {
|
||||
@ -721,7 +720,6 @@ static const video_driver_t video_thread = {
|
||||
#if defined(HAVE_RMENU) || defined(HAVE_RGUI)
|
||||
thread_start,
|
||||
thread_stop,
|
||||
thread_restart,
|
||||
#endif
|
||||
thread_set_rotation,
|
||||
thread_viewport_info,
|
||||
|
@ -416,22 +416,6 @@ static void gx_efb_screenshot(void)
|
||||
|
||||
#endif
|
||||
|
||||
static void gx_stop(void)
|
||||
{
|
||||
#ifdef TAKE_EFB_SCREENSHOT_ON_EXIT
|
||||
gx_efb_screenshot();
|
||||
#endif
|
||||
GX_DrawDone();
|
||||
GX_AbortFrame();
|
||||
GX_Flush();
|
||||
VIDEO_SetBlack(true);
|
||||
VIDEO_Flush();
|
||||
VIDEO_WaitVSync();
|
||||
|
||||
for (unsigned i = 0; i < 2; i++)
|
||||
free(MEM_K1_TO_K0(g_framebuf[i]));
|
||||
}
|
||||
|
||||
static void gx_restart(void)
|
||||
{
|
||||
}
|
||||
@ -1017,6 +1001,18 @@ static bool gx_focus(void *data)
|
||||
static void gx_free(void *data)
|
||||
{
|
||||
(void)data;
|
||||
#ifdef TAKE_EFB_SCREENSHOT_ON_EXIT
|
||||
gx_efb_screenshot();
|
||||
#endif
|
||||
GX_DrawDone();
|
||||
GX_AbortFrame();
|
||||
GX_Flush();
|
||||
VIDEO_SetBlack(true);
|
||||
VIDEO_Flush();
|
||||
VIDEO_WaitVSync();
|
||||
|
||||
for (unsigned i = 0; i < 2; i++)
|
||||
free(MEM_K1_TO_K0(g_framebuf[i]));
|
||||
}
|
||||
|
||||
static void gx_set_rotation(void *data, unsigned orientation)
|
||||
@ -1093,7 +1089,6 @@ const video_driver_t video_gx = {
|
||||
.set_rotation = gx_set_rotation,
|
||||
.viewport_info = gx_viewport_info,
|
||||
.start = gx_start,
|
||||
.stop = gx_stop,
|
||||
.restart = gx_restart,
|
||||
.poke_interface = gx_get_poke_interface,
|
||||
};
|
||||
|
@ -181,7 +181,6 @@ static void psp_free(void *data)
|
||||
#ifdef RARCH_CONSOLE
|
||||
static void psp_start(void) {}
|
||||
static void psp_restart(void) {}
|
||||
static void psp_stop(void) {}
|
||||
#endif
|
||||
|
||||
static void psp_set_rotation(void *data, unsigned rotation)
|
||||
@ -200,7 +199,6 @@ const video_driver_t video_psp1 = {
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
psp_start,
|
||||
psp_stop,
|
||||
psp_restart,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -515,7 +515,6 @@ static void vita_gfx_free(void *data)
|
||||
#ifdef RARCH_CONSOLE
|
||||
static void vita_gfx_start(void) {}
|
||||
static void vita_gfx_restart(void) {}
|
||||
static void vita_gfx_stop(void) {}
|
||||
#endif
|
||||
|
||||
const video_driver_t video_vita = {
|
||||
@ -530,7 +529,6 @@ const video_driver_t video_vita = {
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
vita_gfx_start,
|
||||
vita_gfx_stop,
|
||||
vita_gfx_restart,
|
||||
#endif
|
||||
};
|
||||
|
@ -1168,15 +1168,6 @@ static void xdk_d3d_start(void)
|
||||
d3d->font_ctx = d3d_font_init_first(d3d, g_settings.video.font_path, 0 /* font size - fixed/unused */);
|
||||
}
|
||||
|
||||
static void xdk_d3d_stop(void)
|
||||
{
|
||||
void *data = driver.video_data;
|
||||
|
||||
xdk_d3d_free(data);
|
||||
|
||||
driver.video_data = NULL;
|
||||
}
|
||||
|
||||
static void xdk_d3d_restart(void)
|
||||
{
|
||||
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
|
||||
@ -1213,7 +1204,6 @@ const video_driver_t video_xdk_d3d = {
|
||||
xdk_d3d_free,
|
||||
"xdk_d3d",
|
||||
xdk_d3d_start,
|
||||
xdk_d3d_stop,
|
||||
xdk_d3d_restart,
|
||||
xdk_d3d_set_rotation,
|
||||
NULL, /* viewport_info */
|
||||
|
Loading…
Reference in New Issue
Block a user