mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-09-10 16:53:15 +02:00
(libretro) Implement error for logging
This commit is contained in:
parent
64f496e81f
commit
38db336f93
@ -1,5 +1,6 @@
|
||||
NTSC = 0
|
||||
DEBUG = 0
|
||||
LOGSOUND = 0
|
||||
|
||||
GENPLUS_SRC_DIR := source
|
||||
LIBRETRO_DIR := libretro
|
||||
@ -124,6 +125,10 @@ LIBRETRO_SRC := $(GENPLUS_SRC_DIR)/genesis.c \
|
||||
|
||||
LIBRETRO_OBJ := $(LIBRETRO_SRC:.c=.o)
|
||||
|
||||
ifeq ($(LOGSOUND), 1)
|
||||
LIBRETRO_CFLAGS := -DLOGSOUND
|
||||
endif
|
||||
|
||||
ifeq ($(platform), sncps3)
|
||||
CODE_DEFINES =
|
||||
else
|
||||
@ -133,7 +138,7 @@ endif
|
||||
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)/input_hw \
|
||||
-I$(GENPLUS_SRC_DIR)/cart_hw \
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@ -96,6 +97,22 @@ static uint8_t brm_format[0x40] =
|
||||
************************************/
|
||||
#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 size = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user