fix libretro loading.. probably broken since we went 64bits, believe it or not

This commit is contained in:
zeromus 2017-08-05 00:59:17 -05:00
parent b5bb68fec5
commit 34d3073346
4 changed files with 6 additions and 6 deletions

View File

@ -151,8 +151,8 @@ namespace BizHawk.Emulation.Cores.Libretro
public retro_system_info retro_system_info; public retro_system_info retro_system_info;
public retro_system_av_info retro_system_av_info; public retro_system_av_info retro_system_av_info;
public uint retro_serialize_size_initial; //size_t :( public ulong retro_serialize_size_initial; //size_t :(
public uint retro_serialize_size; //size_t :( public ulong retro_serialize_size; //size_t :(
public uint retro_region; public uint retro_region;
public uint retro_api_version; public uint retro_api_version;

View File

@ -62,7 +62,7 @@ namespace BizHawk.Emulation.Cores.Libretro
{ {
Message(eMessage.CMD_UpdateSerializeSize); Message(eMessage.CMD_UpdateSerializeSize);
WaitForCMD(); WaitForCMD();
return comm->env.retro_serialize_size; return (uint)comm->env.retro_serialize_size;
} }
public bool CMD_Serialize(byte[] data) public bool CMD_Serialize(byte[] data)

View File

@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Cores.Libretro
public sbyte* valid_extensions; public sbyte* valid_extensions;
public bool need_fullpath; public bool need_fullpath;
public bool block_extract; public bool block_extract;
public short pad; short _pad;
} }
public struct retro_system_timing public struct retro_system_timing

View File

@ -375,7 +375,7 @@ namespace BizHawk.Emulation.Cores.Libretro
public void SaveStateBinary(System.IO.BinaryWriter writer) public void SaveStateBinary(System.IO.BinaryWriter writer)
{ {
api.CMD_UpdateSerializeSize(); api.CMD_UpdateSerializeSize();
if (savebuff == null || savebuff.Length != api.comm->env.retro_serialize_size) if (savebuff == null || savebuff.Length != (int)api.comm->env.retro_serialize_size)
{ {
savebuff = new byte[api.comm->env.retro_serialize_size]; savebuff = new byte[api.comm->env.retro_serialize_size];
savebuff2 = new byte[savebuff.Length + 13]; savebuff2 = new byte[savebuff.Length + 13];
@ -406,7 +406,7 @@ namespace BizHawk.Emulation.Cores.Libretro
public byte[] SaveStateBinary() public byte[] SaveStateBinary()
{ {
api.CMD_UpdateSerializeSize(); api.CMD_UpdateSerializeSize();
if (savebuff == null || savebuff.Length != api.comm->env.retro_serialize_size) if (savebuff == null || savebuff.Length != (int)api.comm->env.retro_serialize_size)
{ {
savebuff = new byte[api.comm->env.retro_serialize_size]; savebuff = new byte[api.comm->env.retro_serialize_size];
savebuff2 = new byte[savebuff.Length + 13]; savebuff2 = new byte[savebuff.Length + 13];