Commit Graph

38 Commits

Author SHA1 Message Date
Glenn Maynard a9038f82dd move memory card prefs into MemoryCardManager 2005-10-27 17:37:59 +00:00
Glenn Maynard d05224c544 increase timeout 2005-09-29 02:36:10 +00:00
Glenn Maynard 48f74fb55e add error return from MountCard 2005-05-22 01:44:37 +00:00
Glenn Maynard 4c8c5bea37 Add variable timeouts.
After mounting or unmounting a filesystem, flush cache, so we don't keep
stale cache around.

RageFileDriverDirect::Remount could (and should) flush its own cache when
changing root (since the cache represents the old root).  However, calling
Remount doesn't indicate that the filesystem has actually changed, so if
the root isn't actually changing (Remount("/mnt") on a filesystem already
pointing to /mnt), the driver can't be expected to flush.  (Remount also
currently doesn't go through Timeout, and we need to flush on unmount,
too.)  So, take the cheap way out and just flush through FILEMAN.
2005-05-22 01:36:08 +00:00
Glenn Maynard f5a65ff372 fix missing 2005-04-22 06:51:22 +00:00
Glenn Maynard 97a4a65b26 Unmount cards if we time out. "Locking" and "finalizing" are the same;
merge them.  (They're both enabled and disabled in the same place.)
Pause the memory card thread during gameplay, so any changes will
wait until the current stage finishes (so we don't interrupt the player with
a noise and possibly skip).  Work on making MemoryCardManager::LockCards()
block if the card is in CHECKING.
2005-02-06 08:48:55 +00:00
Glenn Maynard ca4589a8c3 Memory card work: Show "CHECKING" when we've seen the card and
havn't finished checking it out yet (eg. write check).  This improves responsiveness:
a slow card will indicate that we see the card immediately, and it helps
diagnostics since we can easily tell if the machine sees a card.  Allow re-
establishing a memory card removed after finalization, as long as it has the
same serial number.
2005-02-06 05:08:46 +00:00
Glenn Maynard d468e15435 Add a memory card WorkerThread. This works simiilarly to the file
worker threads (though somewhat simpler).  Changes: MemoryCardDriverThreaded
is going away; all memory card drivers are implicitly threaded at a higher
level (there's no reason to not do so).  Memory card drivers can safely time
out; we'll recover sanely.  This needs a bit more work, but should be more
tolerant of long memory card recovery periods.
2005-02-05 19:00:33 +00:00
Glenn Maynard ed3bec750b merge MountUsedCard and MountCard 2005-01-28 00:12:09 +00:00
Glenn Maynard f8a00af09f MemoryCardManager::TryMountAllCards gone 2005-01-28 00:08:16 +00:00
Glenn Maynard a930c41ed7 SongManager::LoadAllFromProfiles -> SongManager::LoadAllFromProfile
mount each memory card as needed, one at a time
working on being able to start a timeout period in MEMCARDMAN::MountCard
2005-01-28 00:04:22 +00:00
Glenn Maynard 18b0c5f2d9 Instead of manually pausing and unpausing, automatically pause the
memory card thread when mounting the first drive, and automatically
unpause it when we unmount the last drive.  (We can do this simplification
because we always mount and unmount memory cards explicitly when
reading and writing to them.)
2005-01-27 22:57:18 +00:00
Glenn Maynard 39b9a68473 split LockCards into LockCards, UnlockCards 2005-01-27 19:42:34 +00:00
Glenn Maynard 39604143f6 mount and unmount FILEMAN mountpoints in MemoryCardManager,
not drivers; use timeout FS; don't pass mountpoints to drivers since
they never need to know them
2005-01-27 19:23:54 +00:00
Chris Danford f4f02e23a2 show a different string for "card inserted, but we don't yet know the name on the card" 2004-10-09 09:57:12 +00:00
Chris Danford bc39cb5079 serialize all memory card operations since mount operations hang if we're doing lsusb or reading USB mass storage descriptors in another thread 2004-10-09 08:16:48 +00:00
Chris Danford f65c1d3fbb only remount cards that were in use 2004-10-03 06:21:16 +00:00
Chris Danford 9fe9b0884a Add hack to not leave cards mounted 2004-10-03 05:27:52 +00:00
Chris Danford 8471f5c7bc fix "SaveMachineStats fails because cards not mounted" 2004-08-22 07:19:38 +00:00
Chris Danford 11a8029493 memory card cleanup 2004-08-17 05:50:51 +00:00
Chris Danford e435165014 clean up memory card logic:
- Don't do the OS mount for cards during the attract screens.  Only do OS mounts in the time between BeginGame and PlayersFinalized.
 - Remove logic for fast load of a Profile from the MemoryCard.  Instead, load the whole profile all at once on PlayersFinalized.
2004-08-09 05:01:24 +00:00
Glenn Maynard 733127d8ed license update 2004-06-08 01:24:17 +00:00
Chris Danford 110ec3d331 synchronize access to memory cards between mounting thread and main thread Profile Load/Save 2004-06-06 02:41:16 +00:00
Chris Danford 9d1a89d0d5 add hack to not play connect/disconnect sounds after resetting USB 2004-05-03 02:43:36 +00:00
Chris Danford bfd7b1930c simplify name update logic 2004-05-03 00:34:54 +00:00
Chris Danford 6928e8e864 ugly hack to fix "mem card name not updated if card left in between games" 2004-04-23 06:35:24 +00:00
Chris Danford e4353d5cb8 move from .h to .cpp 2004-04-23 05:40:07 +00:00
Chris Danford 82c910711c read memory card names in the mount thread
MemoryCardDrivers: fix Mount doesn't clear the right mount point before trying to mount
2004-04-23 04:17:02 +00:00
Glenn Maynard 1057cf4237 MemoryCardManager::PathIsMemCard 2004-03-23 22:33:14 +00:00
Chris Danford 9555d508ee move RageFileManager mounting into the MemoryCardDriver, not MemoryCardManager 2004-03-14 01:40:24 +00:00
Chris Danford 221b51c2b4 add loading of edits from a profile 2004-02-08 01:05:53 +00:00
Chris Danford 67a6fddcf3 load profile from memory card, fix memory card file flushing 2003-12-19 08:17:44 +00:00
Chris Danford d0a6176e13 better memory card assignment logic, add memory card icons, more memory card sounds 2003-12-19 04:52:07 +00:00
Chris Danford 1ba5e253ca windows memory card fixes/cleanup 2003-12-18 07:46:21 +00:00
Chris Danford 1c44cd23c8 add memory card insert/remove sound 2003-12-18 04:24:25 +00:00
Chris Danford e11afda65a memory card refactoring 2003-12-17 10:20:53 +00:00
Chris Danford 9777f6ef00 working on more efficient Linux usb detection 2003-12-17 03:43:31 +00:00
Chris Danford a4c3e79e7b working on USB memory card detection for Linux 2003-12-15 08:34:06 +00:00