Permalink
Browse files

SDCardUtil: Namespace SDCardUtil

Brings yet another header in the common library under the Common
namespace.
  • Loading branch information...
lioncash committed May 11, 2018
1 parent 4e1547b commit 3b0139b258493969c2d8cf32333c757e8afe0ee3
@@ -56,6 +56,8 @@
#pragma warning(disable : 4310)
#endif
namespace Common
{
/* Believe me, you *don't* want to change these constants !! */
#define BYTES_PER_SECTOR 512
#define RESERVED_SECTORS 32
@@ -286,6 +288,7 @@ bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename)
ERROR_LOG(COMMON, "unlink(%s) failed: %s", filename.c_str(), LastStrerrorString().c_str());
return false;
}
} // namespace Common
#ifdef _MSC_VER
#pragma warning(pop)
@@ -7,4 +7,7 @@
#include <string>
#include "Common/CommonTypes.h"
namespace Common
{
bool SDCardCreate(u64 disk_size /*in MB*/, const std::string& filename);
} // namespace Common
@@ -67,7 +67,7 @@ void SDIOSlot0::OpenInternal()
if (!m_card)
{
WARN_LOG(IOS_SD, "Failed to open SD Card image, trying to create a new 128MB image...");
if (SDCardCreate(128, filename))
if (Common::SDCardCreate(128, filename))
{
INFO_LOG(IOS_SD, "Successfully created %s", filename.c_str());
m_card.Open(filename, "r+b");

0 comments on commit 3b0139b

Please sign in to comment.