From cad2eee9e0d3d3f630f1a16f24fedf061fd4eb54 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Sat, 27 Aug 2016 13:54:02 +0200 Subject: [PATCH] Fix some PS3 derps --- audio/drivers/ps3_audio.c | 2 +- .../gl_renderchains/render_chain_gl_legacy.c | 2 +- tasks/task_content.c | 93 +++++++++---------- 3 files changed, 45 insertions(+), 52 deletions(-) diff --git a/audio/drivers/ps3_audio.c b/audio/drivers/ps3_audio.c index 46fdefcc7d..f552803812 100644 --- a/audio/drivers/ps3_audio.c +++ b/audio/drivers/ps3_audio.c @@ -52,7 +52,7 @@ static void event_loop(uint64_t data) sys_event_queue_t id; sys_ipc_key_t key; sys_event_t event; - ps3_audio_t *aud = data; + ps3_audio_t *aud = (ps3_audio_t*)data; cellAudioCreateNotifyEventQueue(&id, &key); cellAudioSetNotifyEventQueue(key); diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c index 309040db3d..c16a80bafe 100644 --- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c @@ -709,7 +709,7 @@ void gl_deinit_fbo(gl_t *gl) glDeleteTextures(1, &gl->fbo_feedback_texture); gl->fbo_feedback_enable = false; - gl->fbo_feedback_pass = -1; + gl->fbo_feedback_pass = -1; /* TODO: this member is unsigned, figure out what it should be */ gl->fbo_feedback_texture = 0; gl->fbo_feedback = 0; } diff --git a/tasks/task_content.c b/tasks/task_content.c index 5fe8fc877c..cfe2159c7f 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -123,6 +123,49 @@ static bool core_does_not_need_content = false; static uint32_t content_crc = 0; #ifdef HAVE_COMPRESSION +/** + * filename_split_archive: + * @str : filename to turn into a string list + * + * Creates a new string list based on filename @path, delimited by a hash (#). + * + * Returns: new string list if successful, otherwise NULL. + */ +static struct string_list *filename_split_archive(const char *path) +{ + union string_list_elem_attr attr; + struct string_list *list = string_list_new(); + const char *delim = NULL; + + memset(&attr, 0, sizeof(attr)); + + delim = path_get_archive_delim(path); + + if (delim) + { + /* add archive path to list first */ + if (!string_list_append_n(list, path, delim - path, attr)) + goto error; + + /* now add the path within the archive */ + delim++; + + if (*delim) + { + if (!string_list_append(list, delim, attr)) + goto error; + } + } + else + if (!string_list_append(list, path, attr)) + goto error; + + return list; + +error: + string_list_free(list); + return NULL; +} #ifdef HAVE_7ZIP static bool utf16_to_char(uint8_t **utf_data, @@ -312,56 +355,6 @@ static int content_7zip_file_read( return outsize; } -#ifdef HAVE_COMPRESSION -/** - * filename_split_archive: - * @str : filename to turn into a string list - * - * Creates a new string list based on filename @path, delimited by a hash (#). - * - * Returns: new string list if successful, otherwise NULL. - */ -static struct string_list *filename_split_archive(const char *path) -{ - union string_list_elem_attr attr; - struct string_list *list = string_list_new(); -#ifdef HAVE_COMPRESSION - const char *delim = NULL; -#endif - - memset(&attr, 0, sizeof(attr)); - -#ifdef HAVE_COMPRESSION - delim = path_get_archive_delim(path); - - if (delim) - { - /* add archive path to list first */ - if (!string_list_append_n(list, path, delim - path, attr)) - goto error; - - /* now add the path within the archive */ - delim++; - - if (*delim) - { - if (!string_list_append(list, delim, attr)) - goto error; - } - } - else -#endif - if (!string_list_append(list, path, attr)) - goto error; - - return list; - -error: - string_list_free(list); - return NULL; -} -#endif - static struct string_list *compressed_7zip_file_list_new( const char *path, const char* ext) {