mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-28 02:45:27 +01:00
(libretro) Implement error for logging
This commit is contained in:
parent
64f496e81f
commit
38db336f93
@ -1,5 +1,6 @@
|
|||||||
NTSC = 0
|
NTSC = 0
|
||||||
DEBUG = 0
|
DEBUG = 0
|
||||||
|
LOGSOUND = 0
|
||||||
|
|
||||||
GENPLUS_SRC_DIR := source
|
GENPLUS_SRC_DIR := source
|
||||||
LIBRETRO_DIR := libretro
|
LIBRETRO_DIR := libretro
|
||||||
@ -124,6 +125,10 @@ LIBRETRO_SRC := $(GENPLUS_SRC_DIR)/genesis.c \
|
|||||||
|
|
||||||
LIBRETRO_OBJ := $(LIBRETRO_SRC:.c=.o)
|
LIBRETRO_OBJ := $(LIBRETRO_SRC:.c=.o)
|
||||||
|
|
||||||
|
ifeq ($(LOGSOUND), 1)
|
||||||
|
LIBRETRO_CFLAGS := -DLOGSOUND
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(platform), sncps3)
|
ifeq ($(platform), sncps3)
|
||||||
CODE_DEFINES =
|
CODE_DEFINES =
|
||||||
else
|
else
|
||||||
@ -133,7 +138,7 @@ endif
|
|||||||
DEFINES :=
|
DEFINES :=
|
||||||
CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES)
|
CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES)
|
||||||
|
|
||||||
LIBRETRO_CFLAGS := -I$(GENPLUS_SRC_DIR) \
|
LIBRETRO_CFLAGS += -I$(GENPLUS_SRC_DIR) \
|
||||||
-I$(GENPLUS_SRC_DIR)/sound \
|
-I$(GENPLUS_SRC_DIR)/sound \
|
||||||
-I$(GENPLUS_SRC_DIR)/input_hw \
|
-I$(GENPLUS_SRC_DIR)/input_hw \
|
||||||
-I$(GENPLUS_SRC_DIR)/cart_hw \
|
-I$(GENPLUS_SRC_DIR)/cart_hw \
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
@ -96,6 +97,22 @@ static uint8_t brm_format[0x40] =
|
|||||||
************************************/
|
************************************/
|
||||||
#define CHUNKSIZE (0x10000)
|
#define CHUNKSIZE (0x10000)
|
||||||
|
|
||||||
|
void error(char * msg, ...)
|
||||||
|
{
|
||||||
|
#ifdef _XBOX1
|
||||||
|
char buffer[1024];
|
||||||
|
#endif
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, msg);
|
||||||
|
#ifdef _XBOX1
|
||||||
|
vsnprintf(buffer, sizeof(buffer), msg, ap);
|
||||||
|
OutputDebugStringA(buffer);
|
||||||
|
#else
|
||||||
|
vfprintf(stderr, msg, ap);
|
||||||
|
#endif
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
int load_archive(char *filename, unsigned char *buffer, int maxsize)
|
int load_archive(char *filename, unsigned char *buffer, int maxsize)
|
||||||
{
|
{
|
||||||
int size = 0;
|
int size = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user