This commit is contained in:
twinaphex 2012-11-10 21:35:26 +01:00
parent 3f5879c3e3
commit 7a3f3c2a9d
7 changed files with 7 additions and 69 deletions

View File

@ -232,7 +232,6 @@ MEDNAFEN_SOURCES := $(MEDNAFEN_DIR)/mednafen.cpp \
$(MEDNAFEN_DIR)/state.cpp \
$(MEDNAFEN_DIR)/endian.cpp \
$(CDROM_SOURCES) \
$(MEDNAFEN_DIR)/memory.cpp \
$(MEDNAFEN_DIR)/mempatcher.cpp \
$(MEDNAFEN_DIR)/video/video.cpp \
$(MEDNAFEN_DIR)/video/Deinterlacer.cpp \

View File

@ -21,15 +21,9 @@ static INLINE int32 clamp_to_u16(int32 i)
template<typename T, typename U, typename V> static INLINE void clamp(T *val, U minimum, V maximum)
{
if(*val < minimum)
{
//printf("Warning: clamping to minimum(%d)\n", (int)minimum);
*val = minimum;
}
if(*val > maximum)
{
//printf("Warning: clamping to maximum(%d)\n", (int)maximum);
*val = maximum;
}
}
#endif

View File

@ -37,7 +37,6 @@ class ErrnoHolder
ErrnoHolder()
{
//SetErrno(0);
local_errno = 0;
local_strerror[0] = 0;
}

View File

@ -18,18 +18,12 @@
#include "mednafen.h"
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <trio/trio.h>
#include "file.h"
#include "general.h"
#ifndef __GNUC__
#define strcasecmp strcmp
#endif
static const int64 MaxROMImageSize = (int64)1 << 26; // 2 ^ 26 = 64MiB
enum

View File

@ -173,10 +173,6 @@
# define PREDEF_STANDARD_CXX89
#endif
#if defined(TRIO_PLATFORM_UNIX)
# include <unistd.h>
#endif
#if defined(_POSIX_VERSION)
# define PREDEF_STANDARD_POSIX _POSIX_VERSION
# if (_POSIX_VERSION >= 199506L)

View File

@ -1,44 +0,0 @@
/* Mednafen - Multi-system Emulator
*
* This program 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 Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "mednafen.h"
#include <stdlib.h>
#include <errno.h>
#include "memory.h"
void *MDFN_calloc_real(uint32 nmemb, uint32 size, const char *purpose, const char *_file, const int _line)
{
return calloc(nmemb, size);
}
void *MDFN_malloc_real(uint32 size, const char *purpose, const char *_file, const int _line)
{
return malloc(size);
}
void *MDFN_realloc_real(void *ptr, uint32 size, const char *purpose, const char *_file, const int _line)
{
return realloc(ptr, size);
}
void MDFN_free(void *ptr)
{
free(ptr);
}

View File

@ -6,14 +6,14 @@
#include <stdint.h>
#define MDFN_malloc(size, purpose) MDFN_malloc_real(size, purpose, __FILE__, __LINE__)
#define MDFN_calloc(nmemb, size, purpose) MDFN_calloc_real(nmemb, size, purpose, __FILE__, __LINE__)
#define MDFN_realloc(ptr, size, purpose) MDFN_realloc_real(ptr, size, purpose, __FILE__, __LINE__)
#define MDFN_malloc(size, purpose) malloc(size)
#define MDFN_calloc(nmemb, size, purpose) calloc(nmemb, size)
#define MDFN_realloc(ptr, size, purpose) realloc(ptr, size)
void *MDFN_malloc_real(uint32_t size, const char *purpose, const char *_file, const int _line);
void *MDFN_calloc_real(uint32_t nmemb, uint32_t size, const char *purpose, const char *_file, const int _line);
void *MDFN_realloc_real(void *ptr, uint32_t size, const char *purpose, const char *_file, const int _line);
void MDFN_free(void *ptr);
#define MDFN_malloc_real(size, purpose) malloc(size)
#define MDFN_calloc_real(nmemb, size, purpose) calloc(nmemb, size)
#define MDFN_realloc_real(ptr, size, purpose) realloc(ptr, size)
#define MDFN_free(ptr) free(ptr)
static inline void MDFN_FastU32MemsetM8(uint32_t *array, uint32_t value_32, unsigned int u32len)
{