Rearrange header include dependencies

This commit is contained in:
twinaphex 2015-06-02 17:17:46 +02:00
parent 9a18d49e15
commit e67f3f246d
12 changed files with 60 additions and 46 deletions

View File

@ -14,18 +14,23 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <retro_miscellaneous.h>
#include <compat/posix_string.h>
#include <file/file_path.h>
#include <file/config_file_userdata.h>
#include <file/dir_list.h>
#include "../performance.h"
#include "audio_dsp_filter.h"
#include "../dynamic.h"
#include <file/config_file_userdata.h>
#include "audio_filters/dspfilter.h"
#include <file/file_path.h>
#include "../file_ext.h"
#include <file/dir_list.h>
#include <compat/posix_string.h>
#include <stdlib.h>
struct rarch_dsp_plug
{
@ -202,7 +207,7 @@ static bool append_plugs(rarch_dsp_filter_t *dsp, struct string_list *list)
return false;
}
RARCH_LOG("[DSP]: Found plug: %s (%s).\n", impl->ident, impl->short_ident);
/* Found plug. */
dsp->plugs = new_plugs;
dsp->plugs[dsp->num_plugs].lib = lib;
@ -228,11 +233,8 @@ rarch_dsp_filter_t *rarch_dsp_filter_new(
return NULL;
dsp->conf = config_file_new(filter_config);
if (!dsp->conf)
{
RARCH_ERR("[DSP]: Did not find config: %s\n", filter_config);
if (!dsp->conf) /* Did not find config. */
goto error;
}
#if !defined(HAVE_FILTERS_BUILTIN) && defined(HAVE_DYLIB)
fill_pathname_basedir(basedir, filter_config, sizeof(basedir));

View File

@ -152,15 +152,6 @@ static const rarch_resampler_t *find_resampler_driver(const char *ident)
if (i >= 0)
return resampler_drivers[i];
#ifdef RARCH_INTERNAL
RARCH_ERR("Couldn't find any resampler driver named \"%s\"\n", ident);
RARCH_LOG_OUTPUT("Available resampler drivers are:\n");
for (d = 0; resampler_drivers[d]; d++)
RARCH_LOG_OUTPUT("\t%s\n", resampler_drivers[d]->ident);
RARCH_WARN("Going to default to first resampler driver ...\n");
#endif
return resampler_drivers[0];
}

View File

@ -20,9 +20,6 @@
#include <string.h>
#include <assert.h>
#include <stddef.h>
#include "../../performance.h"
#include <retro_miscellaneous.h>
#include <gfx/scaler/scaler.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
@ -32,11 +29,18 @@
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <compat/strl.h>
#include <asm/types.h>
#include <linux/videodev2.h>
#include <retro_miscellaneous.h>
#include <gfx/scaler/scaler.h>
#include <compat/strl.h>
#include "../../general.h"
#include "../../performance.h"
struct buffer
{
void *start;

View File

@ -32,6 +32,8 @@
#include "dynamic_dummy.h"
#include "retroarch.h"
#include "runloop.h"
#include "configuration.h"
#include "general.h"
#include "input/input_sensor.h"

View File

@ -21,6 +21,7 @@
#include <file/file_path.h>
#include "../file_ext.h"
#include <file/dir_list.h>
#include "../general.h"
#include "../performance.h"
#include <stdlib.h>

View File

@ -532,3 +532,22 @@ uint64_t rarch_get_cpu_features(void)
return cpu;
}
void rarch_perf_start(struct retro_perf_counter *perf)
{
global_t *global = global_get_ptr();
if (!global->perfcnt_enable || !perf)
return;
perf->call_cnt++;
perf->start = rarch_get_perf_counter();
}
void rarch_perf_stop(struct retro_perf_counter *perf)
{
global_t *global = global_get_ptr();
if (!global->perfcnt_enable || !perf)
return;
perf->total += rarch_get_perf_counter() - perf->start;
}

View File

@ -17,9 +17,12 @@
#ifndef _RARCH_PERF_H
#define _RARCH_PERF_H
#include "general.h"
#include <stdint.h>
#include <retro_inline.h>
#include "libretro.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -50,7 +53,6 @@ extern const struct retro_perf_counter *perf_counters_libretro[MAX_COUNTERS];
extern unsigned perf_ptr_rarch;
extern unsigned perf_ptr_libretro;
/**
* rarch_get_perf_counter:
*
@ -86,15 +88,7 @@ void retro_perf_log(void);
*
* Start performance counter.
**/
static INLINE void rarch_perf_start(struct retro_perf_counter *perf)
{
global_t *global = global_get_ptr();
if (!global->perfcnt_enable || !perf)
return;
perf->call_cnt++;
perf->start = rarch_get_perf_counter();
}
void rarch_perf_start(struct retro_perf_counter *perf);
/**
* rarch_perf_stop:
@ -102,14 +96,7 @@ static INLINE void rarch_perf_start(struct retro_perf_counter *perf)
*
* Stop performance counter.
**/
static INLINE void rarch_perf_stop(struct retro_perf_counter *perf)
{
global_t *global = global_get_ptr();
if (!global->perfcnt_enable || !perf)
return;
perf->total += rarch_get_perf_counter() - perf->start;
}
void rarch_perf_stop(struct retro_perf_counter *perf);
/**
* rarch_get_cpu_features:

View File

@ -1331,14 +1331,17 @@ void rarch_main_deinit(void)
*
* Initializes core and loads content based on playlist entry.
**/
void rarch_playlist_load_content(content_playlist_t *playlist,
unsigned idx)
void rarch_playlist_load_content(void *data, unsigned idx)
{
const char *path = NULL;
const char *core_path = NULL;
content_playlist_t *playlist = (content_playlist_t*)data;
menu_handle_t *menu = menu_driver_get_ptr();
settings_t *settings = config_get_ptr();
if (!playlist)
return;
content_playlist_get_index(playlist,
idx, &path, NULL, &core_path, NULL, NULL);

View File

@ -18,6 +18,8 @@
#define __RETROARCH_H
#include <boolean.h>
#include <retro_miscellaneous.h>
#include "core_info.h"
#include "command_event.h"
@ -121,8 +123,7 @@ bool rarch_replace_config(const char *path);
*
* Initializes core and loads content based on playlist entry.
**/
void rarch_playlist_load_content(content_playlist_t *playlist,
unsigned index);
void rarch_playlist_load_content(void *data, unsigned index);
/**
* rarch_defer_core:

View File

@ -13,9 +13,11 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <compat/strl.h>
#include <retro_miscellaneous.h>
#include "performance.h"
#include "playlist.h"
#include "retroarch.h"
int rarch_info_get_capabilities(enum rarch_capabilities type, char *s, size_t len)

View File

@ -24,6 +24,7 @@
#include <retro_inline.h>
#include "intl/intl.h"
#include "dynamic.h"
#include "general.h"
#ifndef UINT16_MAX
#define UINT16_MAX 0xffff

View File

@ -20,6 +20,7 @@
#include <formats/image.h>
#include <formats/rpng.h>
#include <queues/message_queue.h>
#include <retro_miscellaneous.h>
#ifdef HAVE_THREADS
#include <rthreads/rthreads.h>
#endif