Final move of files into the new structure.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# Makefile for Windows systems using the MinGW32 environment.
|
||||
#
|
||||
# Version: @(#)Makefile.mingw 1.0.37 2018/05/03
|
||||
# Version: @(#)Makefile.mingw 1.0.38 2018/05/06
|
||||
#
|
||||
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
#
|
||||
@@ -202,13 +202,17 @@ endif
|
||||
# Nothing should need changing from here on.. #
|
||||
#########################################################################
|
||||
VPATH := $(EXPATH) . cpu \
|
||||
machine sio ports input input/game \
|
||||
cdrom disk floppy floppy/lzf \
|
||||
sound \
|
||||
sound/munt sound/munt/c_interface sound/munt/sha1 \
|
||||
sound/munt/srchelper \
|
||||
sound/resid-fp \
|
||||
scsi video network network/slirp ui win
|
||||
devices \
|
||||
devices/cdrom devices/disk devices/floppy \
|
||||
devices/floppy/lzf devices/input devices/input/game \
|
||||
devices/network devices/network/slirp devices/ports \
|
||||
devices/sio devices/system devices/scsi \
|
||||
devices/sound \
|
||||
devices/sound/munt devices/sound/munt/c_interface \
|
||||
devices/sound/munt/sha1 devices/sound/munt/srchelper \
|
||||
devices/sound/resid-fp \
|
||||
devices/video \
|
||||
machines ui win
|
||||
|
||||
#
|
||||
# Select the required build environment. We have, uhm, many..
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# Makefile for Windows using Visual Studio 2015.
|
||||
#
|
||||
# Version: @(#)Makefile.VC 1.0.24 2018/05/03
|
||||
# Version: @(#)Makefile.VC 1.0.25 2018/05/06
|
||||
#
|
||||
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
#
|
||||
@@ -206,14 +206,18 @@ endif
|
||||
#########################################################################
|
||||
# Nothing should need changing from here on.. #
|
||||
#########################################################################
|
||||
VPATH := $(EXPATH) . cpu \
|
||||
machine sio ports input input/game \
|
||||
cdrom disk floppy floppy/lzf \
|
||||
sound \
|
||||
sound/munt sound/munt/c_interface sound/munt/sha1 \
|
||||
sound/munt/srchelper \
|
||||
sound/resid-fp \
|
||||
scsi video network network/slirp ui win
|
||||
VPATH := $(EXPATH) . cpu \
|
||||
devices \
|
||||
devices/cdrom devices/disk devices/floppy \
|
||||
devices/floppy/lzf devices/input devices/input/game \
|
||||
devices/network devices/network/slirp devices/ports \
|
||||
devices/sio devices/system devices/scsi \
|
||||
devices/sound \
|
||||
devices/sound/munt devices/sound/munt/c_interface \
|
||||
devices/sound/munt/sha1 devices/sound/munt/srchelper \
|
||||
devices/sound/resid-fp \
|
||||
devices/video \
|
||||
machines ui win
|
||||
|
||||
#
|
||||
# Select the required build environment.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Platform main support module for Windows.
|
||||
*
|
||||
* Version: @(#)win.c 1.0.17 2018/05/05
|
||||
* Version: @(#)win.c 1.0.18 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -53,8 +53,6 @@
|
||||
#include "../version.h"
|
||||
#include "../config.h"
|
||||
#include "../device.h"
|
||||
#include "../input/mouse.h"
|
||||
#include "../video/video.h"
|
||||
#include "../ui/ui.h"
|
||||
#define GLOBAL
|
||||
#include "../plat.h"
|
||||
@@ -64,6 +62,8 @@
|
||||
#ifdef USE_RDP
|
||||
# include "../rdp.h"
|
||||
#endif
|
||||
#include "../devices/input/mouse.h"
|
||||
#include "../devices/video/video.h"
|
||||
#ifdef USE_WX
|
||||
# include "../wx/wx_ui.h"
|
||||
#else
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Platform support defintions for Win32.
|
||||
*
|
||||
* Version: @(#)win.h 1.0.10 2018/05/03
|
||||
* Version: @(#)win.h 1.0.11 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -105,10 +105,6 @@ extern void plat_set_language(int id);
|
||||
extern int get_vidpause(void);
|
||||
extern int fdd_type_icon(int type);
|
||||
|
||||
/* Emulator start/stop support functions. */
|
||||
extern void plat_start(void);
|
||||
extern void plat_stop(void);
|
||||
|
||||
/* Platform UI support functions. */
|
||||
extern int ui_init(int nCmdShow);
|
||||
extern void ui_menu_update(void);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Handle the platform-side of CDROM drives.
|
||||
*
|
||||
* Version: @(#)win_cdrom.c 1.0.7 2018/04/28
|
||||
* Version: @(#)win_cdrom.c 1.0.8 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -42,16 +42,17 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include "../emu.h"
|
||||
#include "../config.h"
|
||||
#include "../disk/hdd.h"
|
||||
#include "../disk/zip.h"
|
||||
#include "../cdrom/cdrom.h"
|
||||
#include "../cdrom/cdrom_image.h"
|
||||
#include "../cdrom/cdrom_null.h"
|
||||
#include "../scsi/scsi.h"
|
||||
#include "../scsi/scsi_disk.h"
|
||||
#include "../ui/ui.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/disk/hdd.h"
|
||||
#include "../devices/disk/zip.h"
|
||||
#include "../devices/cdrom/cdrom.h"
|
||||
#include "../devices/cdrom/cdrom_image.h"
|
||||
#include "../devices/cdrom/cdrom_null.h"
|
||||
#include "../devices/scsi/scsi.h"
|
||||
#include "../devices/scsi/scsi_disk.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Implementation of the CD-ROM host drive IOCTL interface for
|
||||
* Windows using SCSI Passthrough Direct.
|
||||
*
|
||||
* Version: @(#)cdrom_ioctl.c 1.0.8 2018/03/21
|
||||
* Version: @(#)cdrom_ioctl.c 1.0.9 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -50,9 +50,9 @@
|
||||
#define HAVE_STDARG_H
|
||||
#include "../emu.h"
|
||||
#include "../device.h"
|
||||
#include "../scsi/scsi.h"
|
||||
#include "../cdrom/cdrom.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/scsi/scsi.h"
|
||||
#include "../devices/cdrom/cdrom.h"
|
||||
|
||||
|
||||
#define MSFtoLBA(m,s,f) ((((m*60)+s)*75)+f)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Rendering module for Microsoft Direct3D 9.
|
||||
*
|
||||
* Version: @(#)win_d3d.cpp 1.0.9 2018/05/02
|
||||
* Version: @(#)win_d3d.cpp 1.0.10 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -45,11 +45,11 @@
|
||||
#include "../emu.h"
|
||||
#include "../version.h"
|
||||
#include "../device.h"
|
||||
#include "../plat.h"
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable: 4200)
|
||||
#endif
|
||||
#include "../video/video.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/video/video.h"
|
||||
#include "win.h"
|
||||
#include "win_d3d.h"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* NOTES: This code should be re-merged into a single init() with a
|
||||
* 'fullscreen' argument, indicating FS mode is requested.
|
||||
*
|
||||
* Version: @(#)win_ddraw.cpp 1.0.6 2018/04/27
|
||||
* Version: @(#)win_ddraw.cpp 1.0.7 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -50,12 +50,12 @@
|
||||
#endif
|
||||
#include "../emu.h"
|
||||
#include "../device.h"
|
||||
#include "../ui/ui.h"
|
||||
#include "../plat.h"
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable: 4200)
|
||||
#endif
|
||||
#include "../video/video.h"
|
||||
#include "../ui/ui.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/video/video.h"
|
||||
#include "win.h"
|
||||
#include "win_ddraw.h"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* NOTE: Hacks currently needed to compile with MSVC; DX needs to
|
||||
* be updated to 11 or 12 or so. --FvK
|
||||
*
|
||||
* Version: @(#)win_joystick.cpp 1.0.13 2018/05/05
|
||||
* Version: @(#)win_joystick.cpp 1.0.14 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -60,9 +60,9 @@
|
||||
#include "../emu.h"
|
||||
#include "../config.h"
|
||||
#include "../device.h"
|
||||
#include "../ports/game_dev.h"
|
||||
#include "../input/game/joystick.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/ports/game_dev.h"
|
||||
#include "../devices/input/game/joystick.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Windows raw keyboard input handler.
|
||||
*
|
||||
* Version: @(#)win_keyboard.c 1.0.5 2018/05/04
|
||||
* Version: @(#)win_keyboard.c 1.0.6 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -44,8 +44,8 @@
|
||||
#include <stdlib.h>
|
||||
#include "../emu.h"
|
||||
#include "../device.h"
|
||||
#include "../input/keyboard.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/input/keyboard.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implementation of the System MIDI interface.
|
||||
*
|
||||
* Version: @(#)win_midi.c 1.0.3 2018/03/10
|
||||
* Version: @(#)win_midi.c 1.0.4 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -45,13 +45,15 @@
|
||||
#include <wchar.h>
|
||||
#include "../emu.h"
|
||||
#include "../config.h"
|
||||
#include "../sound/midi.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/sound/midi.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
int midi_id = 0;
|
||||
HANDLE m_event;
|
||||
int midi_id = 0;
|
||||
HANDLE m_event;
|
||||
MIDIHDR m_hdr;
|
||||
|
||||
|
||||
static HMIDIOUT midi_out_device = NULL;
|
||||
static uint8_t midi_rt_buf[1024];
|
||||
@@ -62,108 +64,117 @@ static uint8_t midi_status = 0;
|
||||
static unsigned int midi_sysex_start = 0;
|
||||
static unsigned int midi_sysex_delay = 0;
|
||||
|
||||
void plat_midi_init()
|
||||
|
||||
void
|
||||
plat_midi_init(void)
|
||||
{
|
||||
/* This is for compatibility with old configuration files. */
|
||||
midi_id = config_get_int("Sound", "midi_host_device", -1);
|
||||
if (midi_id == -1)
|
||||
{
|
||||
midi_id = config_get_int(SYSTEM_MIDI_NAME, "midi", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
config_delete_var("Sound", "midi_host_device");
|
||||
config_set_int(SYSTEM_MIDI_NAME, "midi", midi_id);
|
||||
}
|
||||
MMRESULT hr = MMSYSERR_NOERROR;
|
||||
|
||||
MMRESULT hr = MMSYSERR_NOERROR;
|
||||
/* This is for compatibility with old configuration files. */
|
||||
midi_id = config_get_int("Sound", "midi_host_device", -1);
|
||||
if (midi_id == -1) {
|
||||
midi_id = config_get_int(SYSTEM_MIDI_NAME, "midi", 0);
|
||||
} else {
|
||||
config_delete_var("Sound", "midi_host_device");
|
||||
config_set_int(SYSTEM_MIDI_NAME, "midi", midi_id);
|
||||
}
|
||||
|
||||
memset(midi_rt_buf, 0, sizeof(midi_rt_buf));
|
||||
memset(midi_cmd_buf, 0, sizeof(midi_cmd_buf));
|
||||
memset(midi_rt_buf, 0, sizeof(midi_rt_buf));
|
||||
memset(midi_cmd_buf, 0, sizeof(midi_cmd_buf));
|
||||
|
||||
midi_cmd_pos = midi_cmd_len = 0;
|
||||
midi_status = 0;
|
||||
midi_cmd_pos = midi_cmd_len = 0;
|
||||
midi_status = 0;
|
||||
|
||||
midi_sysex_start = midi_sysex_delay = 0;
|
||||
midi_sysex_start = midi_sysex_delay = 0;
|
||||
|
||||
m_event = CreateEvent(NULL, TRUE, TRUE, NULL);
|
||||
m_event = CreateEvent(NULL, TRUE, TRUE, NULL);
|
||||
|
||||
hr = midiOutOpen(&midi_out_device, midi_id, (uintptr_t) m_event,
|
||||
0, CALLBACK_EVENT);
|
||||
if (hr != MMSYSERR_NOERROR) {
|
||||
printf("midiOutOpen error - %08X\n",hr);
|
||||
midi_id = 0;
|
||||
hr = midiOutOpen(&midi_out_device, midi_id, (uintptr_t) m_event,
|
||||
0, CALLBACK_EVENT);
|
||||
if (hr != MMSYSERR_NOERROR) {
|
||||
printf("midiOutOpen error - %08X\n",hr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
midiOutReset(midi_out_device);
|
||||
}
|
||||
|
||||
void plat_midi_close()
|
||||
{
|
||||
if (midi_out_device != NULL)
|
||||
{
|
||||
midiOutReset(midi_out_device);
|
||||
midiOutClose(midi_out_device);
|
||||
/* midi_out_device = NULL; */
|
||||
CloseHandle(m_event);
|
||||
}
|
||||
}
|
||||
|
||||
int plat_midi_get_num_devs()
|
||||
{
|
||||
return midiOutGetNumDevs();
|
||||
}
|
||||
void plat_midi_get_dev_name(int num, char *s)
|
||||
{
|
||||
MIDIOUTCAPS caps;
|
||||
|
||||
midiOutGetDevCaps(num, &caps, sizeof(caps));
|
||||
strcpy(s, caps.szPname);
|
||||
}
|
||||
|
||||
void plat_midi_play_msg(uint8_t *msg)
|
||||
{
|
||||
midiOutShortMsg(midi_out_device, *(uint32_t *) msg);
|
||||
}
|
||||
|
||||
MIDIHDR m_hdr;
|
||||
|
||||
void plat_midi_play_sysex(uint8_t *sysex, unsigned int len)
|
||||
{
|
||||
MMRESULT result;
|
||||
|
||||
if (WaitForSingleObject(m_event, 2000) == WAIT_TIMEOUT)
|
||||
{
|
||||
pclog("Can't send MIDI message\n");
|
||||
hr = midiOutOpen(&midi_out_device, midi_id, (uintptr_t) m_event,
|
||||
0, CALLBACK_EVENT);
|
||||
if (hr != MMSYSERR_NOERROR) {
|
||||
pclog("midiOutOpen error - %08X\n",hr);
|
||||
midi_id = 0;
|
||||
hr = midiOutOpen(&midi_out_device, midi_id, (uintptr_t) m_event,
|
||||
0, CALLBACK_EVENT);
|
||||
if (hr != MMSYSERR_NOERROR) {
|
||||
pclog("midiOutOpen error - %08X\n",hr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
midiOutUnprepareHeader(midi_out_device, &m_hdr, sizeof(m_hdr));
|
||||
|
||||
m_hdr.lpData = (char *) sysex;
|
||||
m_hdr.dwBufferLength = len;
|
||||
m_hdr.dwBytesRecorded = len;
|
||||
m_hdr.dwUser = 0;
|
||||
|
||||
result = midiOutPrepareHeader(midi_out_device, &m_hdr, sizeof(m_hdr));
|
||||
|
||||
if (result != MMSYSERR_NOERROR) return;
|
||||
ResetEvent(m_event);
|
||||
result = midiOutLongMsg(midi_out_device, &m_hdr, sizeof(m_hdr));
|
||||
if (result != MMSYSERR_NOERROR)
|
||||
{
|
||||
SetEvent(m_event);
|
||||
return;
|
||||
}
|
||||
midiOutReset(midi_out_device);
|
||||
}
|
||||
|
||||
int plat_midi_write(uint8_t val)
|
||||
|
||||
void
|
||||
plat_midi_close(void)
|
||||
{
|
||||
return 0;
|
||||
if (midi_out_device != NULL) {
|
||||
midiOutReset(midi_out_device);
|
||||
midiOutClose(midi_out_device);
|
||||
#if 0
|
||||
midi_out_device = NULL;
|
||||
#endif
|
||||
|
||||
CloseHandle(m_event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
plat_midi_get_num_devs(void)
|
||||
{
|
||||
return midiOutGetNumDevs();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
plat_midi_get_dev_name(int num, char *s)
|
||||
{
|
||||
MIDIOUTCAPS caps;
|
||||
|
||||
midiOutGetDevCaps(num, &caps, sizeof(caps));
|
||||
strcpy(s, caps.szPname);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
plat_midi_play_msg(uint8_t *msg)
|
||||
{
|
||||
midiOutShortMsg(midi_out_device, *(uint32_t *) msg);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
plat_midi_play_sysex(uint8_t *sysex, unsigned int len)
|
||||
{
|
||||
MMRESULT result;
|
||||
|
||||
if (WaitForSingleObject(m_event, 2000) == WAIT_TIMEOUT) {
|
||||
pclog("Can't send MIDI message\n");
|
||||
return;
|
||||
}
|
||||
|
||||
midiOutUnprepareHeader(midi_out_device, &m_hdr, sizeof(m_hdr));
|
||||
|
||||
m_hdr.lpData = (char *) sysex;
|
||||
m_hdr.dwBufferLength = len;
|
||||
m_hdr.dwBytesRecorded = len;
|
||||
m_hdr.dwUser = 0;
|
||||
|
||||
result = midiOutPrepareHeader(midi_out_device, &m_hdr, sizeof(m_hdr));
|
||||
if (result != MMSYSERR_NOERROR) return;
|
||||
|
||||
ResetEvent(m_event);
|
||||
|
||||
result = midiOutLongMsg(midi_out_device, &m_hdr, sizeof(m_hdr));
|
||||
if (result != MMSYSERR_NOERROR)
|
||||
SetEvent(m_event);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
plat_midi_write(uint8_t val)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Mouse interface to host device.
|
||||
*
|
||||
* Version: @(#)win_mouse.cpp 1.0.5 2018/05/02
|
||||
* Version: @(#)win_mouse.cpp 1.0.6 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -42,8 +42,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "../emu.h"
|
||||
#include "../input/mouse.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/input/mouse.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implementation of the New Floppy Image dialog.
|
||||
*
|
||||
* Version: @(#)win_new_floppy.c 1.0.12 2018/05/02
|
||||
* Version: @(#)win_new_floppy.c 1.0.13 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -44,9 +44,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include "../emu.h"
|
||||
#include "../disk/zip.h"
|
||||
#include "../ui/ui.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/disk/zip.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* Based on old original code @(#)dir_win32.c 1.2.0 2007/04/19
|
||||
*
|
||||
* Version: @(#)win_opendir.c 1.0.2 2018/03/07
|
||||
* Version: @(#)win_opendir.c 1.0.3 2018/05/06
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -55,31 +55,20 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include "../emu.h"
|
||||
#include "../plat.h"
|
||||
#include "../../emu.h"
|
||||
#include "../../plat.h"
|
||||
#include "plat_dir.h"
|
||||
|
||||
|
||||
#ifdef UNICODE
|
||||
# define SUFFIX L"\\*"
|
||||
# define FINDATA struct _wfinddata_t
|
||||
# define FINDFIRST _wfindfirst
|
||||
# define FINDNEXT _wfindnext
|
||||
#else
|
||||
# define SUFFIX "\\*"
|
||||
# define FINDATA struct _finddata_t
|
||||
# define FINDFIRST _findfirst
|
||||
# define FINDNEXT _findnext
|
||||
#endif
|
||||
#define SUFFIX L"\\*"
|
||||
#define FINDATA struct _wfinddata_t
|
||||
#define FINDFIRST _wfindfirst
|
||||
#define FINDNEXT _wfindnext
|
||||
|
||||
|
||||
/* Open a directory. */
|
||||
DIR *
|
||||
#ifdef UNICODE
|
||||
opendirw(const wchar_t *name)
|
||||
#else
|
||||
opendir(const char *name)
|
||||
#endif
|
||||
{
|
||||
DIR *p;
|
||||
|
||||
@@ -101,20 +90,11 @@ opendir(const char *name)
|
||||
memset(p->dta, 0x00, sizeof(struct _finddata_t));
|
||||
|
||||
/* Add search filespec. */
|
||||
#ifdef UNICODE
|
||||
wcscpy(p->dir, name);
|
||||
wcscat(p->dir, SUFFIX);
|
||||
#else
|
||||
strcpy(p->dir, name);
|
||||
strcat(p->dir, SUFFIX);
|
||||
#endif
|
||||
|
||||
/* Special case: flag if we are in the root directory. */
|
||||
#ifdef UNICODE
|
||||
if (wcslen(p->dir) == 3)
|
||||
#else
|
||||
if (strlen(p->dir) == 3)
|
||||
#endif
|
||||
p->flags |= DIR_F_ISROOT;
|
||||
|
||||
/* Start the searching by doing a FindFirst. */
|
||||
@@ -168,29 +148,17 @@ readdir(DIR *p)
|
||||
p->dent.d_off = p->offset++;
|
||||
switch(p->offset) {
|
||||
case 1: /* . */
|
||||
#ifdef UNICODE
|
||||
wcsncpy(p->dent.d_name, L".", MAXNAMLEN+1);
|
||||
#else
|
||||
strncpy(p->dent.d_name, ".", MAXNAMLEN+1);
|
||||
#endif
|
||||
p->dent.d_reclen = 1;
|
||||
break;
|
||||
|
||||
case 2: /* .. */
|
||||
#ifdef UNICODE
|
||||
wcsncpy(p->dent.d_name, L"..", MAXNAMLEN+1);
|
||||
#else
|
||||
strncpy(p->dent.d_name, "..", MAXNAMLEN+1);
|
||||
#endif
|
||||
p->dent.d_reclen = 2;
|
||||
break;
|
||||
|
||||
default: /* regular entry. */
|
||||
#ifdef UNICODE
|
||||
wcsncpy(p->dent.d_name, ffp->name, MAXNAMLEN+1);
|
||||
#else
|
||||
strncpy(p->dent.d_name, ffp->name, MAXNAMLEN+1);
|
||||
#endif
|
||||
p->dent.d_reclen = (char) wcslen(p->dent.d_name);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* Windows and UNIX systems, with support for FTDI and Prolific
|
||||
* USB ports. Support for these has been removed.
|
||||
*
|
||||
* Version: @(#)win_serial.c 1.0.2 2018/03/07
|
||||
* Version: @(#)win_serial.c 1.0.3 2018/05/06
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
@@ -54,9 +54,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#define PLAT_SERIAL_C
|
||||
#include "../emu.h"
|
||||
#include "../serial.h"
|
||||
#include "../plat.h"
|
||||
#include "../../emu.h"
|
||||
#include "../../plat.h"
|
||||
#include "../devices/ports/serial.h"
|
||||
|
||||
|
||||
/* Handle the receiving of data from the host port. */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implementation of the Settings dialog.
|
||||
*
|
||||
* Version: @(#)win_settings.c 1.0.27 2018/05/02
|
||||
* Version: @(#)win_settings.c 1.0.28 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -50,28 +50,28 @@
|
||||
#include "../mem.h"
|
||||
#include "../rom.h"
|
||||
#include "../device.h"
|
||||
#include "../machines/machine.h"
|
||||
#include "../nvr.h"
|
||||
#include "../machine/machine.h"
|
||||
#include "../ports/game_dev.h"
|
||||
#include "../ports/parallel.h"
|
||||
#include "../ports/parallel_dev.h"
|
||||
#include "../ports/serial.h"
|
||||
#include "../input/mouse.h"
|
||||
#include "../input/game/joystick.h"
|
||||
#include "../floppy/fdd.h"
|
||||
#include "../disk/hdd.h"
|
||||
#include "../disk/hdc.h"
|
||||
#include "../disk/hdc_ide.h"
|
||||
#include "../disk/zip.h"
|
||||
#include "../cdrom/cdrom.h"
|
||||
#include "../scsi/scsi.h"
|
||||
#include "../network/network.h"
|
||||
#include "../sound/sound.h"
|
||||
#include "../sound/midi.h"
|
||||
#include "../sound/snd_mpu401.h"
|
||||
#include "../video/video.h"
|
||||
#include "../ui/ui.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/ports/game_dev.h"
|
||||
#include "../devices/ports/parallel.h"
|
||||
#include "../devices/ports/parallel_dev.h"
|
||||
#include "../devices/ports/serial.h"
|
||||
#include "../devices/input/mouse.h"
|
||||
#include "../devices/input/game/joystick.h"
|
||||
#include "../devices/floppy/fdd.h"
|
||||
#include "../devices/disk/hdd.h"
|
||||
#include "../devices/disk/hdc.h"
|
||||
#include "../devices/disk/hdc_ide.h"
|
||||
#include "../devices/disk/zip.h"
|
||||
#include "../devices/cdrom/cdrom.h"
|
||||
#include "../devices/scsi/scsi.h"
|
||||
#include "../devices/network/network.h"
|
||||
#include "../devices/sound/sound.h"
|
||||
#include "../devices/sound/midi.h"
|
||||
#include "../devices/sound/snd_mpu401.h"
|
||||
#include "../devices/video/video.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implementation of the Sound Gain dialog.
|
||||
*
|
||||
* Version: @(#)win_snd_gain.c 1.0.5 2018/05/01
|
||||
* Version: @(#)win_snd_gain.c 1.0.6 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -43,11 +43,11 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include "../emu.h"
|
||||
#include "../config.h"
|
||||
#include "../sound/sound.h"
|
||||
#include "..//emu.h"
|
||||
#include "..//config.h"
|
||||
#include "../ui/ui.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/sound/sound.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implementation of the Status Window dialog.
|
||||
*
|
||||
* Version: @(#)win_status.c 1.0.5 2018/05/02
|
||||
* Version: @(#)win_status.c 1.0.6 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -43,7 +43,6 @@
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "../emu.h"
|
||||
#include "../pit.h"
|
||||
#include "../mem.h"
|
||||
#include "../cpu/cpu.h"
|
||||
#include "../cpu/x86_ops.h"
|
||||
@@ -53,6 +52,7 @@
|
||||
#include "../device.h"
|
||||
#include "../ui/ui.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/system/pit.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implement threads and mutexes for the Win32 platform.
|
||||
*
|
||||
* Version: @(#)win_thread.c 1.0.4 2018/04/10
|
||||
* Version: @(#)win_thread.c 1.0.5 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Implement the user Interface module.
|
||||
*
|
||||
* Version: @(#)win_ui.c 1.0.19 2018/05/05
|
||||
* Version: @(#)win_ui.c 1.0.20 2018/05/06
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -51,11 +51,11 @@
|
||||
#include "../version.h"
|
||||
#include "../config.h"
|
||||
#include "../device.h"
|
||||
#include "../input/keyboard.h"
|
||||
#include "../input/mouse.h"
|
||||
#include "../video/video.h"
|
||||
#include "../ui/ui.h"
|
||||
#include "../plat.h"
|
||||
#include "../devices/input/keyboard.h"
|
||||
#include "../devices/input/mouse.h"
|
||||
#include "../devices/video/video.h"
|
||||
#include "win.h"
|
||||
#include "win_d3d.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user