mirror of
https://github.com/libretro/beetle-wswan-libretro.git
synced 2024-11-27 02:00:30 +00:00
Get rid of more no longer used code
This commit is contained in:
parent
d50c1c45de
commit
983e4be4b4
38
libretro.cpp
38
libretro.cpp
@ -27,44 +27,6 @@ static bool select_pressed_last_frame;
|
||||
|
||||
static MDFN_Surface *surf;
|
||||
|
||||
static INLINE bool MDFN_DumpToFileReal(const char *filename, int compress, const std::vector<PtrLengthPair> &pearpairs)
|
||||
{
|
||||
RFILE *fp = filestream_open(filename, RETRO_VFS_FILE_ACCESS_WRITE,
|
||||
RETRO_VFS_FILE_ACCESS_HINT_NONE);
|
||||
|
||||
if (!fp)
|
||||
return 0;
|
||||
|
||||
for(unsigned int i = 0; i < pearpairs.size(); i++)
|
||||
{
|
||||
const void *data = pearpairs[i].GetData();
|
||||
const uint64 length = pearpairs[i].GetLength();
|
||||
|
||||
if (filestream_write(fp, data, length) != length)
|
||||
{
|
||||
filestream_close(fp);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (filestream_close(fp) == EOF)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool MDFN_DumpToFile(const char *filename, int compress, const std::vector<PtrLengthPair> &pearpairs)
|
||||
{
|
||||
return (MDFN_DumpToFileReal(filename, compress, pearpairs));
|
||||
}
|
||||
|
||||
bool MDFN_DumpToFile(const char *filename, int compress, const void *data, uint64 length)
|
||||
{
|
||||
std::vector<PtrLengthPair> tmp_pairs;
|
||||
tmp_pairs.push_back(PtrLengthPair(data, length));
|
||||
return (MDFN_DumpToFileReal(filename, compress, tmp_pairs));
|
||||
}
|
||||
|
||||
/* Cygne
|
||||
*
|
||||
* Copyright notice for this file:
|
||||
|
@ -7,38 +7,6 @@
|
||||
|
||||
#include "settings-common.h"
|
||||
|
||||
class PtrLengthPair
|
||||
{
|
||||
public:
|
||||
|
||||
inline PtrLengthPair(const void *new_data, const uint64 new_length)
|
||||
{
|
||||
data = new_data;
|
||||
length = new_length;
|
||||
}
|
||||
|
||||
~PtrLengthPair()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
INLINE const void *GetData(void) const
|
||||
{
|
||||
return(data);
|
||||
}
|
||||
|
||||
INLINE uint64 GetLength(void) const
|
||||
{
|
||||
return(length);
|
||||
}
|
||||
|
||||
private:
|
||||
const void *data;
|
||||
uint64 length;
|
||||
};
|
||||
|
||||
extern std::vector<MDFNGI *>MDFNSystems;
|
||||
|
||||
/* Indent stdout newlines +- "indent" amount */
|
||||
void MDFN_indent(int indent);
|
||||
void MDFN_printf(const char *format, ...);
|
||||
@ -73,6 +41,4 @@ int MDFNI_DatachSet(const uint8 *rcode);
|
||||
|
||||
void MDFNI_DumpModulesDef(const char *fn);
|
||||
|
||||
bool MDFN_DumpToFile(const char *filename, int compress, const std::vector<PtrLengthPair> &pearpairs);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user