mirror of
https://github.com/dgis/emu48android
synced 2024-12-26 09:58:49 +01:00
Fix #11 issues with Linux build
This commit is contained in:
parent
7a32d6ad85
commit
3187a1fe49
6 changed files with 51 additions and 9 deletions
|
@ -4,7 +4,7 @@
|
||||||
* This file is part of Emu48
|
* This file is part of Emu48
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005 CdB for HP
|
* Copyright (C) 2005 CdB for HP
|
||||||
* Copyright (C) 2006 Christoph Gießelink
|
* Copyright (C) 2006 Christoph Gie<EFBFBD>elink
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#pragma intrinsic(memset,memcpy)
|
#pragma intrinsic(memset,memcpy)
|
||||||
|
|
||||||
#include "Ops.h"
|
#include "ops.h"
|
||||||
|
|
||||||
//
|
//
|
||||||
// ROM buffer access functions
|
// ROM buffer access functions
|
||||||
|
|
|
@ -73,7 +73,7 @@ static DWORD dwOldCyc; // cpu cycles at last event
|
||||||
static DWORD dwSpeedRef; // timer value at last event
|
static DWORD dwSpeedRef; // timer value at last event
|
||||||
static DWORD dwTickRef; // sample timer ticks
|
static DWORD dwTickRef; // sample timer ticks
|
||||||
|
|
||||||
#include "Ops.h"
|
#include "ops.h"
|
||||||
|
|
||||||
// save last instruction in circular instruction buffer
|
// save last instruction in circular instruction buffer
|
||||||
static __inline VOID SaveInstrAddr(DWORD dwAddr)
|
static __inline VOID SaveInstrAddr(DWORD dwAddr)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "Emu48.h"
|
#include "Emu48.h"
|
||||||
#include "ops.h"
|
#include "ops.h"
|
||||||
#include "opcodes.h"
|
#include "Opcodes.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
#include "i28f160.h" // flash support
|
#include "i28f160.h" // flash support
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* This file is part of Emu48
|
* This file is part of Emu48
|
||||||
*
|
*
|
||||||
* Copyright (C) 1995 Sebastien Carlier
|
* Copyright (C) 1995 Sebastien Carlier
|
||||||
* Copyright (C) 1999 Christoph Gießelink
|
* Copyright (C) 1999 Christoph Gie<EFBFBD>elink
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#pragma intrinsic(memset,memcpy)
|
#pragma intrinsic(memset,memcpy)
|
||||||
|
|
||||||
#include "Ops.h"
|
#include "ops.h"
|
||||||
|
|
||||||
// Fields start and length
|
// Fields start and length
|
||||||
UINT F_s[16] = {0/*P*/,0,2,0,15,3,0,0,0,0,0,0,0,0,0,0};
|
UINT F_s[16] = {0/*P*/,0,2,0,15,3,0,0,0,0,0,0,0,0,0,0};
|
||||||
|
|
|
@ -2981,14 +2981,54 @@ void _wmakepath(wchar_t _Buffer, wchar_t const* _Drive, wchar_t const* _Dir, wch
|
||||||
int WINAPI wvsprintf(LPSTR arg1, LPCSTR arg2, va_list arglist) {
|
int WINAPI wvsprintf(LPSTR arg1, LPCSTR arg2, va_list arglist) {
|
||||||
return vsprintf(arg1, arg2, arglist);
|
return vsprintf(arg1, arg2, arglist);
|
||||||
}
|
}
|
||||||
DWORD GetFullPathName(LPCSTR lpFileName, DWORD nBufferLength, LPSTR lpBuffer, LPSTR* lpFilePart) { return 0; }
|
const char pathSeparator =
|
||||||
|
#ifdef _WIN32
|
||||||
|
'\\';
|
||||||
|
#else
|
||||||
|
'/';
|
||||||
|
#endif
|
||||||
|
|
||||||
|
DWORD GetFullPathName(LPCSTR lpFileName, DWORD nBufferLength, LPSTR lpBuffer, LPSTR* lpFilePart) {
|
||||||
|
lstrcpyn(lpBuffer, lpFileName, nBufferLength);
|
||||||
|
if(lpFilePart != NULL) {
|
||||||
|
*lpFilePart = strrchr(lpBuffer, pathSeparator);
|
||||||
|
if(*lpFilePart != NULL)
|
||||||
|
(*lpFilePart)++;
|
||||||
|
}
|
||||||
|
return lstrlen(lpBuffer);
|
||||||
|
}
|
||||||
LPSTR lstrcpyn(LPSTR lpString1, LPCSTR lpString2,int iMaxLength) {
|
LPSTR lstrcpyn(LPSTR lpString1, LPCSTR lpString2,int iMaxLength) {
|
||||||
return strcpy(lpString1, lpString2);
|
return strcpy(lpString1, lpString2);
|
||||||
}
|
}
|
||||||
LPSTR lstrcat(LPSTR lpString1, LPCSTR lpString2) {
|
LPSTR lstrcat(LPSTR lpString1, LPCSTR lpString2) {
|
||||||
return NULL;
|
return strcat(lpString1, lpString2);
|
||||||
|
}
|
||||||
|
void __cdecl _splitpath(const char * _FullPath, char* _Drive, char* _Dir, char* _Filename, char* _Ext) {
|
||||||
|
if (_Drive)
|
||||||
|
_Drive[0] = 0;
|
||||||
|
char * filePart = strrchr(_FullPath, pathSeparator);
|
||||||
|
if(_Dir) {
|
||||||
|
if(filePart != NULL) {
|
||||||
|
strncpy(_Dir, _FullPath, (int)(filePart - _FullPath));
|
||||||
|
} else
|
||||||
|
_Dir[0] = 0;
|
||||||
|
}
|
||||||
|
if(_Filename) {
|
||||||
|
if(filePart != NULL) {
|
||||||
|
strcpy(_Filename, filePart + 1);
|
||||||
|
} else
|
||||||
|
_Filename[0] = 0;
|
||||||
|
}
|
||||||
|
if(_Ext) {
|
||||||
|
_Ext[0] = 0;
|
||||||
|
if(_Filename) {
|
||||||
|
char * extPart = strrchr(_Filename, '.');
|
||||||
|
if (extPart != NULL) {
|
||||||
|
strcpy(_Ext, extPart + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void __cdecl _splitpath(char const* _FullPath, char* _Drive, char* _Dir, char* _Filename, char* _Ext) {}
|
|
||||||
int WINAPI lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {
|
int WINAPI lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {
|
||||||
return strcmp(lpString1, lpString2);
|
return strcmp(lpString1, lpString2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,8 @@ public class PrinterSimulator {
|
||||||
} catch(Exception ex) {
|
} catch(Exception ex) {
|
||||||
Log.d(TAG, "Cannot get the MaximumTextureSize (Set default to 2048). Error: " + ex.getMessage());
|
Log.d(TAG, "Cannot get the MaximumTextureSize (Set default to 2048). Error: " + ex.getMessage());
|
||||||
}
|
}
|
||||||
|
if(maxBitmapHeight == 0)
|
||||||
|
maxBitmapHeight = 1024;
|
||||||
|
|
||||||
maxBitmapHeight = Math.min(maxBitmapHeight, 8192); //32768);
|
maxBitmapHeight = Math.min(maxBitmapHeight, 8192); //32768);
|
||||||
MAXPRTLINES = maxBitmapHeight / LINE_HEIGHT;
|
MAXPRTLINES = maxBitmapHeight / LINE_HEIGHT;
|
||||||
|
|
Loading…
Reference in a new issue