fix windows build for once

This commit is contained in:
tildearrow 2021-05-28 15:25:55 -05:00
parent cb6f058389
commit 2d3580a05c
262 changed files with 76249 additions and 22 deletions

View file

@ -6,8 +6,13 @@
#define GB_CLOCK_RATE 0x400000
#ifdef __GNUC__
#define likely(x) __builtin_expect((x), 1)
#define unlikely(x) __builtin_expect((x), 0)
#else
#define likely(x) x
#define unlikely(x) x
#endif
static const uint8_t duties[] = {
0, 0, 0, 0, 0, 0, 0, 1,

View file

@ -1,6 +1,5 @@
#ifndef GB_h
#define GB_h
#define typeof __typeof__
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
@ -94,14 +93,6 @@ typedef union {
uint8_t data[5];
} GB_rtc_time_t;
typedef struct __attribute__((packed)) {
uint64_t last_rtc_second;
uint16_t minutes;
uint16_t days;
uint16_t alarm_minutes, alarm_days;
uint8_t alarm_enabled;
} GB_huc3_rtc_time_t;
typedef enum {
// GB_MODEL_DMG_0 = 0x000,
// GB_MODEL_DMG_A = 0x001,
@ -285,11 +276,11 @@ typedef enum {
#define INTERNAL_DIV_CYCLES (0x40000)
#if !defined(MIN)
#define MIN(A, B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __a : __b; })
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#if !defined(MAX)
#define MAX(A, B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
typedef void (*GB_vblank_callback_t)(GB_gameboy_t *gb);

View file

@ -2,6 +2,7 @@
#define _SAFEREADER_H
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "../ta-utils.h"
class SafeReader;