From 642e46779b27fccc08cf669c0a7ba879fdd982f0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 6 Sep 2016 23:59:43 +0200 Subject: [PATCH] Cleanups --- gfx/drivers_shader/shader_gl_cg.c | 18 +++++++++++------- gfx/drivers_shader/shader_hlsl.c | 4 ++++ input/input_autodetect.c | 7 ++++--- input/input_autodetect_builtin.c | 11 ++++++++++- input/input_autodetect_builtin.h | 28 ---------------------------- input/input_config.c | 7 ++++--- input/input_driver.c | 12 ++++++++---- input/input_hid_driver.c | 4 ++++ input/input_joypad_driver.c | 4 ++++ input/input_remote.c | 4 ++++ 10 files changed, 53 insertions(+), 46 deletions(-) delete mode 100644 input/input_autodetect_builtin.h diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index c4801fc388..e40248c312 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -22,12 +22,6 @@ #include #include -#include "../include/Cg/cg.h" -#ifdef HAVE_OPENGL -#include "../common/gl_common.h" -#include "../include/Cg/cgGL.h" -#endif - #include #include #include @@ -36,12 +30,22 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include "../include/Cg/cg.h" +#ifdef HAVE_OPENGL +#include "../common/gl_common.h" +#include "../include/Cg/cgGL.h" +#endif + #include "../video_shader_driver.h" #include "../video_shader_parse.h" +#include "../video_state_tracker.h" #include "../../core.h" #include "../../dynamic.h" #include "../../managers/state_manager.h" -#include "../video_state_tracker.h" #ifdef HAVE_SHADERPIPELINE #include "../drivers/gl_shaders/pipeline_xmb_ribbon_simple.cg.h" diff --git a/gfx/drivers_shader/shader_hlsl.c b/gfx/drivers_shader/shader_hlsl.c index 2509b2629c..837dfb9353 100644 --- a/gfx/drivers_shader/shader_hlsl.c +++ b/gfx/drivers_shader/shader_hlsl.c @@ -16,6 +16,10 @@ #include +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + #include "shader_hlsl.h" #include "../video_shader_parse.h" diff --git a/input/input_autodetect.c b/input/input_autodetect.c index 39a7db4190..c3e912b1df 100644 --- a/input/input_autodetect.c +++ b/input/input_autodetect.c @@ -22,6 +22,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "input_config.h" #include "input_autodetect.h" @@ -165,9 +169,6 @@ static void input_autoconfigure_joypad_add(config_file_t *conf, runloop_msg_queue_push(msg, 2, 60, false); } input_reindex_devices(); -#if 0 - RARCH_LOG("Autodetect: %s\n", msg); -#endif } #if defined(HAVE_BUILTIN_AUTOCONFIG) diff --git a/input/input_autodetect_builtin.c b/input/input_autodetect_builtin.c index f82e225a56..dd64b637a1 100644 --- a/input/input_autodetect_builtin.c +++ b/input/input_autodetect_builtin.c @@ -15,8 +15,17 @@ * If not, see . */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "input_autodetect.h" -#include "input_autodetect_builtin.h" +#include "input_config.h" + +#define DECL_BTN(btn, bind) "input_" #btn "_btn = " #bind "\n" +#define DECL_AXIS(axis, bind) "input_" #axis "_axis = " #bind "\n" +#define DECL_MENU(btn) "input_menu_toggle_btn = " #btn "\n" +#define DECL_AUTOCONF_DEVICE(device, driver, binds) "input_device = \"" #device "\" \ninput_driver = \"" #driver "\" \n" binds /* TODO/FIXME - Missing L2/R2 */ diff --git a/input/input_autodetect_builtin.h b/input/input_autodetect_builtin.h deleted file mode 100644 index 447500c68b..0000000000 --- a/input/input_autodetect_builtin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2013-2014 - pinumbernumber - * 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 AUTOCONF_BUILTIN_H__ -#define AUTOCONF_BUILTIN_H__ - -#include "input_config.h" - -#define DECL_BTN(btn, bind) "input_" #btn "_btn = " #bind "\n" -#define DECL_AXIS(axis, bind) "input_" #axis "_axis = " #bind "\n" -#define DECL_MENU(btn) "input_menu_toggle_btn = " #btn "\n" -#define DECL_AUTOCONF_DEVICE(device, driver, binds) "input_device = \"" #device "\" \ninput_driver = \"" #driver "\" \n" binds - -#endif diff --git a/input/input_config.c b/input/input_config.c index 51ba02ec03..1060fb55d7 100644 --- a/input/input_config.c +++ b/input/input_config.c @@ -22,6 +22,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "input_config.h" #include "input_keymaps.h" #include "input_remapping.h" @@ -30,9 +34,6 @@ #include "../configuration.h" #include "../file_path_special.h" #include "../verbosity.h" -#ifdef HAVE_CONFIG_H -#include "../config.h" -#endif /* Input config. */ struct input_bind_map diff --git a/input/input_driver.c b/input/input_driver.c index e98df2969f..a247d95459 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -16,10 +16,18 @@ #include +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "input_driver.h" #include "input_keyboard.h" #include "input_remapping.h" +#ifdef HAVE_NETWORKGAMEPAD +#include "input_remote.h" +#endif + #include "../configuration.h" #include "../driver.h" #include "../retroarch.h" @@ -29,10 +37,6 @@ #include "../verbosity.h" #include "../command.h" -#ifdef HAVE_NETWORKGAMEPAD -#include "input_remote.h" -#endif - static const input_driver_t *input_drivers[] = { #ifdef __CELLOS_LV2__ &input_ps3, diff --git a/input/input_hid_driver.c b/input/input_hid_driver.c index a7b9bdc732..af83be29ee 100644 --- a/input/input_hid_driver.c +++ b/input/input_hid_driver.c @@ -18,6 +18,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "input_hid_driver.h" #include "../list_special.h" #include "../verbosity.h" diff --git a/input/input_joypad_driver.c b/input/input_joypad_driver.c index 12c723b4fb..2434668009 100644 --- a/input/input_joypad_driver.c +++ b/input/input_joypad_driver.c @@ -20,6 +20,10 @@ #include +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "input_keymaps.h" #include "../configuration.h" #include "../general.h" diff --git a/input/input_remote.c b/input/input_remote.c index 14ca02ca6c..6d546e1de7 100644 --- a/input/input_remote.c +++ b/input/input_remote.c @@ -29,6 +29,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "input_remote.h" #include "../configuration.h"