Include patch.c inside task_content.c

This commit is contained in:
twinaphex 2017-01-31 04:53:16 +01:00
parent 68211e2721
commit ae4f5104a4
4 changed files with 5 additions and 56 deletions

View File

@ -750,11 +750,6 @@ MESSAGE
============================================================ */
#include "../libretro-common/queues/message_queue.c"
/*============================================================
PATCH
============================================================ */
#include "../patch.c"
/*============================================================
CONFIGURATION
============================================================ */

View File

@ -585,7 +585,7 @@ static bool try_ips_patch(bool allow_ips,
* Apply patch to the content file in-memory.
*
**/
void patch_content(
static void patch_content(
const char *name_ips,
const char *name_bps,
const char *name_ups,

48
patch.h
View File

@ -1,48 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __PATCH_H
#define __PATCH_H
#include <stdint.h>
#include <stddef.h>
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
/* BPS/UPS/IPS implementation from bSNES (nall::).
* Modified for RetroArch. */
/**
* patch_content:
* @buf : buffer of the content file.
* @size : size of the content file.
*
* Apply patch to the content file in-memory.
*
**/
void patch_content(
const char *name_ips,
const char *name_bps,
const char *name_ups,
uint8_t **buf,
void *data);
RETRO_END_DECLS
#endif

View File

@ -85,7 +85,6 @@
#include "../msg_hash.h"
#include "../content.h"
#include "../dynamic.h"
#include "../patch.h"
#include "../runloop.h"
#include "../retroarch.h"
#include "../file_path_special.h"
@ -94,6 +93,8 @@
#include "../paths.h"
#include "../verbosity.h"
#include "../patch.c"
#define MAX_ARGS 32
typedef struct content_stream
@ -342,7 +343,8 @@ static bool load_content_into_memory(
global->name.ips,
global->name.bps,
global->name.ups,
&ret_buf, length);
(uint8_t**)&ret_buf,
(void*)length);
}
content_get_crc(&content_crc_ptr);