Small changes to compile with latest version.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
3b0043af6d
commit
93990b0055
11 changed files with 34 additions and 6 deletions
|
@ -35,6 +35,7 @@ add_library(appleii SHARED
|
|||
linux/windows/stringcb.cpp
|
||||
linux/windows/strings.cpp
|
||||
linux/windows/misc.cpp
|
||||
linux/windows/winbase.cpp
|
||||
|
||||
linux/data.cpp
|
||||
linux/dummies.cpp
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<file alias="resources/CHARSET8C.BMP">resources/CHARSET8C.bmp</file>
|
||||
<file alias="resources/APPLEWINLOGO.BMP">resources/ApplewinLogo.bmp</file>
|
||||
<file>resources/DISK2.rom</file>
|
||||
<file>resources/DISK2-13sector.rom</file>
|
||||
<file>resources/Hddrvr.bin</file>
|
||||
<file>resources/Parallel.rom</file>
|
||||
<file>resources/MouseInterface.rom</file>
|
||||
|
|
BIN
source/frontends/qapple/resources/DISK2-13sector.rom
Normal file
BIN
source/frontends/qapple/resources/DISK2-13sector.rom
Normal file
Binary file not shown.
|
@ -4,6 +4,9 @@
|
|||
#include "Common.h"
|
||||
#include "CPU.h"
|
||||
|
||||
static const UINT VERSIONSTRING_SIZE = 16;
|
||||
TCHAR VERSIONSTRING[VERSIONSTRING_SIZE] = "xx.yy.zz.ww";
|
||||
|
||||
static bool bLogKeyReadDone = false;
|
||||
static DWORD dwLogKeyReadTickStart;
|
||||
|
||||
|
|
|
@ -12,3 +12,4 @@
|
|||
#include "linux/windows/stringcb.h"
|
||||
#include "linux/windows/strings.h"
|
||||
#include "linux/windows/gdi.h"
|
||||
#include "linux/windows/winbase.h"
|
||||
|
|
|
@ -26,9 +26,16 @@ DWORD SetFilePointer(HANDLE hFile, LONG lDistanceToMove,
|
|||
{
|
||||
const FILE_HANDLE & file_handle = dynamic_cast<FILE_HANDLE &>(*hFile);
|
||||
|
||||
fseek(file_handle.f, lDistanceToMove, dwMoveMethod);
|
||||
const int res = fseek(file_handle.f, lDistanceToMove, dwMoveMethod);
|
||||
if (res)
|
||||
{
|
||||
return INVALID_SET_FILE_POINTER;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ftell(file_handle.f);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
||||
LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped) {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "linux/windows/handles.h"
|
||||
|
||||
#define INVALID_FILE_ATTRIBUTES (~0u)
|
||||
#define INVALID_SET_FILE_POINTER (~0u)
|
||||
|
||||
typedef struct tagOFN {
|
||||
DWORD lStructSize;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// forward declared
|
||||
HRSRC FindResource(void *, const std::string & filename, const char *);
|
||||
|
||||
std::string MAKEINTRESOURCE(int x)
|
||||
const char * MAKEINTRESOURCE(int x)
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
|
@ -18,7 +18,8 @@ std::string MAKEINTRESOURCE(int x)
|
|||
case IDR_PRAVETS_8M_ROM: return "PRAVETS8M.ROM";
|
||||
case IDR_TK3000_2E_ROM: return "TK3000e.rom";
|
||||
|
||||
case IDR_DISK2_FW: return "DISK2.rom";
|
||||
case IDR_DISK2_16SECTOR_FW: return "DISK2.rom";
|
||||
case IDR_DISK2_13SECTOR_FW: return "DISK2-13sector.rom";
|
||||
case IDR_SSC_FW: return "SSC.rom";
|
||||
case IDR_HDDRVR_FW: return "Hddrvr.bin";
|
||||
case IDR_PRINTDRVR_FW: return "Parallel.rom";
|
||||
|
@ -29,7 +30,7 @@ std::string MAKEINTRESOURCE(int x)
|
|||
}
|
||||
|
||||
LogFileOutput("Unknown resource %d\n", x);
|
||||
return std::string();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DWORD SizeofResource(void *, const HRSRC & res)
|
||||
|
|
|
@ -18,7 +18,7 @@ struct HRSRC : public CHANDLE
|
|||
}
|
||||
};
|
||||
|
||||
std::string MAKEINTRESOURCE(int x);
|
||||
const char * MAKEINTRESOURCE(int x);
|
||||
HRSRC FindResource(void *, const std::string & filename, const char *);
|
||||
DWORD SizeofResource(void *, const HRSRC &);
|
||||
HGLOBAL LoadResource(void *, HRSRC &);
|
||||
|
|
8
source/linux/windows/winbase.cpp
Normal file
8
source/linux/windows/winbase.cpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "linux/windows/winbase.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
DWORD WINAPI GetLastError(void)
|
||||
{
|
||||
return errno;
|
||||
}
|
5
source/linux/windows/winbase.h
Normal file
5
source/linux/windows/winbase.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "linux/windows/wincompat.h"
|
||||
|
||||
DWORD WINAPI GetLastError(void);
|
Loading…
Add table
Reference in a new issue