Thorough(!) remodeling of the arch/ directory and the contents therein; fixed link-time warnings on GCC and should make things a lot easier to manage. A pile of other random things too, mostly cleanups and getting things to work with the remodeled arch/ directory.

This commit is contained in:
Ben Anderson
2005-03-14 06:44:38 +00:00
parent eaaace1f30
commit 0db665d4d6
95 changed files with 765 additions and 493 deletions
@@ -1,8 +1,9 @@
#include "global.h"
#include "MemoryCardDriver.h"
#include "PrefsManager.h"
#include "MemoryCardDriver_Null.h"
#include "arch/arch_platform.h"
#include "Selector_MemoryCardDriver.h"
bool UsbStorageDevice::operator==(const UsbStorageDevice& other) const
{
@@ -31,11 +32,10 @@ MemoryCardDriver *MakeMemoryCardDriver()
MemoryCardDriver *ret = NULL;
#ifdef LINUX
ret = new MemoryCardDriverThreaded_Linux;
#elif _WINDOWS
ret = new MemoryCardDriverThreaded_Windows;
#ifdef ARCH_MEMORY_CARD_DRIVER
ret = new ARCH_MEMORY_CARD_DRIVER;
#endif
if( !ret )
ret = new MemoryCardDriver_Null;
@@ -21,6 +21,11 @@ protected:
vector<UsbStorageDevice> m_vDevicesLastSeen;
};
#ifdef ARCH_MEMORY_CARD_DRIVER
#error "More than one MemoryCardDriver selected!"
#endif
#define ARCH_MEMORY_CARD_DRIVER MemoryCardDriverThreaded_Linux
#endif
/*
@@ -20,6 +20,11 @@ private:
DWORD m_dwLastLogicalDrives;
};
#ifdef ARCH_MEMORY_CARD_DRIVER
#error "More than one MemoryCardDriver included!"
#endif
#define ARCH_MEMORY_CARD_DRIVER MemoryCardDriverThreaded_Windows
#endif
/*
@@ -0,0 +1,38 @@
#ifndef SELECTOR_MEMORY_CARD_DRIVER_H
#define SELECTOR_MEMORY_CARD_DRIVER_H
#include "arch/arch_platform.h"
/* MemoryCardDriver selector. */
#if defined(HAVE_LINUXKERNEL)
#include "MemoryCardDriverThreaded_Linux.h"
#elif defined(HAVE_WIN32)
#include "MemoryCardDriverThreaded_Win32.h"
#endif
#endif
/*
* (c) 2005 Ben Anderson
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/