diff options
author | 2013-04-15 04:08:12 +0000 | |
---|---|---|
committer | 2013-04-15 04:08:12 +0000 | |
commit | 5b2dde69b9afb679457e278c5becc27e32f8813c (patch) | |
tree | 1942bd47191c5ed29d88c0184613f2051c103f0e | |
parent | 1aded8a1046e391e1c62fa49d92dbd94320194f6 (diff) |
bitbngr: handle create (nw)
winsocket: use GetLastError (nw)
-rw-r--r-- | src/emu/imagedev/bitbngr.c | 7 | ||||
-rw-r--r-- | src/emu/imagedev/bitbngr.h | 1 | ||||
-rw-r--r-- | src/osd/windows/winsocket.c | 6 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/emu/imagedev/bitbngr.c b/src/emu/imagedev/bitbngr.c index ae68bf0a482..e0cb96dbe52 100644 --- a/src/emu/imagedev/bitbngr.c +++ b/src/emu/imagedev/bitbngr.c @@ -487,7 +487,14 @@ bool bitbanger_device::call_load(void) return IMAGE_INIT_PASS; } +bool bitbanger_device::call_create(int format_type, option_resolution *format_options) +{ + m_input_timer->enable(true); + m_input_timer->adjust(attotime::zero, 0, attotime::from_seconds(1)); + /* we don't need to do anything special */ + return IMAGE_INIT_PASS; +} /*------------------------------------------------- call_unload diff --git a/src/emu/imagedev/bitbngr.h b/src/emu/imagedev/bitbngr.h index 301481f4390..715a45417d7 100644 --- a/src/emu/imagedev/bitbngr.h +++ b/src/emu/imagedev/bitbngr.h @@ -93,6 +93,7 @@ public: // image-level overrides virtual bool call_load(); virtual void call_unload(); + virtual bool call_create(int format_type, option_resolution *format_options); // image device virtual iodevice_t image_type() const { return IO_PRINTER; } diff --git a/src/osd/windows/winsocket.c b/src/osd/windows/winsocket.c index 0d1e0abfb37..78571a98ace 100644 --- a/src/osd/windows/winsocket.c +++ b/src/osd/windows/winsocket.c @@ -138,7 +138,7 @@ file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 c { sprintf(line, "win_read_socket : %s : %d ", __FILE__, __LINE__); perror(line); - return win_error_to_mame_file_error(errno); + return win_error_to_mame_file_error(GetLastError()); } else if (FD_ISSET(file->socket, &readfds)) { @@ -174,7 +174,7 @@ file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 c if (result < 0) { - return win_error_to_mame_file_error(errno); + return win_error_to_mame_file_error(GetLastError()); } if (actual != NULL ) @@ -190,7 +190,7 @@ file_error win_write_socket(osd_file *file, const void *buffer, UINT64 offset, U result = send(file->socket, (const char*)buffer, count, 0); if (result < 0) { - return win_error_to_mame_file_error(errno); + return win_error_to_mame_file_error(GetLastError()); } if (actual != NULL ) |