mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
(RARCH_CONSOLE) Make find_video_driver public in scope and use
it in console ports
This commit is contained in:
parent
e74fc47b9a
commit
9251eebe13
@ -1033,13 +1033,13 @@ static void set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
if(gfx_ctx_check_resolution(CELL_VIDEO_OUT_RESOLUTION_576))
|
||||
{
|
||||
//ps3graphics_set_pal60hz(Settings.PS3PALTemporalMode60Hz);
|
||||
video_ptr.restart();
|
||||
driver.video->restart();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//ps3graphics_set_pal60hz(0);
|
||||
video_ptr.restart();
|
||||
driver.video->restart();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1275,7 +1275,7 @@ static void set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
|
||||
{
|
||||
rarch_settings_change(S_TRIPLE_BUFFERING);
|
||||
video_ptr.restart();
|
||||
driver.video->restart();
|
||||
}
|
||||
if(input & (1ULL << RMENU_DEVICE_NAV_START))
|
||||
{
|
||||
@ -1283,7 +1283,7 @@ static void set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
rarch_settings_default(S_DEF_TRIPLE_BUFFERING);
|
||||
|
||||
if(!old_buffer_input)
|
||||
video_ptr.restart();
|
||||
driver.video->restart();
|
||||
}
|
||||
break;
|
||||
case SETTING_ENABLE_SCREENSHOTS:
|
||||
@ -2112,19 +2112,19 @@ int ingame_menu(void *data, void *state)
|
||||
if(input & (1ULL << RMENU_DEVICE_NAV_LEFT))
|
||||
{
|
||||
rarch_settings_change(S_ROTATION_DECREMENT);
|
||||
video_ptr.set_rotation(NULL, g_extern.console.screen.orientation);
|
||||
driver.video->set_rotation(NULL, g_extern.console.screen.orientation);
|
||||
}
|
||||
|
||||
if((input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
|
||||
{
|
||||
rarch_settings_change(S_ROTATION_INCREMENT);
|
||||
video_ptr.set_rotation(NULL, g_extern.console.screen.orientation);
|
||||
driver.video->set_rotation(NULL, g_extern.console.screen.orientation);
|
||||
}
|
||||
|
||||
if(input & (1ULL << RMENU_DEVICE_NAV_START))
|
||||
{
|
||||
rarch_settings_default(S_DEF_ROTATION);
|
||||
video_ptr.set_rotation(NULL, g_extern.console.screen.orientation);
|
||||
driver.video->set_rotation(NULL, g_extern.console.screen.orientation);
|
||||
}
|
||||
snprintf(strw_buffer, sizeof(strw_buffer), "Press [%s] to reset back to default values.", rarch_input_find_platform_key_label(1ULL << RETRO_DEVICE_ID_JOYPAD_START));
|
||||
break;
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#if defined(HAVE_OPENGL)
|
||||
#define DEVICE_CAST gl_t*
|
||||
#define video_ptr video_gl
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
@ -29,9 +28,6 @@
|
||||
#elif defined(_XBOX1)
|
||||
#define DEVICE_CAST xdk_d3d_video_t*
|
||||
#define input_ptr input_xinput
|
||||
#define video_ptr video_xdk_d3d
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
|
2
driver.c
2
driver.c
@ -169,7 +169,7 @@ static void find_audio_driver(void)
|
||||
rarch_fail(1, "find_audio_driver()");
|
||||
}
|
||||
|
||||
static void find_video_driver(void)
|
||||
void find_video_driver(void)
|
||||
{
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(video_drivers); i++)
|
||||
{
|
||||
|
2
driver.h
2
driver.h
@ -319,6 +319,8 @@ void init_drivers(void);
|
||||
void init_drivers_pre(void);
|
||||
void uninit_drivers(void);
|
||||
|
||||
void find_video_driver(void);
|
||||
|
||||
void init_video_input(void);
|
||||
void uninit_video_input(void);
|
||||
void init_audio(void);
|
||||
|
@ -278,7 +278,7 @@ static bool rmenu_iterate(void)
|
||||
static bool first_held = false;
|
||||
|
||||
g_extern.draw_menu = true;
|
||||
video_gx.apply_state_changes();
|
||||
driver.video->apply_state_changes();
|
||||
|
||||
g_extern.frame_count++;
|
||||
|
||||
@ -501,8 +501,8 @@ int main(int argc, char *argv[])
|
||||
config_set_defaults();
|
||||
input_gx.init();
|
||||
|
||||
video_gx.start();
|
||||
driver.video = &video_gx;
|
||||
find_video_driver();
|
||||
driver.video->start();
|
||||
|
||||
gx_video_t *gx = (gx_video_t*)driver.video_data;
|
||||
gx->menu_data = (uint32_t *) menu_framebuf;
|
||||
@ -607,8 +607,7 @@ begin_shutdown:
|
||||
rarch_main_deinit();
|
||||
|
||||
input_gx.free(NULL);
|
||||
|
||||
video_gx.stop();
|
||||
driver.video->stop();
|
||||
menu_free();
|
||||
|
||||
#ifdef HAVE_LOGGER
|
||||
|
@ -319,8 +319,8 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
#endif
|
||||
|
||||
video_gl.start();
|
||||
driver.video = &video_gl;
|
||||
find_video_driver();
|
||||
driver.video->start();
|
||||
|
||||
#ifdef HAVE_OSKUTIL
|
||||
oskutil_params *osk = &g_extern.console.misc.oskutil_handle;
|
||||
@ -387,7 +387,7 @@ begin_shutdown:
|
||||
rarch_main_deinit();
|
||||
|
||||
input_ps3.free(NULL);
|
||||
video_gl.stop();
|
||||
driver.video->stop();
|
||||
menu_free();
|
||||
|
||||
#ifdef HAVE_OSKUTIL
|
||||
|
@ -159,8 +159,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
input_psp.post_init();
|
||||
|
||||
video_psp1.start();
|
||||
driver.video = &video_psp1;
|
||||
find_video_driver();
|
||||
driver.video->start();
|
||||
|
||||
menu_init();
|
||||
|
||||
@ -207,7 +207,7 @@ begin_shutdown:
|
||||
rarch_main_deinit();
|
||||
|
||||
input_psp.free(NULL);
|
||||
video_psp1.stop();
|
||||
driver.video->stop();
|
||||
menu_free();
|
||||
|
||||
g_extern.verbose = false;
|
||||
|
@ -175,13 +175,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
input_xinput.post_init();
|
||||
|
||||
#if defined(HAVE_D3D9) || defined(HAVE_D3D8)
|
||||
video_xdk_d3d.start();
|
||||
driver.video = &video_xdk_d3d;
|
||||
#else
|
||||
video_null.start();
|
||||
driver.video = &video_null;
|
||||
#endif
|
||||
find_video_driver();
|
||||
driver.video->start();
|
||||
|
||||
system_init();
|
||||
|
||||
@ -229,11 +224,7 @@ begin_shutdown:
|
||||
config_save_file(g_extern.config_path);
|
||||
|
||||
menu_free();
|
||||
#if defined(HAVE_D3D8) || defined(HAVE_D3D9)
|
||||
video_xdk_d3d.stop();
|
||||
#else
|
||||
video_null.stop();
|
||||
#endif
|
||||
driver.video->stop();
|
||||
input_xinput.free(NULL);
|
||||
|
||||
if(g_extern.console.external_launch.enable)
|
||||
|
Loading…
x
Reference in New Issue
Block a user