~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/tape/tape.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2006-07-30 19:15:59 UTC
  • mto: (9.1.1 lenny) (1.1.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20060730191559-g31ymd2mk102kzff
Tags: upstream-1.19
ImportĀ upstreamĀ versionĀ 1.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include "maincpu.h"
43
43
#include "mem.h"
44
44
#include "mos6510.h"
 
45
#include "network.h"
45
46
#include "t64.h"
46
47
#include "tap.h"
47
48
#include "tape-internal.h"
459
460
 
460
461
int tape_image_detach(unsigned int unit)
461
462
{
462
 
   if (event_playback_active())
463
 
        return -1;
 
463
    char event_data[2];
 
464
 
 
465
    if (unit != 1)
 
466
        return -1;
 
467
 
 
468
    event_data[0] = (char)unit;
 
469
    event_data[1] = 0;
 
470
 
 
471
    if (event_playback_active())
 
472
        return -1;
 
473
 
 
474
    if (network_connected()) {
 
475
        network_event_record(EVENT_ATTACHTAPE, (void *)event_data, 2);
 
476
        return 0;
 
477
    }
464
478
 
465
479
   return tape_image_detach_internal(unit);
466
480
}
521
535
   if (event_playback_active())
522
536
        return -1;
523
537
 
 
538
    if (network_connected()) {
 
539
        network_attach_image(unit, name);
 
540
        return 0;
 
541
    }
 
542
 
524
543
   return tape_image_attach_internal(unit, name);
525
544
}
526
545