Merge branch 'master' into overlay

This commit is contained in:
Themaister 2012-12-23 13:56:57 +01:00
commit f445c939e9
11 changed files with 4 additions and 84 deletions

View File

@ -19,6 +19,7 @@ OBJ = retroarch.o \
compat/compat.o \ compat/compat.o \
audio/null.o \ audio/null.o \
gfx/null.o \ gfx/null.o \
conf/config_file.o \
input/null.o \ input/null.o \
screenshot.o \ screenshot.o \
gfx/scaler/scaler.o \ gfx/scaler/scaler.o \
@ -74,10 +75,6 @@ ifeq ($(HAVE_THREADS), 1)
endif endif
endif endif
ifeq ($(HAVE_CONFIGFILE), 1)
OBJ += conf/config_file.o
endif
ifeq ($(HAVE_BSV_MOVIE), 1) ifeq ($(HAVE_BSV_MOVIE), 1)
OBJ += movie.o OBJ += movie.o
endif endif

View File

@ -72,7 +72,7 @@ endif
libretro ?= -lretro libretro ?= -lretro
LIBS = -lm LIBS = -lm
DEFINES = -I. -DHAVE_CONFIGFILE -DHAVE_SCREENSHOTS -DHAVE_BSV_MOVIE -DPACKAGE_VERSION=\"0.9.8-beta3\" DEFINES = -I. -DHAVE_SCREENSHOTS -DHAVE_BSV_MOVIE -DPACKAGE_VERSION=\"0.9.8-beta3\"
LDFLAGS = -L. -static-libgcc LDFLAGS = -L. -static-libgcc
ifeq ($(TDM_GCC),) ifeq ($(TDM_GCC),)

View File

