mirror of https://github.com/LIJI32/SameBoy.git
Rename GB_log_attributes to GB_log_attributes_t
This commit is contained in:
parent
14e486017a
commit
fdc39f9bd6
|
@ -134,7 +134,7 @@ static void vblank(GB_gameboy_t *gb, GB_vblank_type_t type)
|
|||
[self vblankWithType:type];
|
||||
}
|
||||
|
||||
static void consoleLog(GB_gameboy_t *gb, const char *string, GB_log_attributes attributes)
|
||||
static void consoleLog(GB_gameboy_t *gb, const char *string, GB_log_attributes_t attributes)
|
||||
{
|
||||
Document *self = (__bridge Document *)GB_get_user_data(gb);
|
||||
[self log:string withAttributes: attributes];
|
||||
|
@ -1534,7 +1534,7 @@ enum GBWindowResizeAction
|
|||
[_consoleOutputLock unlock];
|
||||
}
|
||||
|
||||
- (void)log:(const char *)string withAttributes:(GB_log_attributes)attributes
|
||||
- (void)log:(const char *)string withAttributes:(GB_log_attributes_t)attributes
|
||||
{
|
||||
NSString *nsstring = @(string); // For ref-counting
|
||||
if (_capturedOutput) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "gb.h"
|
||||
|
||||
|
||||
void GB_attributed_logv(GB_gameboy_t *gb, GB_log_attributes attributes, const char *fmt, va_list args)
|
||||
void GB_attributed_logv(GB_gameboy_t *gb, GB_log_attributes_t attributes, const char *fmt, va_list args)
|
||||
{
|
||||
char *string = NULL;
|
||||
vasprintf(&string, fmt, args);
|
||||
|
@ -29,7 +29,7 @@ void GB_attributed_logv(GB_gameboy_t *gb, GB_log_attributes attributes, const ch
|
|||
free(string);
|
||||
}
|
||||
|
||||
void GB_attributed_log(GB_gameboy_t *gb, GB_log_attributes attributes, const char *fmt, ...)
|
||||
void GB_attributed_log(GB_gameboy_t *gb, GB_log_attributes_t attributes, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
|
|
@ -235,7 +235,7 @@ typedef enum {
|
|||
GB_LOG_DASHED_UNDERLINE = 2,
|
||||
GB_LOG_UNDERLINE = 4,
|
||||
GB_LOG_UNDERLINE_MASK = GB_LOG_DASHED_UNDERLINE | GB_LOG_UNDERLINE
|
||||
} GB_log_attributes;
|
||||
} GB_log_attributes_t;
|
||||
|
||||
typedef enum {
|
||||
GB_BOOT_ROM_DMG_0,
|
||||
|
@ -265,7 +265,7 @@ typedef enum {
|
|||
|
||||
#endif
|
||||
|
||||
typedef void (*GB_log_callback_t)(GB_gameboy_t *gb, const char *string, GB_log_attributes attributes);
|
||||
typedef void (*GB_log_callback_t)(GB_gameboy_t *gb, const char *string, GB_log_attributes_t attributes);
|
||||
typedef char *(*GB_input_callback_t)(GB_gameboy_t *gb);
|
||||
typedef void (*GB_debugger_reload_callback_t)(GB_gameboy_t *gb);
|
||||
typedef void (*GB_infrared_callback_t)(GB_gameboy_t *gb, bool on);
|
||||
|
@ -935,7 +935,7 @@ void GB_set_turbo_mode(GB_gameboy_t *gb, bool on, bool no_frame_skip);
|
|||
void GB_set_rendering_disabled(GB_gameboy_t *gb, bool disabled);
|
||||
|
||||
void GB_log(GB_gameboy_t *gb, const char *fmt, ...) __printflike(2, 3);
|
||||
void GB_attributed_log(GB_gameboy_t *gb, GB_log_attributes attributes, const char *fmt, ...) __printflike(3, 4);
|
||||
void GB_attributed_log(GB_gameboy_t *gb, GB_log_attributes_t attributes, const char *fmt, ...) __printflike(3, 4);
|
||||
|
||||
void GB_set_pixels_output(GB_gameboy_t *gb, uint32_t *output);
|
||||
uint32_t *GB_get_pixels_output(GB_gameboy_t *gb);
|
||||
|
|
|
@ -19,7 +19,7 @@ static char *async_input_callback(GB_gameboy_t *gb)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void log_callback(GB_gameboy_t *gb, const char *string, GB_log_attributes attributes)
|
||||
static void log_callback(GB_gameboy_t *gb, const char *string, GB_log_attributes_t attributes)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ static char *completer(const char *substring, uintptr_t *context)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void log_callback(GB_gameboy_t *gb, const char *string, GB_log_attributes attributes)
|
||||
static void log_callback(GB_gameboy_t *gb, const char *string, GB_log_attributes_t attributes)
|
||||
{
|
||||
CON_attributes_t con_attributes = {0,};
|
||||
con_attributes.bold = attributes & GB_LOG_BOLD;
|
||||
|
@ -128,7 +128,7 @@ retry: {
|
|||
|
||||
static char *captured_log = NULL;
|
||||
|
||||
static void log_capture_callback(GB_gameboy_t *gb, const char *string, GB_log_attributes attributes)
|
||||
static void log_capture_callback(GB_gameboy_t *gb, const char *string, GB_log_attributes_t attributes)
|
||||
{
|
||||
size_t current_len = strlen(captured_log);
|
||||
size_t len_to_add = strlen(string);
|
||||
|
|
|
@ -107,7 +107,7 @@ static void printDone(GB_gameboy_t *gb)
|
|||
}
|
||||
|
||||
|
||||
static void consoleLog(GB_gameboy_t *gb, const char *string, GB_log_attributes attributes)
|
||||
static void consoleLog(GB_gameboy_t *gb, const char *string, GB_log_attributes_t attributes)
|
||||
{
|
||||
static NSString *buffer = @"";
|
||||
buffer = [buffer stringByAppendingString:@(string)];
|
||||
|
|
Loading…
Reference in New Issue