From 82d82110ae4b1353fd776a0c5453aaf7400afdc7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 6 Sep 2016 06:11:44 +0200 Subject: [PATCH] Merge system.h with core.h --- cheevos.c | 1 - command.c | 1 - configuration.c | 1 - core.h | 31 +++++++++++++++++ core_impl.c | 1 - driver.c | 1 - dynamic.c | 1 - gfx/video_driver.c | 1 - httpserver/httpserver.c | 2 +- location/location_driver.c | 2 +- menu/cbs/menu_cbs_deferred_push.c | 2 +- menu/cbs/menu_cbs_get_value.c | 2 +- menu/cbs/menu_cbs_left.c | 2 +- menu/cbs/menu_cbs_ok.c | 2 +- menu/cbs/menu_cbs_right.c | 2 +- menu/cbs/menu_cbs_start.c | 2 +- menu/drivers/materialui.c | 2 +- menu/drivers/nuklear.c | 2 +- menu/drivers/xmb.c | 2 +- menu/menu_displaylist.c | 1 - menu/menu_driver.c | 2 +- menu/menu_entries.c | 2 +- menu/menu_setting.c | 2 +- network/netplay/netplay_private.h | 2 +- retroarch.c | 1 - runloop.c | 1 - system.h | 58 ------------------------------- tasks/task_content.c | 1 - ui/drivers/ui_cocoa.m | 2 +- ui/drivers/ui_qt.cpp | 5 +-- 30 files changed, 50 insertions(+), 87 deletions(-) delete mode 100644 system.h diff --git a/cheevos.c b/cheevos.c index ed3d5b13a11..dd1bfaef049 100644 --- a/cheevos.c +++ b/cheevos.c @@ -24,7 +24,6 @@ #include "cheevos.h" #include "command.h" #include "dynamic.h" -#include "system.h" #include "network/net_http_special.h" #include "tasks/tasks_internal.h" #include "configuration.h" diff --git a/command.c b/command.c index 30d4df4d666..fa91034a676 100644 --- a/command.c +++ b/command.c @@ -53,7 +53,6 @@ #include "retroarch.h" #include "managers/cheat_manager.h" #include "managers/state_manager.h" -#include "system.h" #include "ui/ui_companion_driver.h" #include "tasks/tasks_internal.h" #include "list_special.h" diff --git a/configuration.c b/configuration.c index c2b91b6b056..f32ecbcbcbf 100644 --- a/configuration.c +++ b/configuration.c @@ -36,7 +36,6 @@ #include "core.h" #include "retroarch.h" #include "runloop.h" -#include "system.h" #include "verbosity.h" #include "lakka.h" diff --git a/core.h b/core.h index ec7cf8bb16e..2ae06e6d4fc 100644 --- a/core.h +++ b/core.h @@ -20,9 +20,12 @@ #include #include + +#include #include #include "core_type.h" +#include "input/input_defines.h" RETRO_BEGIN_DECLS @@ -40,6 +43,34 @@ enum POLL_TYPE_LATE }; +typedef struct rarch_system_info +{ + struct retro_system_info info; + + unsigned rotation; + unsigned performance_level; + + const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY]; + char valid_extensions[PATH_MAX_LENGTH]; + + struct retro_disk_control_callback disk_control_cb; + struct retro_location_callback location_cb; + + struct + { + struct retro_subsystem_info *data; + unsigned size; + } subsystem; + + struct + { + struct retro_controller_info *data; + unsigned size; + } ports; + + struct retro_memory_map mmaps; +} rarch_system_info_t; + typedef struct retro_ctx_input_state_info { retro_input_state_t cb; diff --git a/core_impl.c b/core_impl.c index 268bb5a5db7..7e4741996e9 100644 --- a/core_impl.c +++ b/core_impl.c @@ -32,7 +32,6 @@ #include "msg_hash.h" #include "managers/state_manager.h" #include "runloop.h" -#include "system.h" #include "verbosity.h" #include "gfx/video_driver.h" #include "audio/audio_driver.h" diff --git a/driver.c b/driver.c index d07e6555527..c106ef2e729 100644 --- a/driver.c +++ b/driver.c @@ -20,7 +20,6 @@ #include "command.h" #include "msg_hash.h" -#include "system.h" #include "audio/audio_driver.h" #include "audio/audio_resampler_driver.h" diff --git a/dynamic.c b/dynamic.c index 802141b6b98..cdb2df358e0 100644 --- a/dynamic.c +++ b/dynamic.c @@ -41,7 +41,6 @@ #include "record/record_driver.h" #include "core.h" #include "performance_counters.h" -#include "system.h" #include "gfx/video_context_driver.h" #include "cores/internal_cores.h" diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 6de579cec65..54e513367a6 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -41,7 +41,6 @@ #include "../performance_counters.h" #include "../list_special.h" #include "../core.h" -#include "../system.h" #include "../command.h" #include "../msg_hash.h" diff --git a/httpserver/httpserver.c b/httpserver/httpserver.c index c2c8858042c..e5af993dfc6 100644 --- a/httpserver/httpserver.c +++ b/httpserver/httpserver.c @@ -1,5 +1,5 @@ #include -#include "system.h" +#include "core.h" #include "runloop.h" #include "core.h" #include "gfx/video_driver.h" diff --git a/location/location_driver.c b/location/location_driver.c index d4adca0a451..9f06d71b986 100644 --- a/location/location_driver.c +++ b/location/location_driver.c @@ -23,10 +23,10 @@ #include "location_driver.h" #include "../configuration.h" +#include "../core.h" #include "../driver.h" #include "../retroarch.h" #include "../runloop.h" -#include "../system.h" #include "../list_special.h" #include "../verbosity.h" diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index 82a4ac425dc..8186d3c2c6b 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -29,9 +29,9 @@ #include "../../cores/internal_cores.h" #include "../../configuration.h" +#include "../../core.h" #include "../../core_info.h" #include "../../runloop.h" -#include "../../system.h" #include "../../verbosity.h" #ifndef BIND_ACTION_DEFERRED_PUSH diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index b627bdbebad..1947d13b413 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -27,6 +27,7 @@ #include "../../input/input_autodetect.h" #include "../../input/input_config.h" +#include "../../core.h" #include "../../core_info.h" #include "../../configuration.h" #include "../../file_path_special.h" @@ -34,7 +35,6 @@ #include "../../managers/cheat_manager.h" #include "../../performance_counters.h" #include "../../runloop.h" -#include "../../system.h" #include "../../intl/intl.h" #ifndef BIND_ACTION_GET_VALUE diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 14519c34bab..89b6478c12e 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -27,12 +27,12 @@ #include "../menu_navigation.h" #include "../../configuration.h" +#include "../../core.h" #include "../../core_info.h" #include "../../managers/cheat_manager.h" #include "../../file_path_special.h" #include "../../retroarch.h" #include "../../runloop.h" -#include "../../system.h" #ifndef BIND_ACTION_LEFT #define BIND_ACTION_LEFT(cbs, name) \ diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index cd8a4a9c9da..9b501d4aca1 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -30,6 +30,7 @@ #include "../menu_popup.h" #include "../menu_content.h" +#include "../../core.h" #include "../../configuration.h" #include "../../core_info.h" #include "../../frontend/frontend_driver.h" @@ -39,7 +40,6 @@ #include "../../input/input_remapping.h" #include "../../retroarch.h" #include "../../runloop.h" -#include "../../system.h" #include "../../verbosity.h" #include "../../lakka.h" diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index 71d4dbb8844..d66c0942672 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -27,12 +27,12 @@ #include "../menu_navigation.h" #include "../../configuration.h" +#include "../../core.h" #include "../../core_info.h" #include "../../managers/cheat_manager.h" #include "../../file_path_special.h" #include "../../retroarch.h" #include "../../runloop.h" -#include "../../system.h" #include "../../ui/ui_companion_driver.h" #ifndef BIND_ACTION_RIGHT diff --git a/menu/cbs/menu_cbs_start.c b/menu/cbs/menu_cbs_start.c index 18924b54538..45138677ad6 100644 --- a/menu/cbs/menu_cbs_start.c +++ b/menu/cbs/menu_cbs_start.c @@ -25,12 +25,12 @@ #include "../menu_shader.h" #include "../../configuration.h" +#include "../../core.h" #include "../../core_info.h" #include "../../managers/core_option_manager.h" #include "../../managers/cheat_manager.h" #include "../../retroarch.h" #include "../../runloop.h" -#include "../../system.h" #include "../../performance_counters.h" #include "../../gfx/video_shader_driver.h" diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index f8f1db28048..374d19cb71c 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -38,10 +38,10 @@ #include "../menu_display.h" #include "../../core_info.h" +#include "../../core.h" #include "../../configuration.h" #include "../../frontend/frontend_driver.h" #include "../../retroarch.h" -#include "../../system.h" #include "../../runloop.h" #include "../../verbosity.h" #include "../../tasks/tasks_internal.h" diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index ad0fdc9b115..a63069692b9 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -39,10 +39,10 @@ #include "../menu_navigation.h" #include "../menu_display.h" +#include "../../core.h" #include "../../core_info.h" #include "../../configuration.h" #include "../../frontend/frontend_driver.h" -#include "../../system.h" #include "../../runloop.h" #include "../../verbosity.h" #include "../../tasks/tasks_internal.h" diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index cff74a52f78..1afd62dae07 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -41,10 +41,10 @@ #include "../menu_cbs.h" #include "../../frontend/frontend_driver.h" +#include "../../core.h" #include "../../verbosity.h" #include "../../configuration.h" #include "../../retroarch.h" -#include "../../system.h" #include "../../file_path_special.h" #include "../../tasks/tasks_internal.h" diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index b49eaa24ba7..e0f409dab7b 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -42,7 +42,6 @@ #include "../managers/core_option_manager.h" #include "../retroarch.h" #include "../runloop.h" -#include "../system.h" #include "../core.h" #include "../frontend/frontend_driver.h" #include "../ui/ui_companion_driver.h" diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 92a838f9573..87136a5040a 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -32,9 +32,9 @@ #include "../content.h" #include "../configuration.h" #include "../dynamic.h" +#include "../core.h" #include "../core_info.h" #include "../retroarch.h" -#include "../system.h" #include "../defaults.h" #include "../frontend/frontend.h" #include "../list_special.h" diff --git a/menu/menu_entries.c b/menu/menu_entries.c index b7dbe2e9b4e..a44d7c1a694 100644 --- a/menu/menu_entries.c +++ b/menu/menu_entries.c @@ -24,9 +24,9 @@ #include "menu_cbs.h" #include "menu_navigation.h" +#include "../core.h" #include "../configuration.h" #include "../runloop.h" -#include "../system.h" #include "../version.h" struct menu_list diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 122f01822ad..3fe3b6d53a6 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -45,11 +45,11 @@ #include "menu_input.h" #include "menu_navigation.h" +#include "../core.h" #include "../configuration.h" #include "../msg_hash.h" #include "../defaults.h" #include "../driver.h" -#include "../system.h" #include "../core.h" #include "../dynamic.h" #include "../runloop.h" diff --git a/network/netplay/netplay_private.h b/network/netplay/netplay_private.h index 0baf2d4c877..f0e30aac175 100644 --- a/network/netplay/netplay_private.h +++ b/network/netplay/netplay_private.h @@ -22,8 +22,8 @@ #include #include +#include "../../core.h" #include "../../msg_hash.h" -#include "../../system.h" #include "../../verbosity.h" #ifdef ANDROID diff --git a/retroarch.c b/retroarch.c index 9b92085b2f1..6233ac8fa9b 100644 --- a/retroarch.c +++ b/retroarch.c @@ -61,7 +61,6 @@ #include "configuration.h" #include "runloop.h" #include "managers/cheat_manager.h" -#include "system.h" #include "tasks/tasks_internal.h" #include "version.h" diff --git a/runloop.c b/runloop.c index 2c105f2ba9e..5d3dbc6f3fd 100644 --- a/runloop.c +++ b/runloop.c @@ -46,7 +46,6 @@ #include "managers/core_option_manager.h" #include "managers/cheat_manager.h" #include "managers/state_manager.h" -#include "system.h" #include "list_special.h" #include "audio/audio_driver.h" #include "camera/camera_driver.h" diff --git a/system.h b/system.h deleted file mode 100644 index 914bf7f9725..00000000000 --- a/system.h +++ /dev/null @@ -1,58 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#ifndef __RARCH_SYSTEM_H -#define __RARCH_SYSTEM_H - -#include -#include -#include - -#include "input/input_defines.h" - -RETRO_BEGIN_DECLS - -typedef struct rarch_system_info -{ - struct retro_system_info info; - - unsigned rotation; - unsigned performance_level; - - const char *input_desc_btn[MAX_USERS][RARCH_FIRST_META_KEY]; - char valid_extensions[PATH_MAX_LENGTH]; - - struct retro_disk_control_callback disk_control_cb; - struct retro_location_callback location_cb; - - - struct - { - struct retro_subsystem_info *data; - unsigned size; - } subsystem; - - struct - { - struct retro_controller_info *data; - unsigned size; - } ports; - - struct retro_memory_map mmaps; -} rarch_system_info_t; - -RETRO_END_DECLS - -#endif diff --git a/tasks/task_content.c b/tasks/task_content.c index 2f28630fb00..91c5c6f1a2b 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -81,7 +81,6 @@ #include "../content.h" #include "../dynamic.h" #include "../patch.h" -#include "../system.h" #include "../runloop.h" #include "../retroarch.h" #include "../file_path_special.h" diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index eb5a428450d..b77eceb036f 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -31,9 +31,9 @@ #include "../../input/drivers_keyboard/keyboard_event_apple.h" #include "../../frontend/frontend.h" #include "../../configuration.h" +#include "../../core.h" #include "../../retroarch.h" #include "../../runloop.h" -#include "../../system.h" #include "../../tasks/tasks_internal.h" id apple_platform; diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index 089771d0f6b..2991eb48d6e 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -18,14 +18,15 @@ #include #include #include -#include "general.h" -#include "system.h" #include #include +#include "general.h" + #include "ui_qt.h" #include "../ui_companion_driver.h" +#include "../../core.h" #include "../../configuration.h" #include "../../tasks/tasks_internal.h" #include "qt/wrapper/wrapper.h"