Change load_gamepak signature

This commit is contained in:
twinaphex 2014-12-20 08:35:53 +01:00
parent 9fe97ba148
commit ba834beeb1
3 changed files with 29 additions and 31 deletions

View file

@ -2388,17 +2388,16 @@ char gamepak_code[5];
char gamepak_maker[3];
char gamepak_filename[512];
u32 load_gamepak(const char *name)
u32 load_gamepak(const struct retro_game_info* info, const char *name)
{
char cheats_filename[256];
char *p;
s32 file_size = load_gamepak_raw(name);
// A dumb April fool's joke was here once :o
if(file_size == -1)
return -1;
if(file_size != -1)
{
gamepak_size = (file_size + 0x7FFF) & ~0x7FFF;
strncpy(gamepak_filename, name, sizeof(gamepak_filename));
@ -2430,9 +2429,6 @@ u32 load_gamepak(const char *name)
return 0;
}
return -1;
}
s32 load_bios(char *name)
{
file_open(bios_file, name, read);

View file

@ -20,6 +20,8 @@
#ifndef MEMORY_H
#define MEMORY_H
#include "libretro.h"
typedef enum
{
DMA_START_IMMEDIATELY,
@ -175,7 +177,7 @@ extern char gamepak_filename[512];
cpu_alert_type dma_transfer(dma_transfer_type *dma);
u8 *memory_region(u32 address, u32 *memory_limit);
u32 load_gamepak(const char *name);
u32 load_gamepak(const struct retro_game_info* info, const char *name);
u32 load_backup(char *name);
s32 load_bios(char *name);
void update_backup(void);

View file

@ -320,7 +320,7 @@ bool retro_load_game(const struct retro_game_info* info)
gamepak_filename[0] = 0;
if (load_gamepak(info->path) != 0)
if (load_gamepak(info, info->path) != 0)
{
error_msg("Could not load the game file.");
return false;