Example #1
0
int
tape_stop( void )
{
  if( tape_playing ) {

    tape_playing = 0;
    ui_statusbar_update( UI_STATUSBAR_ITEM_TAPE, UI_STATUSBAR_STATE_INACTIVE );
    loader_tape_stop();

    /* If we were fastloading, sound was off, so turn it back on, and
       reset the speed counter */
    if( settings_current.fastload ) {
      sound_unpause();
      timer_estimate_reset();
    }

    tape_save_next_edge();
    event_remove_type( tape_edge_event );

    /* Turn off any lingering MIC level in a second (some loaders like Alkatraz
       seem to check the MIC level soon after loading is finished, presumably as
       a copy protection check */
    event_add( tstates + machine_current->timings.tstates_per_frame,
               tape_mic_off_event );
  }

  if( stop_event != -1 ) debugger_event( stop_event );

  return 0;
}
Example #2
0
/* Handler for the main window's WM_SIZE notification */
static int
win32ui_window_resize( HWND hWnd, WPARAM wParam, LPARAM lParam )
{
  if( wParam == SIZE_MINIMIZED ) {
    if( !size_paused ) {
      size_paused = 1;
      fuse_emulation_pause();

      /* Process UI events until the window is restored */
      win32ui_process_messages( 0 );
    }
  } else {
    win32display_drawing_area_resize( LOWORD( lParam ), HIWORD( lParam ), 1 );

    /* Resize statusbar and inner parts */
    SendMessage( fuse_hStatusWindow, WM_SIZE, wParam, lParam );
    win32statusbar_resize( hWnd, wParam, lParam );

    if( size_paused ) {
      timer_estimate_reset();
      PostMessage( fuse_hWnd, WM_USER_EXIT_PROCESS_MESSAGES, 0, 0 );

      size_paused = 0;
      fuse_emulation_unpause();
    }
  }

  return 0;
}
Example #3
0
/* Machine/Pause */
void
menu_machine_pause( int action )
{
  if( paused ) {
    paused = 0;
    ui_statusbar_update( UI_STATUSBAR_ITEM_PAUSED,
                         UI_STATUSBAR_STATE_INACTIVE );
    timer_estimate_reset();
    PostMessage( fuse_hWnd, WM_USER_EXIT_PROCESS_MESSAGES, 0, 0 );

    /* Resume emulation */
    fuse_emulation_unpause();
  } else {

    /* Stop emulation */
    fuse_emulation_pause();

    paused = 1;
    ui_statusbar_update( UI_STATUSBAR_ITEM_PAUSED, UI_STATUSBAR_STATE_ACTIVE );
    win32ui_process_messages( 0 );
  }
}
Example #4
0
int tape_stop( void )
{
  if( tape_playing ) {

    tape_playing = 0;
    ui_statusbar_update( UI_STATUSBAR_ITEM_TAPE, UI_STATUSBAR_STATE_INACTIVE );
    loader_tape_stop();

    /* If we were fastloading, sound was off, so turn it back on, and
       reset the speed counter */
    if( settings_current.fastload ) {
      sound_unpause();
      timer_estimate_reset();
    }

    event_remove_type( tape_edge_event );
  }

  if( stop_event != -1 ) debugger_event( stop_event );

  return 0;
}