More cleanups to separate main code from platform support and UI support, plus a few bugfixes.

This commit is contained in:
waltje
2017-10-12 14:25:17 -04:00
parent aa7e85d0d7
commit 724e5c44df
46 changed files with 217 additions and 259 deletions

View File

@@ -8,7 +8,7 @@
*
* The Emulator's Windows core.
*
* Version: @(#)win.c 1.0.20 2017/10/10
* Version: @(#)win.c 1.0.21 2017/10/12
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -1335,6 +1335,36 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nFunsterStil)
}
FILE *
plat_fopen(wchar_t *path, wchar_t *mode)
{
return(_wfopen(path, mode));
}
void
plat_remove(wchar_t *path)
{
_wremove(path);
}
int
plat_getcwd(wchar_t *bufp, int max)
{
(void)_wgetcwd(bufp, max);
return(0);
}
int
plat_chdir(wchar_t *path)
{
return(_wchdir(path));
}
void
get_executable_name(wchar_t *s, int size)
{

View File

@@ -8,7 +8,7 @@
*
* Try to load a support DLL.
*
* Version: @(#)win_dynld.c 1.0.4 2017/10/10
* Version: @(#)win_dynld.c 1.0.5 2017/10/11
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -19,7 +19,6 @@
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
#include <pcap.h>
#include <windows.h>
#include "../ibm.h"
#include "../plat_dynld.h"
@@ -31,7 +30,6 @@ dynld_module(const char *name, dllimp_t *table)
HMODULE h;
dllimp_t *imp;
void *func;
/* char **foo; */
/* See if we can load the desired module. */
if ((h = LoadLibrary(name)) == NULL) {

View File

@@ -8,7 +8,7 @@
*
* Joystick interface to host device.
*
* Version: @(#)win_joystick.cc 1.0.3 2017/10/10
* Version: @(#)win_joystick.cc 1.0.4 2017/10/12
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -19,6 +19,7 @@
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <math.h>
#include <stdio.h>
#include <stdint.h>
extern "C" {
#include "../device.h"

View File

@@ -8,7 +8,7 @@
*
* Mouse interface to host device.
*
* Version: @(#)win_mouse.cc 1.0.3 2017/10/10
* Version: @(#)win_mouse.cc 1.0.4 2017/10/12
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -18,6 +18,7 @@
*/
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <stdio.h>
#include <stdint.h>
#include "../plat.h"
#include "../plat_mouse.h"