bitbngr: handle create (nw)

winsocket: use GetLastError (nw)
This commit is contained in:
cracyc 2013-04-15 04:08:12 +00:00
parent 1aded8a104
commit 5b2dde69b9
3 changed files with 11 additions and 3 deletions

View File

@ -487,7 +487,14 @@ bool bitbanger_device::call_load(void)
return IMAGE_INIT_PASS; 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 call_unload

View File

@ -93,6 +93,7 @@ public:
// image-level overrides // image-level overrides
virtual bool call_load(); virtual bool call_load();
virtual void call_unload(); virtual void call_unload();
virtual bool call_create(int format_type, option_resolution *format_options);
// image device // image device
virtual iodevice_t image_type() const { return IO_PRINTER; } virtual iodevice_t image_type() const { return IO_PRINTER; }

View File

@ -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__); sprintf(line, "win_read_socket : %s : %d ", __FILE__, __LINE__);
perror(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)) 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) if (result < 0)
{ {
return win_error_to_mame_file_error(errno); return win_error_to_mame_file_error(GetLastError());
} }
if (actual != NULL ) 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); result = send(file->socket, (const char*)buffer, count, 0);
if (result < 0) if (result < 0)
{ {
return win_error_to_mame_file_error(errno); return win_error_to_mame_file_error(GetLastError());
} }
if (actual != NULL ) if (actual != NULL )