DolphinQt: Stub Host_* functions & Resource system.

This commit is contained in:
Augustin Cavalier
2014-10-18 11:07:17 -04:00
parent 742f9c6b14
commit 8d4068527b
13 changed files with 560 additions and 164 deletions

View File

@ -0,0 +1,21 @@
// Copyright 2014 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#include <QStringListIterator>
#include "Utils.h"
QString NiceSizeFormat(s64 size)
{
QStringList list = { SL("KB"), SL("MB"), SL("GB"), SL("TB"), SL("PB"), SL("EB") };
QStringListIterator i(list);
QString unit = SL("b");
double num = size;
while (num >= 1024.0 && i.hasNext())
{
unit = i.next();
num /= 1024.0;
}
return SL("%1 %2").arg(QString::number(num, 'f', 1)).arg(unit);
}