예제 #1
0
파일: ui.c 프로젝트: jacadym/fuse-emulator
int
ui_mdr_write( int which, int saveas )
{
    int err;
    char *filename = NULL, title[80];

    fuse_emulation_pause();

    snprintf( title, 80, "Fuse - Write Microdrive Cartridge %i", which + 1 );

    if( saveas ) {
        filename = ui_get_save_filename( title );
        if( !filename ) {
            fuse_emulation_unpause();
            return 1;
        }
    }

    err = if1_mdr_write( which, filename );

    if( saveas ) libspectrum_free( filename );

    fuse_emulation_unpause();

    return err;
}
예제 #2
0
파일: binary.c 프로젝트: CiaranG/ZXdroid
static void
change_save_filename( HWND hwndDlg, LONG user_data )
{
  struct binary_info *info = ( struct binary_info * ) user_data;
  TCHAR *new_filename;

  new_filename = ui_get_save_filename( "Fuse - Save Binary Data" );
  if( !new_filename ) return;

  free( info->filename );

  info->filename = new_filename;

  SendDlgItemMessage( hwndDlg, IDC_BINARY_STATIC_PATH, WM_SETTEXT,
                      0, ( LPARAM ) new_filename );
}
예제 #3
0
파일: ui.c 프로젝트: jacadym/fuse-emulator
int
ui_tape_write( void )
{
    char *filename;

    fuse_emulation_pause();

    filename = ui_get_save_filename( "Fuse - Write Tape" );
    if( !filename ) {
        fuse_emulation_unpause();
        return 1;
    }

    tape_write( filename );

    libspectrum_free( filename );

    fuse_emulation_unpause();

    return 0;
}
예제 #4
0
파일: binary.c 프로젝트: CiaranG/ZXdroid
void
menu_file_savebinarydata( int action )
{
  struct binary_info info;

  fuse_emulation_pause();

  info.dialog_title = TEXT( "Fuse - Save Binary Data" );

  info.filename = ui_get_save_filename( info.dialog_title );
  if( !info.filename ) { fuse_emulation_unpause(); return; }

  info.file.length = -1; /* let the dialog know to leave length box blank */
  info.on_change_filename = &change_save_filename;
  info.on_execute = &save_data;

  /* Information display */
  DialogBoxParam( fuse_hInstance, MAKEINTRESOURCE( IDD_BINARY ), fuse_hWnd,
                  binarydata_proc, ( LPARAM ) &info );

  free( info.filename );

  fuse_emulation_unpause();
}