all repos — mgba @ 6d898542c765f4efc4a094c5ebd3f3465c36f417

mGBA Game Boy Advance Emulator

src/util/patch.c (view raw)

 1/* Copyright (c) 2013-2014 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#include "util/patch.h"
 7
 8#include "util/patch-ips.h"
 9#include "util/patch-ups.h"
10
11bool loadPatch(struct VFile* vf, struct Patch* patch) {
12	patch->vf = vf;
13
14	if (loadPatchIPS(patch)) {
15		return true;
16	}
17
18	if (loadPatchUPS(patch)) {
19		return true;
20	}
21
22	patch->outputSize = 0;
23	patch->applyPatch = 0;
24	return false;
25}