diff --git a/Makefile b/Makefile
index 0bf1bb005d..af8c1750e2 100644
--- a/Makefile
+++ b/Makefile
@@ -117,7 +117,7 @@ ifeq ($(HAVE_LAKKA), 1)
endif
endif
-OBJ += history.o
+OBJ += playlist.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += frontend/menu/backend/menu_common_backend.o frontend/menu/menu_input_line_cb.o frontend/menu/menu_common.o frontend/menu/menu_navigation.o
diff --git a/Makefile.emscripten b/Makefile.emscripten
index 4cad2faf2a..09f4f703d1 100644
--- a/Makefile.emscripten
+++ b/Makefile.emscripten
@@ -86,7 +86,7 @@ ifeq ($(HAVE_RGUI), 1)
HAVE_MENU_COMMON = 1
endif
-OBJ += history.o
+OBJ += playlist.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += frontend/menu/backend/menu_common_backend.o frontend/menu/menu_input_line_cb.o frontend/menu/menu_common.o frontend/menu/menu_navigation.o
diff --git a/Makefile.win b/Makefile.win
index 57918e965d..272cf9bb1f 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -131,7 +131,7 @@ ifeq ($(HAVE_LAKKA), 1)
endif
endif
-OBJ += history.o
+OBJ += playlist.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += frontend/menu/backend/menu_common_backend.o frontend/menu/menu_input_line_cb.o frontend/menu/menu_common.o frontend/menu/menu_navigation.o
diff --git a/dynamic.c b/dynamic.c
index f9c0fef8d8..6568b47e0f 100644
--- a/dynamic.c
+++ b/dynamic.c
@@ -522,7 +522,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
char buf[PATH_MAX];
if (!*options_path && *g_extern.config_path)
{
- fill_pathname_resolve_relative(buf, g_extern.config_path, ".retroarch-core-options.cfg", sizeof(buf));
+ fill_pathname_resolve_relative(buf, g_extern.config_path, "retroarch-core-options.cfg", sizeof(buf));
options_path = buf;
}
g_extern.system.core_options = core_option_new(options_path, vars);
diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c
index 71e8b90ab7..ab35c530a4 100644
--- a/frontend/menu/backend/menu_common_backend.c
+++ b/frontend/menu/backend/menu_common_backend.c
@@ -1752,14 +1752,14 @@ static void menu_parse_and_resolve(unsigned menu_type)
{
case MENU_SETTINGS_OPEN_HISTORY:
/* History parse */
- list_size = content_history_size(g_extern.history);
+ list_size = content_playlist_size(g_extern.history);
for (i = 0; i < list_size; i++)
{
char fill_buf[PATH_MAX];
const char *path, *core_path, *core_name = NULL;
- content_history_get_index(g_extern.history, i,
+ content_playlist_get_index(g_extern.history, i,
&path, &core_path, &core_name);
if (path)
diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c
index aa0c053423..42d4a99089 100644
--- a/frontend/menu/menu_common.c
+++ b/frontend/menu/menu_common.c
@@ -93,7 +93,7 @@ void menu_content_history_push_current(void)
if (g_extern.system.no_content || *tmp)
if (g_extern.history)
- content_history_push(g_extern.history,
+ content_playlist_push(g_extern.history,
*tmp ? tmp : NULL,
g_settings.libretro,
g_extern.system.info.library_name);
@@ -116,7 +116,7 @@ static void load_menu_content_prepare(void)
msg_queue_push(g_extern.msg_queue, str, 1, 1);
}
- content_history_push(g_extern.history,
+ content_playlist_push(g_extern.history,
*g_extern.fullpath ? g_extern.fullpath : NULL,
g_settings.libretro,
driver.menu->info.library_name ? driver.menu->info.library_name : "");
@@ -149,7 +149,7 @@ void load_menu_content_history(unsigned game_index)
if (!driver.menu)
return;
- content_history_get_index(g_extern.history,
+ content_playlist_get_index(g_extern.history,
game_index, &path, &core_path, &core_name);
strlcpy(g_settings.libretro, core_path, sizeof(g_settings.libretro));
diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h
index 313dbf1465..234b0f890b 100644
--- a/frontend/menu/menu_common.h
+++ b/frontend/menu/menu_common.h
@@ -27,7 +27,7 @@
#include "menu_navigation.h"
#include "../../core_info.h"
#include "../../file_list.h"
-#include "../../history.h"
+#include "../../playlist.h"
#include "../../input/input_common.h"
#include "../../input/keyboard_line.h"
#include "../../performance.h"
diff --git a/general.h b/general.h
index 673c2554a9..af3ed8fc03 100644
--- a/general.h
+++ b/general.h
@@ -35,7 +35,7 @@
#include "miscellaneous.h"
#include "gfx/filter.h"
-#include "history.h"
+#include "playlist.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -404,7 +404,7 @@ struct global
struct string_list *temporary_content;
- content_history_t *history;
+ content_playlist_t *history;
uint32_t content_crc;
diff --git a/griffin/griffin.c b/griffin/griffin.c
index 099eff6824..b937adcf39 100644
--- a/griffin/griffin.c
+++ b/griffin/griffin.c
@@ -595,9 +595,9 @@ SCREENSHOTS
/*============================================================
-HISTORY
+PLAYLISTS
============================================================ */
-#include "../history.c"
+#include "../playlist.c"
/*============================================================
MENU
diff --git a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj
index a51617330f..aba145d741 100644
--- a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj
+++ b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj
@@ -217,7 +217,7 @@
-
+
diff --git a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters
index ea18cfc31a..bdd419cbef 100644
--- a/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters
+++ b/msvc/msvc-2010/RetroArch-msvc2010.vcxproj.filters
@@ -5,8 +5,6 @@
-
-
diff --git a/history.c b/playlist.c
similarity index 69%
rename from history.c
rename to playlist.c
index 866c7f4742..dbb9d6c901 100644
--- a/history.c
+++ b/playlist.c
@@ -15,7 +15,7 @@
* If not, see .
*/
-#include "history.h"
+#include "playlist.h"
#include "msvc/msvc_compat.h"
#include "compat/posix_string.h"
#include "boolean.h"
@@ -26,23 +26,23 @@
#include
#include
-struct content_history_entry
+struct content_playlist_entry
{
char *path;
char *core_path;
char *core_name;
};
-struct content_history
+struct content_playlist
{
- struct content_history_entry *entries;
+ struct content_playlist_entry *entries;
size_t size;
size_t cap;
char *conf_path;
};
-void content_history_get_index(content_history_t *hist,
+void content_playlist_get_index(content_playlist_t *hist,
size_t index,
const char **path, const char **core_path,
const char **core_name)
@@ -55,7 +55,7 @@ void content_history_get_index(content_history_t *hist,
*core_name = hist->entries[index].core_name;
}
-static void content_history_free_entry(struct content_history_entry *entry)
+static void content_playlist_free_entry(struct content_playlist_entry *entry)
{
if (entry->path)
free(entry->path);
@@ -70,7 +70,7 @@ static void content_history_free_entry(struct content_history_entry *entry)
memset(entry, 0, sizeof(*entry));
}
-void content_history_push(content_history_t *hist,
+void content_playlist_push(content_playlist_t *hist,
const char *path, const char *core_path,
const char *core_name)
{
@@ -92,9 +92,9 @@ void content_history_push(content_history_t *hist,
return;
// Seen it before, bump to top.
- struct content_history_entry tmp = hist->entries[i];
+ struct content_playlist_entry tmp = hist->entries[i];
memmove(hist->entries + 1, hist->entries,
- i * sizeof(struct content_history_entry));
+ i * sizeof(struct content_playlist_entry));
hist->entries[0] = tmp;
return;
}
@@ -102,12 +102,12 @@ void content_history_push(content_history_t *hist,
if (hist->size == hist->cap)
{
- content_history_free_entry(&hist->entries[hist->cap - 1]);
+ content_playlist_free_entry(&hist->entries[hist->cap - 1]);
hist->size--;
}
memmove(hist->entries + 1, hist->entries,
- (hist->cap - 1) * sizeof(struct content_history_entry));
+ (hist->cap - 1) * sizeof(struct content_playlist_entry));
hist->entries[0].path = path ? strdup(path) : NULL;
hist->entries[0].core_path = strdup(core_path);
@@ -115,7 +115,7 @@ void content_history_push(content_history_t *hist,
hist->size++;
}
-static void content_history_write_file(content_history_t *hist)
+static void content_playlist_write_file(content_playlist_t *hist)
{
size_t i;
FILE *file = NULL;
@@ -127,7 +127,7 @@ static void content_history_write_file(content_history_t *hist)
if (!file)
{
- RARCH_ERR("Couldn't write to content history file: %s.\n", hist->conf_path);
+ RARCH_ERR("Couldn't write to content playlist file: %s.\n", hist->conf_path);
return;
}
@@ -142,52 +142,52 @@ static void content_history_write_file(content_history_t *hist)
fclose(file);
}
-void content_history_free(content_history_t *hist)
+void content_playlist_free(content_playlist_t *hist)
{
size_t i;
if (!hist)
return;
if (hist->conf_path)
- content_history_write_file(hist);
+ content_playlist_write_file(hist);
free(hist->conf_path);
for (i = 0; i < hist->cap; i++)
- content_history_free_entry(&hist->entries[i]);
+ content_playlist_free_entry(&hist->entries[i]);
free(hist->entries);
free(hist);
}
-void content_history_clear(content_history_t *hist)
+void content_playlist_clear(content_playlist_t *hist)
{
size_t i;
if (!hist)
return;
for (i = 0; i < hist->cap; i++)
- content_history_free_entry(&hist->entries[i]);
+ content_playlist_free_entry(&hist->entries[i]);
hist->size = 0;
}
-size_t content_history_size(content_history_t *hist)
+size_t content_playlist_size(content_playlist_t *hist)
{
if (hist)
return hist->size;
return 0;
}
-static bool content_history_read_file(content_history_t *hist, const char *path)
+static bool content_playlist_read_file(content_playlist_t *hist, const char *path)
{
char buf[3][PATH_MAX];
unsigned i;
- struct content_history_entry *entry = NULL;
+ struct content_playlist_entry *entry = NULL;
char *last = NULL;
FILE *file = fopen(path, "r");
if (!file || !hist)
{
- RARCH_ERR("Couldn't read content history file: %s.\n", path);
+ RARCH_ERR("Couldn't read content playlist file: %s.\n", path);
return true;
}
@@ -221,66 +221,66 @@ end:
return true;
}
-content_history_t *content_history_init(const char *path, size_t size)
+content_playlist_t *content_playlist_init(const char *path, size_t size)
{
- RARCH_LOG("Opening history: %s.\n", path);
- content_history_t *hist = (content_history_t*)calloc(1, sizeof(*hist));
+ RARCH_LOG("Opening playlist: %s.\n", path);
+ content_playlist_t *hist = (content_playlist_t*)calloc(1, sizeof(*hist));
if (!hist)
{
- RARCH_ERR("Cannot initialize content history.\n");
+ RARCH_ERR("Cannot initialize content playlist.\n");
return NULL;
}
- hist->entries = (struct content_history_entry*)calloc(size, sizeof(*hist->entries));
+ hist->entries = (struct content_playlist_entry*)calloc(size, sizeof(*hist->entries));
if (!hist->entries)
goto error;
hist->cap = size;
- if (!content_history_read_file(hist, path))
+ if (!content_playlist_read_file(hist, path))
goto error;
hist->conf_path = strdup(path);
return hist;
error:
- content_history_free(hist);
+ content_playlist_free(hist);
return NULL;
}
-const char* content_history_get_path(content_history_t *hist, unsigned index)
+const char* content_playlist_get_path(content_playlist_t *hist, unsigned index)
{
const char *path, *core_path, *core_name = NULL;
if (!hist)
return "";
- content_history_get_index(hist, index, &path, &core_path, &core_name);
+ content_playlist_get_index(hist, index, &path, &core_path, &core_name);
if (path)
return path;
return "";
}
-const char *content_history_get_core_path(content_history_t *hist, unsigned index)
+const char *content_playlist_get_core_path(content_playlist_t *hist, unsigned index)
{
const char *path, *core_path, *core_name = NULL;
if (!hist)
return "";
- content_history_get_index(hist, index, &path, &core_path, &core_name);
+ content_playlist_get_index(hist, index, &path, &core_path, &core_name);
if (core_path)
return core_path;
return "";
}
-const char *content_history_get_core_name(content_history_t *hist, unsigned index)
+const char *content_playlist_get_core_name(content_playlist_t *hist, unsigned index)
{
const char *path, *core_path, *core_name = NULL;
if (!hist)
return "";
- content_history_get_index(hist, index, &path, &core_path, &core_name);
+ content_playlist_get_index(hist, index, &path, &core_path, &core_name);
if (core_name)
return core_name;
diff --git a/history.h b/playlist.h
similarity index 65%
rename from history.h
rename to playlist.h
index 6a3e36f3ab..5fa5ee55bb 100644
--- a/history.h
+++ b/playlist.h
@@ -22,29 +22,29 @@
extern "C" {
#endif
-typedef struct content_history content_history_t;
+typedef struct content_playlist content_playlist_t;
-content_history_t *content_history_init(const char *path, size_t size);
-void content_history_free(content_history_t *hist);
+content_playlist_t *content_playlist_init(const char *path, size_t size);
+void content_playlist_free(content_playlist_t *hist);
-void content_history_clear(content_history_t *hist);
+void content_playlist_clear(content_playlist_t *hist);
-size_t content_history_size(content_history_t *hist);
+size_t content_playlist_size(content_playlist_t *hist);
-void content_history_get_index(content_history_t *hist,
+void content_playlist_get_index(content_playlist_t *hist,
size_t index,
const char **path, const char **core_path,
const char **core_name);
-void content_history_push(content_history_t *hist,
+void content_playlist_push(content_playlist_t *hist,
const char *path, const char *core_path,
const char *core_name);
-const char* content_history_get_path(content_history_t *hist,
+const char* content_playlist_get_path(content_playlist_t *hist,
unsigned index);
-const char* content_history_get_core_path(content_history_t *hist,
+const char* content_playlist_get_core_path(content_playlist_t *hist,
unsigned index);
-const char* content_history_get_core_name(content_history_t *hist,
+const char* content_playlist_get_core_name(content_playlist_t *hist,
unsigned index);
#ifdef __cplusplus
diff --git a/retroarch.c b/retroarch.c
index 2c4a1fd9a4..595aeec329 100644
--- a/retroarch.c
+++ b/retroarch.c
@@ -3212,11 +3212,11 @@ void rarch_main_command(unsigned action)
if (g_extern.history)
return;
- g_extern.history = content_history_init(g_settings.content_history_path, g_settings.content_history_size);
+ g_extern.history = content_playlist_init(g_settings.content_history_path, g_settings.content_history_size);
break;
case RARCH_CMD_HISTORY_DEINIT:
if (g_extern.history)
- content_history_free(g_extern.history);
+ content_playlist_free(g_extern.history);
g_extern.history = NULL;
break;
}