mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-06-12 04:29:29 +00:00
fix merge error
This commit is contained in:
parent
d8290af331
commit
6039a60549
|
@ -2235,7 +2235,7 @@ static int redraw_func(void *arg)
|
||||||
|
|
||||||
// Wait
|
// Wait
|
||||||
next += VIDEO_REFRESH_DELAY;
|
next += VIDEO_REFRESH_DELAY;
|
||||||
uint64 delay = int32(next - GetTicks_usec());
|
int32 delay = int32(next - GetTicks_usec());
|
||||||
if (delay > 0)
|
if (delay > 0)
|
||||||
Delay_usec(delay);
|
Delay_usec(delay);
|
||||||
else if (delay < -VIDEO_REFRESH_DELAY)
|
else if (delay < -VIDEO_REFRESH_DELAY)
|
||||||
|
|
|
@ -212,26 +212,6 @@ int main(int argc, char **argv)
|
||||||
char str[256];
|
char str[256];
|
||||||
bool cd_boot = false;
|
bool cd_boot = false;
|
||||||
|
|
||||||
// Redirect stdout and stderr to a log file, for diagnostic purposes.
|
|
||||||
// Unbuffered file IO will be used (setup via setvbuf() calls), so as
|
|
||||||
// to write log file data ASAP, lest it get lost in case of program
|
|
||||||
// termination.
|
|
||||||
wchar_t logFileName[4096];
|
|
||||||
logFileName[0] = L'\0';
|
|
||||||
_wgetcwd(logFileName, SDL_arraysize(logFileName));
|
|
||||||
if (logFileName[0] != L'\0') {
|
|
||||||
SDL_wcslcat(logFileName, L"\\BasiliskII_log.txt", SDL_arraysize(logFileName));
|
|
||||||
FILE * fp;
|
|
||||||
fp = _wfreopen(logFileName, L"w", stdout);
|
|
||||||
if (fp) {
|
|
||||||
setvbuf(stdout, NULL, _IONBF, 0);
|
|
||||||
}
|
|
||||||
fp = _wfreopen(logFileName, L"w", stderr);
|
|
||||||
if (fp) {
|
|
||||||
setvbuf(stderr, NULL, _IONBF, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
RAMBaseHost = NULL;
|
RAMBaseHost = NULL;
|
||||||
ROMBaseHost = NULL;
|
ROMBaseHost = NULL;
|
||||||
|
@ -303,6 +283,10 @@ int main(int argc, char **argv)
|
||||||
QuitEmulator();
|
QuitEmulator();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// FIXME: default to DIB driver
|
||||||
|
if (getenv("SDL_VIDEODRIVER") == NULL)
|
||||||
|
putenv("SDL_VIDEODRIVER=windib");
|
||||||
|
|
||||||
// Initialize SDL system
|
// Initialize SDL system
|
||||||
int sdl_flags = 0;
|
int sdl_flags = 0;
|
||||||
#ifdef USE_SDL_VIDEO
|
#ifdef USE_SDL_VIDEO
|
||||||
|
@ -416,7 +400,7 @@ int main(int argc, char **argv)
|
||||||
emul_thread = GetCurrentThread();
|
emul_thread = GetCurrentThread();
|
||||||
|
|
||||||
// SDL threads available, start 60Hz thread
|
// SDL threads available, start 60Hz thread
|
||||||
tick_thread_active = ((tick_thread = SDL_CreateThread(tick_func, "Redraw Thread", NULL)) != NULL);
|
tick_thread_active = ((tick_thread = SDL_CreateThread(tick_func, NULL)) != NULL);
|
||||||
if (!tick_thread_active) {
|
if (!tick_thread_active) {
|
||||||
sprintf(str, GetString(STR_TICK_THREAD_ERR), strerror(errno));
|
sprintf(str, GetString(STR_TICK_THREAD_ERR), strerror(errno));
|
||||||
ErrorAlert(str);
|
ErrorAlert(str);
|
||||||
|
@ -426,7 +410,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
// Start XPRAM watchdog thread
|
// Start XPRAM watchdog thread
|
||||||
memcpy(last_xpram, XPRAM, XPRAM_SIZE);
|
memcpy(last_xpram, XPRAM, XPRAM_SIZE);
|
||||||
xpram_thread_active = ((xpram_thread = SDL_CreateThread(xpram_func, "XPRAM Thread", NULL)) != NULL);
|
xpram_thread_active = ((xpram_thread = SDL_CreateThread(xpram_func, NULL)) != NULL);
|
||||||
D(bug("XPRAM thread started\n"));
|
D(bug("XPRAM thread started\n"));
|
||||||
|
|
||||||
// Start 68k and jump to ROM boot routine
|
// Start 68k and jump to ROM boot routine
|
||||||
|
@ -641,21 +625,11 @@ static int tick_func(void *arg)
|
||||||
|
|
||||||
#ifdef USE_SDL_VIDEO
|
#ifdef USE_SDL_VIDEO
|
||||||
#include <SDL_syswm.h>
|
#include <SDL_syswm.h>
|
||||||
extern SDL_Window *sdl_window;
|
|
||||||
HWND GetMainWindowHandle(void)
|
HWND GetMainWindowHandle(void)
|
||||||
{
|
{
|
||||||
SDL_SysWMinfo wmInfo;
|
SDL_SysWMinfo wmInfo;
|
||||||
SDL_VERSION(&wmInfo.version);
|
SDL_VERSION(&wmInfo.version);
|
||||||
if (!sdl_window) {
|
return SDL_GetWMInfo(&wmInfo) ? wmInfo.window : NULL;
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (!SDL_GetWindowWMInfo(sdl_window, &wmInfo)) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (wmInfo.subsystem != SDL_SYSWM_WINDOWS) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
return wmInfo.info.win.window;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
116
BasiliskII/src/slirp/slirp.h
Normal file → Executable file
116
BasiliskII/src/slirp/slirp.h
Normal file → Executable file
|
@ -28,6 +28,7 @@ typedef unsigned long ioctlsockopt_t;
|
||||||
#define _WIN32_WINNT 0x501
|
#define _WIN32_WINNT 0x501
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
//# include <windows.h>
|
||||||
# include <winsock2.h>
|
# include <winsock2.h>
|
||||||
# include <WS2tcpip.h>
|
# include <WS2tcpip.h>
|
||||||
|
|
||||||
|
@ -50,6 +51,12 @@ INT WSAAPI inet_pton(
|
||||||
# include <iphlpapi.h>
|
# include <iphlpapi.h>
|
||||||
|
|
||||||
# define USE_FIONBIO 1
|
# define USE_FIONBIO 1
|
||||||
|
# define EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
|
# define EINPROGRESS WSAEINPROGRESS
|
||||||
|
# define ENOTCONN WSAENOTCONN
|
||||||
|
# define EHOSTUNREACH WSAEHOSTUNREACH
|
||||||
|
# define ENETUNREACH WSAENETUNREACH
|
||||||
|
# define ECONNREFUSED WSAECONNREFUSED
|
||||||
|
|
||||||
/* Basilisk II Router defines those */
|
/* Basilisk II Router defines those */
|
||||||
# define udp_read_completion slirp_udp_read_completion
|
# define udp_read_completion slirp_udp_read_completion
|
||||||
|
@ -155,23 +162,32 @@ typedef u_int32_t uint32;
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _P
|
||||||
|
#ifndef NO_PROTOTYPES
|
||||||
|
# define _P(x) x
|
||||||
|
#else
|
||||||
|
# define _P(x) ()
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef GETTIMEOFDAY_ONE_ARG
|
#ifdef GETTIMEOFDAY_ONE_ARG
|
||||||
#define gettimeofday(x, y) gettimeofday(x)
|
#define gettimeofday(x, y) gettimeofday(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Systems lacking strdup() definition in <string.h>. */
|
/* Systems lacking strdup() definition in <string.h>. */
|
||||||
#if defined(ultrix)
|
#if defined(ultrix)
|
||||||
char *strdup(const char *);
|
char *strdup _P((const char *));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Systems lacking malloc() definition in <stdlib.h>. */
|
/* Systems lacking malloc() definition in <stdlib.h>. */
|
||||||
#if defined(ultrix) || defined(hcx)
|
#if defined(ultrix) || defined(hcx)
|
||||||
void *malloc(size_t arg);
|
void *malloc _P((size_t arg));
|
||||||
void free(void *ptr);
|
void free _P((void *ptr));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_INET_ATON
|
#ifndef HAVE_INET_ATON
|
||||||
int inet_aton(const char *cp, struct in_addr *ia);
|
int inet_aton _P((const char *cp, struct in_addr *ia));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -209,7 +225,11 @@ int inet_aton(const char *cp, struct in_addr *ia);
|
||||||
#include <ppp/slirppp.h>
|
#include <ppp/slirppp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#else
|
||||||
|
#include <varargs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
@ -268,38 +288,38 @@ extern struct ttys *ttys_unit[MAX_INTERFACES];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FULL_BOLT
|
#ifndef FULL_BOLT
|
||||||
void if_start(void);
|
void if_start _P((void));
|
||||||
#else
|
#else
|
||||||
void if_start(struct ttys *);
|
void if_start _P((struct ttys *));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BAD_SPRINTF
|
#ifdef BAD_SPRINTF
|
||||||
# define vsprintf vsprintf_len
|
# define vsprintf vsprintf_len
|
||||||
# define sprintf sprintf_len
|
# define sprintf sprintf_len
|
||||||
extern int vsprintf_len(char *, const char *, va_list);
|
extern int vsprintf_len _P((char *, const char *, va_list));
|
||||||
extern int sprintf_len(char *, const char *, ...);
|
extern int sprintf_len _P((char *, const char *, ...));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DECLARE_SPRINTF
|
#ifdef DECLARE_SPRINTF
|
||||||
# ifndef BAD_SPRINTF
|
# ifndef BAD_SPRINTF
|
||||||
extern int vsprintf(char *, const char *, va_list);
|
extern int vsprintf _P((char *, const char *, va_list));
|
||||||
# endif
|
# endif
|
||||||
extern int vfprintf(FILE *, const char *, va_list);
|
extern int vfprintf _P((FILE *, const char *, va_list));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRERROR
|
#ifndef HAVE_STRERROR
|
||||||
extern char *strerror(int error);
|
extern char *strerror _P((int error));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_INDEX
|
#ifndef HAVE_INDEX
|
||||||
char *index(const char *, int);
|
char *index _P((const char *, int));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GETHOSTID
|
#ifndef HAVE_GETHOSTID
|
||||||
long gethostid(void);
|
long gethostid _P((void));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void lprint(const char *, ...);
|
void lprint _P((const char *, ...));
|
||||||
|
|
||||||
extern int do_echo;
|
extern int do_echo;
|
||||||
|
|
||||||
|
@ -321,47 +341,48 @@ extern int do_echo;
|
||||||
int cksum(struct mbuf *m, int len);
|
int cksum(struct mbuf *m, int len);
|
||||||
|
|
||||||
/* if.c */
|
/* if.c */
|
||||||
void if_init(void);
|
void if_init _P((void));
|
||||||
void if_output(struct socket *, struct mbuf *);
|
void if_output _P((struct socket *, struct mbuf *));
|
||||||
|
|
||||||
/* ip_input.c */
|
/* ip_input.c */
|
||||||
void ip_init(void);
|
void ip_init _P((void));
|
||||||
void ip_input(struct mbuf *);
|
void ip_input _P((struct mbuf *));
|
||||||
struct ip * ip_reass(register struct ipasfrag *, register struct ipq *);
|
static struct ip *
|
||||||
void ip_freef(struct ipq *);
|
ip_reass(register struct ip *ip, register struct ipq *);
|
||||||
void ip_enq(register struct ipasfrag *, register struct ipasfrag *);
|
void ip_freef _P((struct ipq *));
|
||||||
void ip_deq(register struct ipasfrag *);
|
void ip_enq _P((register struct ipasfrag *, register struct ipasfrag *));
|
||||||
void ip_slowtimo(void);
|
void ip_deq _P((register struct ipasfrag *));
|
||||||
void ip_stripoptions(register struct mbuf *, struct mbuf *);
|
void ip_slowtimo _P((void));
|
||||||
|
void ip_stripoptions _P((register struct mbuf *, struct mbuf *));
|
||||||
|
|
||||||
/* ip_output.c */
|
/* ip_output.c */
|
||||||
int ip_output(struct socket *, struct mbuf *);
|
int ip_output _P((struct socket *, struct mbuf *));
|
||||||
|
|
||||||
/* tcp_input.c */
|
/* tcp_input.c */
|
||||||
int tcp_reass(register struct tcpcb *, register struct tcpiphdr *, struct mbuf *);
|
int tcp_reass _P((register struct tcpcb *, register struct tcpiphdr *, struct mbuf *));
|
||||||
void tcp_input(register struct mbuf *, int, struct socket *);
|
void tcp_input _P((register struct mbuf *, int, struct socket *));
|
||||||
void tcp_dooptions(struct tcpcb *, u_char *, int, struct tcpiphdr *);
|
void tcp_dooptions _P((struct tcpcb *, u_char *, int, struct tcpiphdr *));
|
||||||
void tcp_xmit_timer(register struct tcpcb *, int);
|
void tcp_xmit_timer _P((register struct tcpcb *, int));
|
||||||
u_int tcp_mss(register struct tcpcb *, u_int);
|
int tcp_mss _P((register struct tcpcb *, u_int));
|
||||||
|
|
||||||
/* tcp_output.c */
|
/* tcp_output.c */
|
||||||
int tcp_output(register struct tcpcb *);
|
int tcp_output _P((register struct tcpcb *));
|
||||||
void tcp_setpersist(register struct tcpcb *);
|
void tcp_setpersist _P((register struct tcpcb *));
|
||||||
|
|
||||||
/* tcp_subr.c */
|
/* tcp_subr.c */
|
||||||
void tcp_init(void);
|
void tcp_init _P((void));
|
||||||
void tcp_template(struct tcpcb *);
|
void tcp_template _P((struct tcpcb *));
|
||||||
void tcp_respond(struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int);
|
void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int));
|
||||||
struct tcpcb * tcp_newtcpcb(struct socket *);
|
struct tcpcb * tcp_newtcpcb _P((struct socket *));
|
||||||
struct tcpcb * tcp_close(register struct tcpcb *);
|
struct tcpcb * tcp_close _P((register struct tcpcb *));
|
||||||
void tcp_drain(void);
|
void tcp_drain _P((void));
|
||||||
void tcp_sockclosed(struct tcpcb *);
|
void tcp_sockclosed _P((struct tcpcb *));
|
||||||
int tcp_fconnect(struct socket *);
|
int tcp_fconnect _P((struct socket *));
|
||||||
void tcp_connect(struct socket *);
|
void tcp_connect _P((struct socket *));
|
||||||
int tcp_attach(struct socket *);
|
int tcp_attach _P((struct socket *));
|
||||||
u_int8_t tcp_tos(struct socket *);
|
u_int8_t tcp_tos _P((struct socket *));
|
||||||
int tcp_emu(struct socket *, struct mbuf *);
|
int tcp_emu _P((struct socket *, struct mbuf *));
|
||||||
int tcp_ctl(struct socket *);
|
int tcp_ctl _P((struct socket *));
|
||||||
struct tcpcb *tcp_drop(struct tcpcb *tp, int err);
|
struct tcpcb *tcp_drop(struct tcpcb *tp, int err);
|
||||||
|
|
||||||
#ifdef USE_PPP
|
#ifdef USE_PPP
|
||||||
|
@ -377,4 +398,9 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err);
|
||||||
#define max(x,y) ((x) > (y) ? (x) : (y))
|
#define max(x,y) ((x) > (y) ? (x) : (y))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#undef errno
|
||||||
|
#define errno (WSAGetLastError())
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user