From 597e5e69da322f24a1adb0633722ce1dfe85570f Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 16 Dec 2003 07:25:12 +0000 Subject: [PATCH] working on more efficient Linux usb detection --- stepmania/src/MemoryCardManager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stepmania/src/MemoryCardManager.cpp b/stepmania/src/MemoryCardManager.cpp index 17ff5385b2..bc2340964b 100644 --- a/stepmania/src/MemoryCardManager.cpp +++ b/stepmania/src/MemoryCardManager.cpp @@ -16,6 +16,8 @@ #include "RageLog.h" #include "RageUtil.h" #include "ScreenManager.h" +# include +# include MemoryCardManager* MEMCARDMAN = NULL; // global and accessable from anywhere in our program @@ -242,23 +244,21 @@ bool UsbChanged() // disconnected. Use this as a trivial check. static const CString VAR_LOG_MESSAGES = "/var/log/messages"; static bool bFirstTime = false; - static _stat old_stat; + static stat old_stat; if( bFirstTime ) { - _fstat(VAR_LOG_MESSAGES, &old_stat); + fstat(VAR_LOG_MESSAGES, &old_stat); bFirstTime = false; return true; } else { - _stat new_stat; - _fstat(VAR_LOG_MESSAGES, &new_stat); + stat new_stat; + fstat(VAR_LOG_MESSAGES, &new_stat); bool bChanged = old_stat != new_stat; old_stat = new_stat; return bChanged; } -#elif defined(_WINDOWS) - return false; #else return false; #endif