mirror of
https://github.com/dgis/emu48android
synced 2024-12-28 09:58:32 +01:00
This commit is contained in:
parent
a07d8736e1
commit
e11fe9853a
3 changed files with 187 additions and 23 deletions
|
@ -34,11 +34,11 @@ add_library( # Sets the name of the library.
|
||||||
src/main/cpp/engine.c
|
src/main/cpp/engine.c
|
||||||
src/main/cpp/external.c
|
src/main/cpp/external.c
|
||||||
src/main/cpp/fetch.c
|
src/main/cpp/fetch.c
|
||||||
src/main/cpp/files.c
|
src/main/cpp/files.c #TODO
|
||||||
src/main/cpp/i28f160.c
|
src/main/cpp/i28f160.c
|
||||||
src/main/cpp/keyboard.c
|
src/main/cpp/keyboard.c
|
||||||
# src/main/cpp/keymacro.c
|
# src/main/cpp/keymacro.c
|
||||||
src/main/cpp/kml.c
|
src/main/cpp/kml.c #TODO
|
||||||
src/main/cpp/lodepng.c
|
src/main/cpp/lodepng.c
|
||||||
src/main/cpp/lowbat.c
|
src/main/cpp/lowbat.c
|
||||||
src/main/cpp/mops.c
|
src/main/cpp/mops.c
|
||||||
|
@ -48,13 +48,13 @@ add_library( # Sets the name of the library.
|
||||||
# src/main/cpp/redeye.c
|
# src/main/cpp/redeye.c
|
||||||
src/main/cpp/rpl.c
|
src/main/cpp/rpl.c
|
||||||
# src/main/cpp/serial.c
|
# src/main/cpp/serial.c
|
||||||
src/main/cpp/settings.c
|
src/main/cpp/settings.c #TODO
|
||||||
# src/main/cpp/sndenum.c
|
# src/main/cpp/sndenum.c
|
||||||
# src/main/cpp/sound.c
|
# src/main/cpp/sound.c
|
||||||
src/main/cpp/stack.c
|
src/main/cpp/stack.c
|
||||||
src/main/cpp/symbfile.c
|
src/main/cpp/symbfile.c #TODO
|
||||||
src/main/cpp/timer.c
|
src/main/cpp/timer.c #TODO
|
||||||
src/main/cpp/udp.c
|
src/main/cpp/udp.c #TODO
|
||||||
|
|
||||||
|
|
||||||
src/main/cpp/emu48-jni.c
|
src/main/cpp/emu48-jni.c
|
||||||
|
|
|
@ -416,17 +416,114 @@ BOOL GetSystemPowerStatus(LPSYSTEM_POWER_STATUS status)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// file.c
|
|
||||||
|
|
||||||
BOOL GetWindowPlacement(HWND hWnd, WINDOWPLACEMENT *lpwndpl) { return 0; }
|
BOOL GetWindowPlacement(HWND hWnd, WINDOWPLACEMENT *lpwndpl) { return 0; }
|
||||||
|
|
||||||
|
|
||||||
|
HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId) {
|
||||||
|
//TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL WINAPI CloseHandle(HANDLE hObject) {
|
||||||
|
//TODO
|
||||||
|
// Can be a thread/event/file hande!
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL WINAPI MessageBeep(UINT uType) {
|
||||||
|
//TODO System beep
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
HGLOBAL WINAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes) {
|
||||||
|
//TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
LPVOID WINAPI GlobalLock (HGLOBAL hMem) {
|
||||||
|
//TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL WINAPI GlobalUnlock(HGLOBAL hMem) {
|
||||||
|
//TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL WINAPI OpenClipboard(HWND hWndNewOwner) {
|
||||||
|
//TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
BOOL WINAPI CloseClipboard(VOID) {
|
||||||
|
//TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL WINAPI EmptyClipboard(VOID) {
|
||||||
|
//TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HANDLE WINAPI SetClipboardData(UINT uFormat,HANDLE hMem) {
|
||||||
|
//TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL WINAPI IsClipboardFormatAvailable(UINT format) {
|
||||||
|
//TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
HANDLE WINAPI GetClipboardData(UINT uFormat) {
|
||||||
|
//TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
HGLOBAL WINAPI GlobalFree(HGLOBAL hMem) {
|
||||||
|
//TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
|
||||||
|
|
||||||
|
int WINAPI wvsprintf(LPWSTR, LPCWSTR, va_list arglist) {
|
||||||
|
return vswprintf(arg1, MAX_PATH, arg2, arglist);
|
||||||
|
}
|
||||||
DWORD GetFullPathName(LPCWSTR lpFileName, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR* lpFilePart) { return 0; }
|
DWORD GetFullPathName(LPCWSTR lpFileName, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR* lpFilePart) { return 0; }
|
||||||
void __cdecl _wsplitpath(wchar_t const* _FullPath, wchar_t* _Drive, wchar_t* _Dir, wchar_t* _Filename, wchar_t* _Ext) {}
|
|
||||||
LPWSTR lstrcpyn(LPWSTR lpString1, LPCWSTR lpString2,int iMaxLength) {
|
LPWSTR lstrcpyn(LPWSTR lpString1, LPCWSTR lpString2,int iMaxLength) {
|
||||||
return strcpy(lpString1, lpString2);
|
return strcpy(lpString1, lpString2);
|
||||||
}
|
}
|
||||||
LPWSTR lstrcat(LPWSTR lpString1, LPCWSTR lpString2) {
|
LPWSTR lstrcat(LPWSTR lpString1, LPCWSTR lpString2) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
void __cdecl _wsplitpath(wchar_t const* _FullPath, wchar_t* _Drive, wchar_t* _Dir, wchar_t* _Filename, wchar_t* _Ext) {}
|
||||||
|
int WINAPI lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {
|
||||||
|
return wcscmp(lpString1, lpString2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
int WINAPI wvsprintf(LPSTR arg1, LPCSTR arg2, va_list arglist) {
|
||||||
|
return vsprintf(arg1, arg2, arglist);
|
||||||
|
}
|
||||||
|
DWORD GetFullPathName(LPCSTR lpFileName, DWORD nBufferLength, LPSTR lpBuffer, LPSTR* lpFilePart) { return 0; }
|
||||||
|
LPSTR lstrcpyn(LPSTR lpString1, LPCSTR lpString2,int iMaxLength) {
|
||||||
|
return strcpy(lpString1, lpString2);
|
||||||
|
}
|
||||||
|
LPSTR lstrcat(LPSTR lpString1, LPCSTR lpString2) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
void __cdecl _splitpath(char const* _FullPath, char* _Drive, char* _Dir, char* _Filename, char* _Ext) {}
|
||||||
|
int WINAPI lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {
|
||||||
|
return strcmp(lpString1, lpString2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // !UNICODE
|
||||||
|
|
||||||
void _wmakepath(wchar_t _Buffer, wchar_t const* _Drive, wchar_t const* _Dir, wchar_t const* _Filename, wchar_t const* _Ext)
|
void _wmakepath(wchar_t _Buffer, wchar_t const* _Drive, wchar_t const* _Dir, wchar_t const* _Filename, wchar_t const* _Ext)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ typedef int64_t __int64;
|
||||||
typedef unsigned char BYTE;
|
typedef unsigned char BYTE;
|
||||||
typedef BYTE byte;
|
typedef BYTE byte;
|
||||||
typedef uint32_t DWORD;
|
typedef uint32_t DWORD;
|
||||||
|
typedef DWORD *LPDWORD;
|
||||||
typedef BYTE *LPBYTE;
|
typedef BYTE *LPBYTE;
|
||||||
typedef unsigned short WORD;
|
typedef unsigned short WORD;
|
||||||
typedef uint32_t UINT;
|
typedef uint32_t UINT;
|
||||||
|
@ -72,11 +73,17 @@ typedef union _LARGE_INTEGER {
|
||||||
}d;
|
}d;
|
||||||
} LARGE_INTEGER, *PLARGE_INTEGER;
|
} LARGE_INTEGER, *PLARGE_INTEGER;
|
||||||
|
|
||||||
typedef char *LPTSTR ;
|
typedef char *LPTSTR;
|
||||||
typedef char *LPSTR ;
|
typedef char *LPSTR;
|
||||||
typedef char LPCSTR[255] ;
|
//typedef char LPCSTR[255];
|
||||||
typedef const char *LPCTSTR ;
|
typedef const char *LPCSTR;
|
||||||
|
typedef const char *LPCTSTR;
|
||||||
|
#ifdef UNICODE
|
||||||
|
typedef wchar_t TCHAR;
|
||||||
|
#else
|
||||||
typedef char TCHAR;
|
typedef char TCHAR;
|
||||||
|
#endif // !UNICODE
|
||||||
|
|
||||||
|
|
||||||
typedef pthread_mutex_t CRITICAL_SECTION;
|
typedef pthread_mutex_t CRITICAL_SECTION;
|
||||||
typedef HANDLE HINSTANCE;
|
typedef HANDLE HINSTANCE;
|
||||||
|
@ -340,7 +347,25 @@ extern void Sleep(int);
|
||||||
extern BOOL GetSystemPowerStatus(LPSYSTEM_POWER_STATUS l);
|
extern BOOL GetSystemPowerStatus(LPSYSTEM_POWER_STATUS l);
|
||||||
|
|
||||||
|
|
||||||
//RC
|
typedef struct _SECURITY_ATTRIBUTES {
|
||||||
|
DWORD nLength;
|
||||||
|
LPVOID lpSecurityDescriptor;
|
||||||
|
BOOL bInheritHandle;
|
||||||
|
} SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
|
||||||
|
typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(
|
||||||
|
LPVOID lpThreadParameter
|
||||||
|
);
|
||||||
|
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
|
||||||
|
extern HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);
|
||||||
|
extern BOOL WINAPI CloseHandle(HANDLE hObject);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct HRGN__ { int unused; };
|
struct HRGN__ { int unused; };
|
||||||
typedef struct HRGN__ *HRGN;
|
typedef struct HRGN__ *HRGN;
|
||||||
|
|
||||||
|
@ -397,15 +422,57 @@ extern BOOL WINAPI SetWindowPlacement(HWND hWnd, CONST WINDOWPLACEMENT *lpwndpl)
|
||||||
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
|
typedef wchar_t WCHAR; // wc, 16-bit UNICODE character
|
||||||
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
typedef CONST WCHAR *LPCWSTR, *PCWSTR;
|
||||||
typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR;
|
typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR;
|
||||||
extern DWORD WINAPI GetFullPathName(LPCWSTR lpFileName, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR* lpFilePart);
|
|
||||||
extern void __cdecl _wsplitpath(wchar_t const* _FullPath, wchar_t* _Drive, wchar_t* _Dir, wchar_t* _Filename, wchar_t* _Ext);
|
|
||||||
#define _tsplitpath _wsplitpath
|
|
||||||
#define _tcschr wcschr
|
|
||||||
extern LPWSTR WINAPI lstrcpyn(LPWSTR lpString1, LPCWSTR lpString2,int iMaxLength);
|
|
||||||
extern LPWSTR WINAPI lstrcat(LPWSTR lpString1, LPCWSTR lpString2);
|
|
||||||
#define _tmakepath _wmakepath
|
|
||||||
extern void _wmakepath(wchar_t _Buffer, wchar_t const* _Drive, wchar_t const* _Dir, wchar_t const* _Filename, wchar_t const* _Ext);
|
|
||||||
extern BOOL WINAPI GetClientRect(HWND hWnd, LPRECT lpRect);
|
extern BOOL WINAPI GetClientRect(HWND hWnd, LPRECT lpRect);
|
||||||
|
|
||||||
typedef char *PSZ;
|
typedef char *PSZ;
|
||||||
typedef DWORD COLORREF;
|
typedef DWORD COLORREF;
|
||||||
|
|
||||||
|
extern BOOL WINAPI MessageBeep(UINT uType);
|
||||||
|
|
||||||
|
typedef HANDLE HGLOBAL;
|
||||||
|
#define GMEM_MOVEABLE 0x0002
|
||||||
|
extern HGLOBAL WINAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes);
|
||||||
|
extern LPVOID WINAPI GlobalLock (HGLOBAL hMem);
|
||||||
|
extern BOOL WINAPI GlobalUnlock(HGLOBAL hMem);
|
||||||
|
|
||||||
|
#define CF_TEXT 1
|
||||||
|
extern BOOL WINAPI OpenClipboard(HWND hWndNewOwner);
|
||||||
|
extern BOOL WINAPI CloseClipboard(VOID);
|
||||||
|
extern BOOL WINAPI EmptyClipboard(VOID);
|
||||||
|
extern HANDLE WINAPI SetClipboardData(UINT uFormat,HANDLE hMem);
|
||||||
|
extern HGLOBAL WINAPI GlobalFree(HGLOBAL hMem);
|
||||||
|
extern BOOL WINAPI IsClipboardFormatAvailable(UINT format);
|
||||||
|
extern HANDLE WINAPI GetClipboardData(UINT uFormat);
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
|
||||||
|
extern int WINAPI wvsprintf(LPWSTR, LPCWSTR, va_list arglist);
|
||||||
|
extern DWORD WINAPI GetFullPathName(LPCWSTR lpFileName, DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR* lpFilePart);
|
||||||
|
extern LPWSTR WINAPI lstrcpyn(LPWSTR lpString1, LPCWSTR lpString2,int iMaxLength);
|
||||||
|
extern LPWSTR WINAPI lstrcat(LPWSTR lpString1, LPCWSTR lpString2);
|
||||||
|
|
||||||
|
extern void __cdecl _wsplitpath(wchar_t const* _FullPath, wchar_t* _Drive, wchar_t* _Dir, wchar_t* _Filename, wchar_t* _Ext);
|
||||||
|
#define _tsplitpath _wsplitpath
|
||||||
|
#define _tcschr wcschr
|
||||||
|
extern void _wmakepath(wchar_t _Buffer, wchar_t const* _Drive, wchar_t const* _Dir, wchar_t const* _Filename, wchar_t const* _Ext);
|
||||||
|
#define _tmakepath _wmakepath
|
||||||
|
extern int WINAPI lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2);
|
||||||
|
#define _tcsncmp wcsncmp
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
extern int WINAPI wvsprintf(LPSTR, LPCSTR, va_list arglist);
|
||||||
|
extern DWORD WINAPI GetFullPathName(LPCSTR lpFileName, DWORD nBufferLength, LPSTR lpBuffer, LPSTR* lpFilePart);
|
||||||
|
extern LPSTR WINAPI lstrcpyn(LPSTR lpString1, LPCSTR lpString2,int iMaxLength);
|
||||||
|
extern LPSTR WINAPI lstrcat(LPSTR lpString1, LPCSTR lpString2);
|
||||||
|
|
||||||
|
extern void __cdecl _splitpath(char const* _FullPath, char* _Drive, char* _Dir, char* _Filename, char* _Ext);
|
||||||
|
#define _tsplitpath _splitpath
|
||||||
|
#define _tcschr strchr
|
||||||
|
extern void _makepath(char _Buffer, char const* _Drive, char const* _Dir, char const* _Filename, char const* _Ext);
|
||||||
|
#define _tmakepath _makepath
|
||||||
|
extern int WINAPI lstrcmp(LPCSTR lpString1, LPCSTR lpString2);
|
||||||
|
#define _tcsncmp strncmp
|
||||||
|
|
||||||
|
|
||||||
|
#endif // !UNICODE
|
||||||
|
|
Loading…
Reference in a new issue