Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

On linux, guess the mount point for ipods (tested) and sansas (untested).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13653 a1c6a512-1295-4272-9138-f99709370657

+37 -1
+37 -1
rbutil/rbutilCtrls.cpp
··· 435 435 AutoDetect(); 436 436 } 437 437 438 + #if !(defined( __WXMSW__ ) || defined( __DARWIN__)) 439 + wxString resolve_mount_point( const wxString device ) 440 + { 441 + FILE *fp = fopen( "/proc/mounts", "r" ); 442 + if( !fp ) return wxT(""); 443 + char *dev, *dir; 444 + while( fscanf( fp, "%as %as %*s %*s %*s %*s", &dev, &dir ) != EOF ) 445 + { 446 + if( wxString( dev, wxConvUTF8 ) == device ) 447 + { 448 + wxString directory = wxString( dir, wxConvUTF8 ); 449 + free( dev ); 450 + free( dir ); 451 + return directory; 452 + } 453 + free( dev ); 454 + free( dir ); 455 + } 456 + fclose( fp ); 457 + return wxT(""); 458 + } 459 + #endif 460 + 438 461 void DeviceSelectorCtrl::AutoDetect() 439 462 { 440 463 struct ipod_t ipod; ··· 445 468 int index = gv->plat_bootloadername.Index(temp); // use the bootloader names.. 446 469 m_deviceCbx->SetValue(gv->plat_name[index]); 447 470 gv->curplat=gv->plat_id[index]; 471 + 472 + #if !(defined( __WXMSW__ ) || defined( __DARWIN__)) 473 + wxString tmp = resolve_mount_point(wxString(ipod.diskname,wxConvUTF8)+wxT("2")); 474 + if( tmp != wxT("") ) 475 + gv->curdestdir = tmp; 476 + #endif 448 477 return; 449 478 } 450 479 else if (n > 1) ··· 461 490 int index = gv->plat_id.Index(wxT("sansae200")); 462 491 m_deviceCbx->SetValue(gv->plat_name[index]); 463 492 gv->curplat=gv->plat_id[index]; 493 + 494 + #if !(defined( __WXMSW__ ) || defined( __DARWIN__)) 495 + wxString tmp = resolve_mount_point(wxString(ipod.diskname,wxConvUTF8)+wxT("1")); 496 + if( tmp != wxT("") ) 497 + gv->curdestdir = tmp; 498 + #endif 464 499 return; 465 500 } 466 501 else if (n2 > 1) ··· 544 579 void DevicePositionCtrl::OnBrowseBtn(wxCommandEvent& event) 545 580 { 546 581 const wxString& temp = wxDirSelector( 547 - wxT("Please select the location of your audio device"), gv->curdestdir); 582 + wxT("Please select the location of your audio device"), gv->curdestdir, 583 + 0, wxDefaultPosition, this); 548 584 549 585 if (!temp.empty()) 550 586 {