mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-12-21 23:08:53 -05:00
Add missing stuff for windows build
This commit is contained in:
parent
9f1dbf6bdd
commit
66422683e7
@ -6,9 +6,9 @@ LDFLAGS=-lsetupapi
|
||||
|
||||
PREFIX=/usr/local
|
||||
|
||||
PROG=wusbmote_ctl
|
||||
PROG=gcn64ctl
|
||||
|
||||
OBJS=main.o wusbmote.o hid.o
|
||||
OBJS=main.o gcn64.o mempak.o gcn64lib.o hexdump.o gc2n64_adapter.o ihex.o delay.o hid.o sleep.o memmem.o
|
||||
|
||||
.PHONY : clean install
|
||||
|
||||
|
15
tool/memmem.c
Normal file
15
tool/memmem.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <string.h>
|
||||
|
||||
void *memmem(const void *haystack, size_t haystack_len,
|
||||
const void *needle, size_t needle_len)
|
||||
{
|
||||
int i;
|
||||
if (needle_len > haystack_len)
|
||||
return NULL;
|
||||
|
||||
for (i=0; i<haystack_len; i++) {
|
||||
if (!memcmp(haystack +i, needle, needle_len))
|
||||
return haystack + i;
|
||||
}
|
||||
return NULL;
|
||||
}
|
6
tool/sleep.c
Normal file
6
tool/sleep.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <windows.h>
|
||||
|
||||
void sleep(int s)
|
||||
{
|
||||
Sleep(s*1000);
|
||||
}
|
6
tool/sleep.h
Normal file
6
tool/sleep.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef _sleep_h__
|
||||
#define _sleep_h__
|
||||
|
||||
void sleep(int s);
|
||||
|
||||
#endif // _sleep_h__
|
Loading…
Reference in New Issue
Block a user