From 28bef36c74d90375f8f868a697daa898d965cf1c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 10 Nov 2021 01:18:03 +0100 Subject: [PATCH] Remove retroarch_data.h and retroarch_fwd_decls.h --- menu/drivers/ozone.c | 4 +- menu/drivers/xmb.c | 2 +- retroarch.c | 396 +++++++++++++++++++++++++++++++++++++++++- retroarch.h | 4 - retroarch_data.h | 339 ------------------------------------ retroarch_fwd_decls.h | 54 ------ 6 files changed, 393 insertions(+), 406 deletions(-) delete mode 100644 retroarch_data.h delete mode 100644 retroarch_fwd_decls.h diff --git a/menu/drivers/ozone.c b/menu/drivers/ozone.c index 63856ae515..833febbf23 100644 --- a/menu/drivers/ozone.c +++ b/menu/drivers/ozone.c @@ -2088,8 +2088,8 @@ static uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone, if (type < (input_id + RARCH_ANALOG_BIND_LIST_END)) { unsigned index = 0; - int input_num = type - input_id; - for (index = 0; index < sizeof(input_config_bind_order); index++) + int input_num = type - input_id; + for (index = 0; index < ARRAY_SIZE(input_config_bind_order); index++) { if (input_config_bind_order[index] == input_num) { diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index a1771ba4c2..ed12b0adf9 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3041,7 +3041,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, if (type < (input_id + RARCH_ANALOG_BIND_LIST_END)) { unsigned index = 0; - int input_num = type - input_id; + int input_num = type - input_id; for (index = 0; index < ARRAY_SIZE(input_config_bind_order); index++) { if (input_config_bind_order[index] == input_num) diff --git a/retroarch.c b/retroarch.c index 1ce166a3d1..d26365455c 100644 --- a/retroarch.c +++ b/retroarch.c @@ -240,15 +240,43 @@ #include "SDL.h" #endif -/* RetroArch global state / macros */ -#include "retroarch_data.h" -/* Forward declarations */ -#include "retroarch_fwd_decls.h" - #ifdef HAVE_LAKKA #include "lakka.h" #endif +#define DRIVERS_CMD_ALL \ + ( DRIVER_AUDIO_MASK \ + | DRIVER_VIDEO_MASK \ + | DRIVER_INPUT_MASK \ + | DRIVER_CAMERA_MASK \ + | DRIVER_LOCATION_MASK \ + | DRIVER_MENU_MASK \ + | DRIVERS_VIDEO_INPUT_MASK \ + | DRIVER_BLUETOOTH_MASK \ + | DRIVER_WIFI_MASK \ + | DRIVER_LED_MASK \ + | DRIVER_MIDI_MASK ) + +#define DRIVERS_CMD_ALL_BUT_MENU \ + ( DRIVER_AUDIO_MASK \ + | DRIVER_VIDEO_MASK \ + | DRIVER_INPUT_MASK \ + | DRIVER_CAMERA_MASK \ + | DRIVER_LOCATION_MASK \ + | DRIVERS_VIDEO_INPUT_MASK \ + | DRIVER_BLUETOOTH_MASK \ + | DRIVER_WIFI_MASK \ + | DRIVER_LED_MASK \ + | DRIVER_MIDI_MASK ) + + +#define _PSUPP(var, name, desc) printf(" %s:\n\t\t%s: %s\n", name, desc, var ? "yes" : "no") + +#define FAIL_CPU(simd_type) do { \ + RARCH_ERR(simd_type " code is compiled in, but CPU does not support this feature. Cannot continue.\n"); \ + retroarch_fail(1, "validate_cpu_features()"); \ +} while (0) + #define SHADER_FILE_WATCH_DELAY_MSEC 500 #define QUIT_DELAY_USEC 3 * 1000000 /* 3 seconds */ @@ -256,10 +284,366 @@ #define DEFAULT_NETWORK_GAMEPAD_PORT 55400 #define UDP_FRAME_PACKETS 16 -/* Custom forward declarations */ +#ifdef HAVE_ZLIB +#define DEFAULT_EXT "zip" +#else +#define DEFAULT_EXT "" +#endif + +#ifdef HAVE_DYNAMIC +#define SYMBOL(x) do { \ + function_t func = dylib_proc(lib_handle_local, #x); \ + memcpy(¤t_core->x, &func, sizeof(func)); \ + if (!current_core->x) { RARCH_ERR("Failed to load symbol: \"%s\"\n", #x); retroarch_fail(1, "init_libretro_symbols()"); } \ +} while (0) +#else +#define SYMBOL(x) current_core->x = x +#endif + +#define SYMBOL_DUMMY(x) current_core->x = libretro_dummy_##x + +#ifdef HAVE_FFMPEG +#define SYMBOL_FFMPEG(x) current_core->x = libretro_ffmpeg_##x +#endif + +#ifdef HAVE_MPV +#define SYMBOL_MPV(x) current_core->x = libretro_mpv_##x +#endif + +#ifdef HAVE_IMAGEVIEWER +#define SYMBOL_IMAGEVIEWER(x) current_core->x = libretro_imageviewer_##x +#endif + +#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD) +#define SYMBOL_NETRETROPAD(x) current_core->x = libretro_netretropad_##x +#endif + +#if defined(HAVE_VIDEOPROCESSOR) +#define SYMBOL_VIDEOPROCESSOR(x) current_core->x = libretro_videoprocessor_##x +#endif + +#ifdef HAVE_GONG +#define SYMBOL_GONG(x) current_core->x = libretro_gong_##x +#endif + +#define CORE_SYMBOLS(x) \ + x(retro_init); \ + x(retro_deinit); \ + x(retro_api_version); \ + x(retro_get_system_info); \ + x(retro_get_system_av_info); \ + x(retro_set_environment); \ + x(retro_set_video_refresh); \ + x(retro_set_audio_sample); \ + x(retro_set_audio_sample_batch); \ + x(retro_set_input_poll); \ + x(retro_set_input_state); \ + x(retro_set_controller_port_device); \ + x(retro_reset); \ + x(retro_run); \ + x(retro_serialize_size); \ + x(retro_serialize); \ + x(retro_unserialize); \ + x(retro_cheat_reset); \ + x(retro_cheat_set); \ + x(retro_load_game); \ + x(retro_load_game_special); \ + x(retro_unload_game); \ + x(retro_get_region); \ + x(retro_get_memory_data); \ + x(retro_get_memory_size); + +#define FFMPEG_RECORD_ARG "r:" + +#ifdef HAVE_DYNAMIC +#define DYNAMIC_ARG "L:" +#else +#define DYNAMIC_ARG +#endif + +#ifdef HAVE_NETWORKING +#define NETPLAY_ARG "HC:F:" +#else +#define NETPLAY_ARG +#endif + +#ifdef HAVE_CONFIGFILE +#define CONFIG_FILE_ARG "c:" +#else +#define CONFIG_FILE_ARG +#endif + +#ifdef HAVE_BSV_MOVIE +#define BSV_MOVIE_ARG "P:R:M:" +#else +#define BSV_MOVIE_ARG +#endif + +/* Griffin hack */ +#ifdef HAVE_QT +#ifndef HAVE_MAIN +#define HAVE_MAIN +#endif +#endif + +/* DRIVERS */ +static bluetooth_driver_t bluetooth_null = { + NULL, /* init */ + NULL, /* free */ + NULL, /* scan */ + NULL, /* get_devices */ + NULL, /* device_is_connected */ + NULL, /* device_get_sublabel */ + NULL, /* connect_device */ + "null", +}; + +static const bluetooth_driver_t *bluetooth_drivers[] = { +#ifdef HAVE_BLUETOOTH + &bluetooth_bluetoothctl, +#ifdef HAVE_DBUS + &bluetooth_bluez, +#endif +#endif + &bluetooth_null, + NULL, +}; + +static wifi_driver_t wifi_null = { + NULL, /* init */ + NULL, /* free */ + NULL, /* start */ + NULL, /* stop */ + NULL, /* enable */ + NULL, /* connection_info */ + NULL, /* scan */ + NULL, /* get_ssids */ + NULL, /* ssid_is_online */ + NULL, /* connect_ssid */ + NULL, /* disconnect_ssid */ + NULL, /* tether_start_stop */ + "null", +}; + +static const wifi_driver_t *wifi_drivers[] = { +#ifdef HAVE_LAKKA + &wifi_connmanctl, +#endif +#ifdef HAVE_WIFI + &wifi_nmcli, +#endif + &wifi_null, + NULL, +}; + +static ui_companion_driver_t ui_companion_null = { + NULL, /* init */ + NULL, /* deinit */ + NULL, /* toggle */ + NULL, /* event_command */ + NULL, /* notify_content_loaded */ + NULL, /* notify_list_loaded */ + NULL, /* notify_refresh */ + NULL, /* msg_queue_push */ + NULL, /* render_messagebox */ + NULL, /* get_main_window */ + NULL, /* log_msg */ + NULL, /* is_active */ + NULL, /* browser_window */ + NULL, /* msg_window */ + NULL, /* window */ + NULL, /* application */ + "null", /* ident */ +}; + +static const ui_companion_driver_t *ui_companion_drivers[] = { +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) + &ui_companion_win32, +#endif +#if defined(OSX) + &ui_companion_cocoa, +#endif + &ui_companion_null, + NULL +}; + +static const record_driver_t record_null = { + NULL, /* new */ + NULL, /* free */ + NULL, /* push_video */ + NULL, /* push_audio */ + NULL, /* finalize */ + "null", +}; + +static const record_driver_t *record_drivers[] = { +#ifdef HAVE_FFMPEG + &record_ffmpeg, +#endif + &record_null, + NULL, +}; + +static void *nullcamera_init(const char *device, uint64_t caps, + unsigned width, unsigned height) { return (void*)-1; } +static void nullcamera_free(void *data) { } +static void nullcamera_stop(void *data) { } +static bool nullcamera_start(void *data) { return true; } +static bool nullcamera_poll(void *a, + retro_camera_frame_raw_framebuffer_t b, + retro_camera_frame_opengl_texture_t c) { return true; } + +static camera_driver_t camera_null = { + nullcamera_init, + nullcamera_free, + nullcamera_start, + nullcamera_stop, + nullcamera_poll, + "null", +}; + +static const camera_driver_t *camera_drivers[] = { +#ifdef HAVE_V4L2 + &camera_v4l2, +#endif +#ifdef EMSCRIPTEN + &camera_rwebcam, +#endif +#ifdef ANDROID + &camera_android, +#endif + &camera_null, + NULL, +}; + +/* MAIN GLOBAL VARIABLES */ +struct rarch_state +{ + struct global g_extern; /* retro_time_t alignment */ + struct retro_camera_callback camera_cb; /* uint64_t alignment */ + + const camera_driver_t *camera_driver; + void *camera_data; + + const ui_companion_driver_t *ui_companion; + void *ui_companion_data; + +#ifdef HAVE_QT + void *ui_companion_qt_data; +#endif + + const bluetooth_driver_t *bluetooth_driver; + void *bluetooth_data; + + const wifi_driver_t *wifi_driver; + void *wifi_data; + char *connect_host; /* Netplay hostname passed from CLI */ + + struct retro_perf_counter *perf_counters_rarch[MAX_COUNTERS]; + + jmp_buf error_sjlj_context; /* 4-byte alignment, + put it right before long */ +#ifdef HAVE_THREAD_STORAGE + sthread_tls_t rarch_tls; /* unsigned alignment */ +#endif + unsigned perf_ptr_rarch; + + char error_string[255]; + char launch_arguments[4096]; + char path_default_shader_preset[PATH_MAX_LENGTH]; + char path_content[PATH_MAX_LENGTH]; + char path_libretro[PATH_MAX_LENGTH]; + char path_config_file[PATH_MAX_LENGTH]; + char path_config_append_file[256]; + char path_core_options_file[PATH_MAX_LENGTH]; + char dir_system[PATH_MAX_LENGTH]; + char dir_savefile[PATH_MAX_LENGTH]; + char dir_savestate[PATH_MAX_LENGTH]; + bool has_set_username; + bool rarch_error_on_init; + bool has_set_verbosity; + bool has_set_libretro; + bool has_set_libretro_directory; + bool has_set_save_path; + bool has_set_state_path; +#ifdef HAVE_PATCH + bool has_set_ups_pref; + bool has_set_bps_pref; + bool has_set_ips_pref; +#endif +#ifdef HAVE_QT + bool qt_is_inited; +#endif + bool has_set_log_to_file; + bool rarch_ups_pref; + bool rarch_bps_pref; + bool rarch_ips_pref; + +#ifdef HAVE_CONFIGFILE + bool rarch_block_config_read; +#endif + bool location_driver_active; + bool bluetooth_driver_active; + bool wifi_driver_active; + bool camera_driver_active; + + bool streaming_enable; + bool main_ui_companion_is_on_foreground; +}; + +/* Forward declarations */ static bool recording_init(settings_t *settings, struct rarch_state *p_rarch); static bool recording_deinit(void); +static void retroarch_fail(int error_code, const char *error); + +#ifdef HAVE_LIBNX +void libnx_apply_overclock(void); +#endif + +static void retroarch_deinit_drivers(struct retro_callbacks *cbs); + +#ifdef HAVE_RUNAHEAD +#if defined(HAVE_DYNAMIC) || defined(HAVE_DYLIB) +static bool secondary_core_create(runloop_state_t *runloop_st, settings_t *settings); +static void secondary_core_destroy(runloop_state_t *runloop_st); +static bool secondary_core_ensure_exists( + runloop_state_t *runloop_st, settings_t *settings); +#endif +static int16_t input_state_get_last(unsigned port, + unsigned device, unsigned index, unsigned id); +#endif +static void retro_frame_null(const void *data, unsigned width, + unsigned height, size_t pitch); +static void retro_run_null(void); +static void retro_input_poll_null(void); +static void runloop_apply_fastmotion_override(runloop_state_t *p_runloop, settings_t *settings); + +static void uninit_libretro_symbols(struct retro_core_t *current_core); + +static bool init_libretro_symbols( + runloop_state_t *runloop_st, + enum rarch_core_type type, + struct retro_core_t *current_core); + +static void ui_companion_driver_toggle( + struct rarch_state *p_rarch, + bool desktop_menu_enable, + bool ui_companion_toggle, + bool force); + +static void ui_companion_driver_deinit(struct rarch_state *p_rarch); +static void ui_companion_driver_init_first(struct rarch_state *p_rarch); + +static bool core_load(unsigned poll_type_behavior); +static bool core_unload_game(void); + +static void driver_camera_stop(void); +static bool driver_camera_start(void); + +static const void *find_driver_nonempty( + const char *label, int i, + char *s, size_t len); static struct rarch_state rarch_st = {0}; diff --git a/retroarch.h b/retroarch.h index 424acc98de..c250b30f2b 100644 --- a/retroarch.h +++ b/retroarch.h @@ -182,10 +182,6 @@ void recording_driver_update_streaming_url(void); /* Video */ -#ifdef HAVE_OVERLAY -#include "input/input_overlay.h" -#endif - /* BSV Movie */ void bsv_movie_frame_rewind(void); diff --git a/retroarch_data.h b/retroarch_data.h deleted file mode 100644 index 39d6a6d7fd..0000000000 --- a/retroarch_data.h +++ /dev/null @@ -1,339 +0,0 @@ -#define DRIVERS_CMD_ALL \ - ( DRIVER_AUDIO_MASK \ - | DRIVER_VIDEO_MASK \ - | DRIVER_INPUT_MASK \ - | DRIVER_CAMERA_MASK \ - | DRIVER_LOCATION_MASK \ - | DRIVER_MENU_MASK \ - | DRIVERS_VIDEO_INPUT_MASK \ - | DRIVER_BLUETOOTH_MASK \ - | DRIVER_WIFI_MASK \ - | DRIVER_LED_MASK \ - | DRIVER_MIDI_MASK ) - -#define DRIVERS_CMD_ALL_BUT_MENU \ - ( DRIVER_AUDIO_MASK \ - | DRIVER_VIDEO_MASK \ - | DRIVER_INPUT_MASK \ - | DRIVER_CAMERA_MASK \ - | DRIVER_LOCATION_MASK \ - | DRIVERS_VIDEO_INPUT_MASK \ - | DRIVER_BLUETOOTH_MASK \ - | DRIVER_WIFI_MASK \ - | DRIVER_LED_MASK \ - | DRIVER_MIDI_MASK ) - - -#define _PSUPP(var, name, desc) printf(" %s:\n\t\t%s: %s\n", name, desc, var ? "yes" : "no") - -#define FAIL_CPU(simd_type) do { \ - RARCH_ERR(simd_type " code is compiled in, but CPU does not support this feature. Cannot continue.\n"); \ - retroarch_fail(1, "validate_cpu_features()"); \ -} while (0) - -#ifdef HAVE_ZLIB -#define DEFAULT_EXT "zip" -#else -#define DEFAULT_EXT "" -#endif - -#ifdef HAVE_DYNAMIC -#define SYMBOL(x) do { \ - function_t func = dylib_proc(lib_handle_local, #x); \ - memcpy(¤t_core->x, &func, sizeof(func)); \ - if (!current_core->x) { RARCH_ERR("Failed to load symbol: \"%s\"\n", #x); retroarch_fail(1, "init_libretro_symbols()"); } \ -} while (0) -#else -#define SYMBOL(x) current_core->x = x -#endif - -#define SYMBOL_DUMMY(x) current_core->x = libretro_dummy_##x - -#ifdef HAVE_FFMPEG -#define SYMBOL_FFMPEG(x) current_core->x = libretro_ffmpeg_##x -#endif - -#ifdef HAVE_MPV -#define SYMBOL_MPV(x) current_core->x = libretro_mpv_##x -#endif - -#ifdef HAVE_IMAGEVIEWER -#define SYMBOL_IMAGEVIEWER(x) current_core->x = libretro_imageviewer_##x -#endif - -#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD) -#define SYMBOL_NETRETROPAD(x) current_core->x = libretro_netretropad_##x -#endif - -#if defined(HAVE_VIDEOPROCESSOR) -#define SYMBOL_VIDEOPROCESSOR(x) current_core->x = libretro_videoprocessor_##x -#endif - -#ifdef HAVE_GONG -#define SYMBOL_GONG(x) current_core->x = libretro_gong_##x -#endif - -#define CORE_SYMBOLS(x) \ - x(retro_init); \ - x(retro_deinit); \ - x(retro_api_version); \ - x(retro_get_system_info); \ - x(retro_get_system_av_info); \ - x(retro_set_environment); \ - x(retro_set_video_refresh); \ - x(retro_set_audio_sample); \ - x(retro_set_audio_sample_batch); \ - x(retro_set_input_poll); \ - x(retro_set_input_state); \ - x(retro_set_controller_port_device); \ - x(retro_reset); \ - x(retro_run); \ - x(retro_serialize_size); \ - x(retro_serialize); \ - x(retro_unserialize); \ - x(retro_cheat_reset); \ - x(retro_cheat_set); \ - x(retro_load_game); \ - x(retro_load_game_special); \ - x(retro_unload_game); \ - x(retro_get_region); \ - x(retro_get_memory_data); \ - x(retro_get_memory_size); - -#define FFMPEG_RECORD_ARG "r:" - -#ifdef HAVE_DYNAMIC -#define DYNAMIC_ARG "L:" -#else -#define DYNAMIC_ARG -#endif - -#ifdef HAVE_NETWORKING -#define NETPLAY_ARG "HC:F:" -#else -#define NETPLAY_ARG -#endif - -#ifdef HAVE_CONFIGFILE -#define CONFIG_FILE_ARG "c:" -#else -#define CONFIG_FILE_ARG -#endif - -#ifdef HAVE_BSV_MOVIE -#define BSV_MOVIE_ARG "P:R:M:" -#else -#define BSV_MOVIE_ARG -#endif - -/* Griffin hack */ -#ifdef HAVE_QT -#ifndef HAVE_MAIN -#define HAVE_MAIN -#endif -#endif - -/* DRIVERS */ -static bluetooth_driver_t bluetooth_null = { - NULL, /* init */ - NULL, /* free */ - NULL, /* scan */ - NULL, /* get_devices */ - NULL, /* device_is_connected */ - NULL, /* device_get_sublabel */ - NULL, /* connect_device */ - "null", -}; - -static const bluetooth_driver_t *bluetooth_drivers[] = { -#ifdef HAVE_BLUETOOTH - &bluetooth_bluetoothctl, -#ifdef HAVE_DBUS - &bluetooth_bluez, -#endif -#endif - &bluetooth_null, - NULL, -}; - -static wifi_driver_t wifi_null = { - NULL, /* init */ - NULL, /* free */ - NULL, /* start */ - NULL, /* stop */ - NULL, /* enable */ - NULL, /* connection_info */ - NULL, /* scan */ - NULL, /* get_ssids */ - NULL, /* ssid_is_online */ - NULL, /* connect_ssid */ - NULL, /* disconnect_ssid */ - NULL, /* tether_start_stop */ - "null", -}; - -static const wifi_driver_t *wifi_drivers[] = { -#ifdef HAVE_LAKKA - &wifi_connmanctl, -#endif -#ifdef HAVE_WIFI - &wifi_nmcli, -#endif - &wifi_null, - NULL, -}; - -static ui_companion_driver_t ui_companion_null = { - NULL, /* init */ - NULL, /* deinit */ - NULL, /* toggle */ - NULL, /* event_command */ - NULL, /* notify_content_loaded */ - NULL, /* notify_list_loaded */ - NULL, /* notify_refresh */ - NULL, /* msg_queue_push */ - NULL, /* render_messagebox */ - NULL, /* get_main_window */ - NULL, /* log_msg */ - NULL, /* is_active */ - NULL, /* browser_window */ - NULL, /* msg_window */ - NULL, /* window */ - NULL, /* application */ - "null", /* ident */ -}; - -static const ui_companion_driver_t *ui_companion_drivers[] = { -#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) - &ui_companion_win32, -#endif -#if defined(OSX) - &ui_companion_cocoa, -#endif - &ui_companion_null, - NULL -}; - -static const record_driver_t record_null = { - NULL, /* new */ - NULL, /* free */ - NULL, /* push_video */ - NULL, /* push_audio */ - NULL, /* finalize */ - "null", -}; - -static const record_driver_t *record_drivers[] = { -#ifdef HAVE_FFMPEG - &record_ffmpeg, -#endif - &record_null, - NULL, -}; - -static void *nullcamera_init(const char *device, uint64_t caps, - unsigned width, unsigned height) { return (void*)-1; } -static void nullcamera_free(void *data) { } -static void nullcamera_stop(void *data) { } -static bool nullcamera_start(void *data) { return true; } -static bool nullcamera_poll(void *a, - retro_camera_frame_raw_framebuffer_t b, - retro_camera_frame_opengl_texture_t c) { return true; } - -static camera_driver_t camera_null = { - nullcamera_init, - nullcamera_free, - nullcamera_start, - nullcamera_stop, - nullcamera_poll, - "null", -}; - -static const camera_driver_t *camera_drivers[] = { -#ifdef HAVE_V4L2 - &camera_v4l2, -#endif -#ifdef EMSCRIPTEN - &camera_rwebcam, -#endif -#ifdef ANDROID - &camera_android, -#endif - &camera_null, - NULL, -}; - -/* MAIN GLOBAL VARIABLES */ -struct rarch_state -{ - struct global g_extern; /* retro_time_t alignment */ - struct retro_camera_callback camera_cb; /* uint64_t alignment */ - - const camera_driver_t *camera_driver; - void *camera_data; - - const ui_companion_driver_t *ui_companion; - void *ui_companion_data; - -#ifdef HAVE_QT - void *ui_companion_qt_data; -#endif - - const bluetooth_driver_t *bluetooth_driver; - void *bluetooth_data; - - const wifi_driver_t *wifi_driver; - void *wifi_data; - char *connect_host; /* Netplay hostname passed from CLI */ - - struct retro_perf_counter *perf_counters_rarch[MAX_COUNTERS]; - - jmp_buf error_sjlj_context; /* 4-byte alignment, - put it right before long */ -#ifdef HAVE_THREAD_STORAGE - sthread_tls_t rarch_tls; /* unsigned alignment */ -#endif - unsigned perf_ptr_rarch; - - char error_string[255]; - char launch_arguments[4096]; - char path_default_shader_preset[PATH_MAX_LENGTH]; - char path_content[PATH_MAX_LENGTH]; - char path_libretro[PATH_MAX_LENGTH]; - char path_config_file[PATH_MAX_LENGTH]; - char path_config_append_file[256]; - char path_core_options_file[PATH_MAX_LENGTH]; - char dir_system[PATH_MAX_LENGTH]; - char dir_savefile[PATH_MAX_LENGTH]; - char dir_savestate[PATH_MAX_LENGTH]; - bool has_set_username; - bool rarch_error_on_init; - bool has_set_verbosity; - bool has_set_libretro; - bool has_set_libretro_directory; - bool has_set_save_path; - bool has_set_state_path; -#ifdef HAVE_PATCH - bool has_set_ups_pref; - bool has_set_bps_pref; - bool has_set_ips_pref; -#endif -#ifdef HAVE_QT - bool qt_is_inited; -#endif - bool has_set_log_to_file; - bool rarch_ups_pref; - bool rarch_bps_pref; - bool rarch_ips_pref; - -#ifdef HAVE_CONFIGFILE - bool rarch_block_config_read; -#endif - bool location_driver_active; - bool bluetooth_driver_active; - bool wifi_driver_active; - bool camera_driver_active; - - bool streaming_enable; - bool main_ui_companion_is_on_foreground; -}; diff --git a/retroarch_fwd_decls.h b/retroarch_fwd_decls.h deleted file mode 100644 index 04798355b3..0000000000 --- a/retroarch_fwd_decls.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _RETROARCH_FWD_DECLS_H -#define _RETROARCH_FWD_DECLS_H - -static void retroarch_fail(int error_code, const char *error); - -#ifdef HAVE_LIBNX -void libnx_apply_overclock(void); -#endif - -static void retroarch_deinit_drivers(struct retro_callbacks *cbs); - -#ifdef HAVE_RUNAHEAD -#if defined(HAVE_DYNAMIC) || defined(HAVE_DYLIB) -static bool secondary_core_create(runloop_state_t *runloop_st, settings_t *settings); -static void secondary_core_destroy(runloop_state_t *runloop_st); -static bool secondary_core_ensure_exists( - runloop_state_t *runloop_st, settings_t *settings); -#endif -static int16_t input_state_get_last(unsigned port, - unsigned device, unsigned index, unsigned id); -#endif -static void retro_frame_null(const void *data, unsigned width, - unsigned height, size_t pitch); -static void retro_run_null(void); -static void retro_input_poll_null(void); -static void runloop_apply_fastmotion_override(runloop_state_t *p_runloop, settings_t *settings); - -static void uninit_libretro_symbols(struct retro_core_t *current_core); - -static bool init_libretro_symbols( - runloop_state_t *runloop_st, - enum rarch_core_type type, - struct retro_core_t *current_core); - -static void ui_companion_driver_toggle( - struct rarch_state *p_rarch, - bool desktop_menu_enable, - bool ui_companion_toggle, - bool force); - -static void ui_companion_driver_deinit(struct rarch_state *p_rarch); -static void ui_companion_driver_init_first(struct rarch_state *p_rarch); - -static bool core_load(unsigned poll_type_behavior); -static bool core_unload_game(void); - -static void driver_camera_stop(void); -static bool driver_camera_start(void); - -static const void *find_driver_nonempty( - const char *label, int i, - char *s, size_t len); - -#endif