@ -24,9 +24,7 @@
#include "config.h" #include "config.h"
#endif #endif
#ifdef HAVE_CONFIGFILE
#include "conf/config_file.h" #include "conf/config_file.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stddef.h> #include <stddef.h>
@ -151,7 +149,6 @@ static void cheat_manager_apply_cheats(cheat_manager_t *handle)
static void cheat_manager_load_config(cheat_manager_t *handle, const char *path, const char *sha256) static void cheat_manager_load_config(cheat_manager_t *handle, const char *path, const char *sha256)
{ {
#ifdef HAVE_CONFIGFILE
if (!(*path)) if (!(*path))
return; return;
@ -181,17 +178,10 @@ static void cheat_manager_load_config(cheat_manager_t *handle, const char *path,
config_file_free(conf); config_file_free(conf);
cheat_manager_apply_cheats(handle); cheat_manager_apply_cheats(handle);
#else
(void)handle;
(void)path;
(void)sha256;
#endif
} }
static void cheat_manager_save_config(cheat_manager_t *handle, const char *path, const char *sha256) static void cheat_manager_save_config(cheat_manager_t *handle, const char *path, const char *sha256)
{ {
#ifdef HAVE_CONFIGFILE
if (!(*path)) if (!(*path))
return; return;
@ -226,12 +216,6 @@ static void cheat_manager_save_config(cheat_manager_t *handle, const char *path,
RARCH_ERR("Failed to write XML cheat settings to \"%s\". Check permissions.\n", path); RARCH_ERR("Failed to write XML cheat settings to \"%s\". Check permissions.\n", path);
config_file_free(conf); config_file_free(conf);
#else
(void)handle;
(void)path;
(void)sha256;
#endif
} }
cheat_manager_t *cheat_manager_new(const char *path) cheat_manager_t *cheat_manager_new(const char *path)

View File

@ -152,12 +152,6 @@ static const bool _ffmpeg_supp = true;
static const bool _ffmpeg_supp = false; static const bool _ffmpeg_supp = false;
#endif #endif
#ifdef HAVE_CONFIGFILE
static const bool _configfile_supp = true;
#else
static const bool _configfile_supp = false;
#endif
#ifdef HAVE_FREETYPE #ifdef HAVE_FREETYPE
static const bool _freetype_supp = true; static const bool _freetype_supp = true;
#else #else

View File

@ -61,9 +61,7 @@ default_paths_t default_paths;
#include "../rarch_console_rsound.c" #include "../rarch_console_rsound.c"
#endif #endif
#ifdef HAVE_CONFIGFILE
#include "../rarch_console_config.c" #include "../rarch_console_config.c"
#endif
#ifdef HAVE_DEFAULT_RETROPAD_INPUT #ifdef HAVE_DEFAULT_RETROPAD_INPUT
#include "../rarch_console_input.c" #include "../rarch_console_input.c"
@ -106,9 +104,7 @@ CONFIG FILE
#undef strcasecmp #undef strcasecmp
#endif #endif
#ifdef HAVE_CONFIGFILE
#include "../../conf/config_file.c" #include "../../conf/config_file.c"
#endif
/*============================================================ /*============================================================
CHEATS CHEATS

View File

@ -272,10 +272,8 @@ struct global
bool has_set_save_path; bool has_set_save_path;
bool has_set_state_path; bool has_set_state_path;
#ifdef HAVE_CONFIGFILE
char config_path[PATH_MAX]; char config_path[PATH_MAX];
char append_config_path[PATH_MAX]; char append_config_path[PATH_MAX];
#endif
#ifdef HAVE_FILE_LOGGER #ifdef HAVE_FILE_LOGGER
char default_log_file[PATH_MAX]; char default_log_file[PATH_MAX];
@ -598,12 +596,10 @@ const char *config_get_default_video(void);
const char *config_get_default_audio(void); const char *config_get_default_audio(void);
const char *config_get_default_input(void); const char *config_get_default_input(void);
#ifdef HAVE_CONFIGFILE
#include "conf/config_file.h" #include "conf/config_file.h"
bool config_load_file(const char *path); bool config_load_file(const char *path);
bool config_read_keybinds(const char *path); bool config_read_keybinds(const char *path);
bool config_save_keybinds(const char *path); bool config_save_keybinds(const char *path);
#endif
void rarch_game_reset(void); void rarch_game_reset(void);
void rarch_main_clear_state(void); void rarch_main_clear_state(void);

View File

@ -30,9 +30,7 @@
#include "../compat/posix_string.h" #include "../compat/posix_string.h"
#include "../file.h" #include "../file.h"
#ifdef HAVE_CONFIGFILE
#include "state_tracker.h" #include "state_tracker.h"
#endif
//#define RARCH_CG_DEBUG //#define RARCH_CG_DEBUG
@ -150,9 +148,7 @@ static char lut_textures_uniform[MAX_TEXTURES][64];
static CGparameter cg_attribs[PREV_TEXTURES + 1 + 4 + RARCH_CG_MAX_SHADERS]; static CGparameter cg_attribs[PREV_TEXTURES + 1 + 4 + RARCH_CG_MAX_SHADERS];
static unsigned cg_attrib_index; static unsigned cg_attrib_index;
#ifdef HAVE_CONFIGFILE
static state_tracker_t *state_tracker = NULL; static state_tracker_t *state_tracker = NULL;
#endif
static void gl_cg_reset_attrib(void) static void gl_cg_reset_attrib(void)
{ {
@ -306,7 +302,6 @@ void gl_cg_set_params(unsigned width, unsigned height,
} }
} }
#ifdef HAVE_CONFIGFILE
// Set state parameters // Set state parameters
if (state_tracker) if (state_tracker)
{ {
@ -325,7 +320,6 @@ void gl_cg_set_params(unsigned width, unsigned height,
set_param_1f(param_f, info[i].value); set_param_1f(param_f, info[i].value);
} }
} }
#endif
} }
static void gl_cg_deinit_progs(void) static void gl_cg_deinit_progs(void)
@ -366,13 +360,11 @@ static void gl_cg_deinit_state(void)
glDeleteTextures(lut_textures_num, lut_textures); glDeleteTextures(lut_textures_num, lut_textures);
lut_textures_num = 0; lut_textures_num = 0;
#ifdef HAVE_CONFIGFILE
if (state_tracker) if (state_tracker)
{ {
state_tracker_free(state_tracker); state_tracker_free(state_tracker);
state_tracker = NULL; state_tracker = NULL;
} }
#endif
} }
// Final deinit. // Final deinit.
@ -513,7 +505,6 @@ static bool load_menu_shader(void)
#define print_buf(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__) #define print_buf(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__)
#ifdef HAVE_CONFIGFILE
static void load_texture_data(GLuint *obj, const struct texture_image *img, bool smooth) static void load_texture_data(GLuint *obj, const struct texture_image *img, bool smooth)
{ {
glGenTextures(1, obj); glGenTextures(1, obj);
@ -766,7 +757,6 @@ end:
free(imports); free(imports);
return ret; return ret;
} }
#endif
static bool load_shader(const char *cgp_path, unsigned i, config_file_t *conf) static bool load_shader(const char *cgp_path, unsigned i, config_file_t *conf)
{ {
@ -933,7 +923,6 @@ end:
static bool load_preset(const char *path) static bool load_preset(const char *path)
{ {
#ifdef HAVE_CONFIGFILE
bool ret = true; bool ret = true;
if (!load_stock()) if (!load_stock())
@ -1021,12 +1010,6 @@ end:
if (conf) if (conf)
config_file_free(conf); config_file_free(conf);
return ret; return ret;
#else
(void)path;
RARCH_ERR("No config file support compiled in.\n");
return false;
#endif
} }
static void set_program_base_attrib(unsigned i) static void set_program_base_attrib(unsigned i)

View File

@ -205,6 +205,6 @@ check_macro NEON __ARM_NEON__
add_define_make OS "$OS" add_define_make OS "$OS"
# Creates config.mk and config.h. # Creates config.mk and config.h.
VARS="ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL OPENGL GLES VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG XML SDL_IMAGE LIBPNG DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE CONFIGFILE FREETYPE XVIDEO X11 XEXT XF86VM XINERAMA NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 SINC BSV_MOVIE VIDEOCORE NEON" VARS="ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL OPENGL GLES VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG XML SDL_IMAGE LIBPNG DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE FREETYPE XVIDEO X11 XEXT XF86VM XINERAMA NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 SINC BSV_MOVIE VIDEOCORE NEON"
create_config_make config.mk $VARS create_config_make config.mk $VARS
create_config_header config.h $VARS create_config_header config.h $VARS

View File

@ -6,7 +6,6 @@ HAVE_THREADS=auto # Threading support
HAVE_FFMPEG=auto # Enable FFmpeg recording support HAVE_FFMPEG=auto # Enable FFmpeg recording support
HAVE_DYLIB=auto # Enable dynamic loading support HAVE_DYLIB=auto # Enable dynamic loading support
HAVE_NETPLAY=auto # Enable netplay support HAVE_NETPLAY=auto # Enable netplay support
HAVE_CONFIGFILE=yes # Disable support for config file
HAVE_OPENGL=yes # Disable OpenGL support HAVE_OPENGL=yes # Disable OpenGL support
HAVE_GLES=no # Use GLESv2 instead of desktop GL HAVE_GLES=no # Use GLESv2 instead of desktop GL
HAVE_X11=auto # Disable everything X11. HAVE_X11=auto # Disable everything X11.

View File

@ -596,7 +596,6 @@ static void print_features(void)
_PSUPP(fbo, "FBO", "OpenGL render-to-texture (multi-pass shaders)"); _PSUPP(fbo, "FBO", "OpenGL render-to-texture (multi-pass shaders)");
_PSUPP(dynamic, "Dynamic", "Dynamic run-time loading of libretro library"); _PSUPP(dynamic, "Dynamic", "Dynamic run-time loading of libretro library");
_PSUPP(ffmpeg, "FFmpeg", "On-the-fly recording of gameplay with libavcodec"); _PSUPP(ffmpeg, "FFmpeg", "On-the-fly recording of gameplay with libavcodec");
_PSUPP(configfile, "Config file", "Configuration file support");
_PSUPP(freetype, "FreeType", "TTF font rendering with FreeType"); _PSUPP(freetype, "FreeType", "TTF font rendering with FreeType");
_PSUPP(netplay, "Netplay", "Peer-to-peer netplay"); _PSUPP(netplay, "Netplay", "Peer-to-peer netplay");
_PSUPP(python, "Python", "Script support in shaders"); _PSUPP(python, "Python", "Script support in shaders");
@ -639,11 +638,9 @@ static void print_help(void)
puts("\t-s/--save: Path for save file (*.srm). Required when rom is input from stdin."); puts("\t-s/--save: Path for save file (*.srm). Required when rom is input from stdin.");
puts("\t-f/--fullscreen: Start RetroArch in fullscreen regardless of config settings."); puts("\t-f/--fullscreen: Start RetroArch in fullscreen regardless of config settings.");
puts("\t-S/--savestate: Path to use for save states. If not selected, *.state will be assumed."); puts("\t-S/--savestate: Path to use for save states. If not selected, *.state will be assumed.");
#ifdef HAVE_CONFIGFILE
puts("\t-c/--config: Path for config file." RARCH_DEFAULT_CONF_PATH_STR); puts("\t-c/--config: Path for config file." RARCH_DEFAULT_CONF_PATH_STR);
puts("\t--appendconfig: Extra config files are loaded in, and take priority over config selected in -c (or default)."); puts("\t--appendconfig: Extra config files are loaded in, and take priority over config selected in -c (or default).");
puts("\t\tMultiple configs are delimited by ','."); puts("\t\tMultiple configs are delimited by ','.");
#endif
#ifdef HAVE_DYNAMIC #ifdef HAVE_DYNAMIC
puts("\t-L/--libretro: Path to libretro implementation. Overrides any config setting."); puts("\t-L/--libretro: Path to libretro implementation. Overrides any config setting.");
#endif #endif
@ -741,7 +738,6 @@ static void set_paths(const char *path)
if (!*g_settings.system_directory) if (!*g_settings.system_directory)
fill_pathname_basedir(g_settings.system_directory, path, sizeof(g_settings.system_directory)); fill_pathname_basedir(g_settings.system_directory, path, sizeof(g_settings.system_directory));
#ifdef HAVE_CONFIGFILE
if (*g_extern.config_path && path_is_directory(g_extern.config_path)) if (*g_extern.config_path && path_is_directory(g_extern.config_path))
{ {
fill_pathname_dir(g_extern.config_path, g_extern.basename, ".cfg", sizeof(g_extern.config_path)); fill_pathname_dir(g_extern.config_path, g_extern.basename, ".cfg", sizeof(g_extern.config_path));
@ -752,7 +748,6 @@ static void set_paths(const char *path)
RARCH_LOG("Did not find config file. Using system default.\n"); RARCH_LOG("Did not find config file. Using system default.\n");
} }
} }
#endif
} }
static void verify_stdin_paths(void) static void verify_stdin_paths(void)
@ -782,15 +777,12 @@ static void verify_stdin_paths(void)
print_help(); print_help();
rarch_fail(1, "verify_stdin_paths()"); rarch_fail(1, "verify_stdin_paths()");
} }
#ifdef HAVE_CONFIGFILE
else if (path_is_directory(g_extern.config_path)) else if (path_is_directory(g_extern.config_path))
{ {
RARCH_ERR("Cannot specify directory for config file (--config) when reading from stdin.\n"); RARCH_ERR("Cannot specify directory for config file (--config) when reading from stdin.\n");
print_help(); print_help();
rarch_fail(1, "verify_stdin_paths()"); rarch_fail(1, "verify_stdin_paths()");
} }
#endif
driver.stdin_claimed = true; driver.stdin_claimed = true;
} }
@ -822,10 +814,8 @@ static void parse_input(int argc, char *argv[])
#endif #endif
{ "verbose", 0, NULL, 'v' }, { "verbose", 0, NULL, 'v' },
{ "gameboy", 1, NULL, 'g' }, { "gameboy", 1, NULL, 'g' },
#ifdef HAVE_CONFIGFILE
{ "config", 1, NULL, 'c' }, { "config", 1, NULL, 'c' },
{ "appendconfig", 1, &val, 'C' }, { "appendconfig", 1, &val, 'C' },
#endif
{ "mouse", 1, NULL, 'm' }, { "mouse", 1, NULL, 'm' },
{ "nodevice", 1, NULL, 'N' }, { "nodevice", 1, NULL, 'N' },
{ "scope", 0, NULL, 'p' }, { "scope", 0, NULL, 'p' },
@ -870,12 +860,6 @@ static void parse_input(int argc, char *argv[])
#define FFMPEG_RECORD_ARG #define FFMPEG_RECORD_ARG
#endif #endif
#ifdef HAVE_CONFIGFILE
#define CONFIG_FILE_ARG "c:"
#else
#define CONFIG_FILE_ARG
#endif
#ifdef HAVE_DYNAMIC #ifdef HAVE_DYNAMIC
#define DYNAMIC_ARG "L:" #define DYNAMIC_ARG "L:"
#else #else
@ -894,7 +878,7 @@ static void parse_input(int argc, char *argv[])
#define BSV_MOVIE_ARG #define BSV_MOVIE_ARG
#endif #endif
const char *optstring = "hs:fvS:m:p4jJA:g:b:B:Y:Z:U:DN:X:" BSV_MOVIE_ARG NETPLAY_ARG DYNAMIC_ARG FFMPEG_RECORD_ARG CONFIG_FILE_ARG; const char *optstring = "hs:fvS:m:p4jJA:g:b:c:B:Y:Z:U:DN:X:" BSV_MOVIE_ARG NETPLAY_ARG DYNAMIC_ARG FFMPEG_RECORD_ARG;
for (;;) for (;;)
{ {
val = 0; val = 0;
@ -1002,11 +986,9 @@ static void parse_input(int argc, char *argv[])
g_extern.has_scope = true; g_extern.has_scope = true;
break; break;
#ifdef HAVE_CONFIGFILE
case 'c': case 'c':
strlcpy(g_extern.config_path, optarg, sizeof(g_extern.config_path)); strlcpy(g_extern.config_path, optarg, sizeof(g_extern.config_path));
break; break;
#endif
#ifdef HAVE_FFMPEG #ifdef HAVE_FFMPEG
case 'r': case 'r':

View File

@ -245,9 +245,7 @@ void config_set_defaults(void)
rarch_init_msg_queue(); rarch_init_msg_queue();
} }
#ifdef HAVE_CONFIGFILE
static void parse_config_file(void); static void parse_config_file(void);
#endif
void config_load(void) void config_load(void)
{ {
@ -256,14 +254,10 @@ void config_load(void)
#endif #endif
{ {
config_set_defaults(); config_set_defaults();
#ifdef HAVE_CONFIGFILE
parse_config_file(); parse_config_file();
#endif
} }
} }
#ifdef HAVE_CONFIGFILE
static config_file_t *open_default_config_file(void) static config_file_t *open_default_config_file(void)
{ {
config_file_t *conf = NULL; config_file_t *conf = NULL;
@ -368,10 +362,7 @@ static config_file_t *open_default_config_file(void)
return conf; return conf;
} }
#endif
#ifdef HAVE_CONFIGFILE
static void config_read_keybinds_conf(config_file_t *conf); static void config_read_keybinds_conf(config_file_t *conf);
static void parse_config_file(void) static void parse_config_file(void)
@ -1029,5 +1020,3 @@ bool config_save_keybinds(const char *path)
return true; return true;
} }
#endif