mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Oracle] Add low-memory check (<=4GiB) and use mtgxml url instead.
This commit is contained in:
parent
a712553c81
commit
e46ac131a3
4 changed files with 147 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef COCKATRICE_SYSTEM_MEMORY_QUERIER_H
|
||||
#define COCKATRICE_SYSTEM_MEMORY_QUERIER_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
class SystemMemoryQuerier
|
||||
{
|
||||
public:
|
||||
static qulonglong totalMemoryBytes();
|
||||
static qulonglong availableMemoryBytes();
|
||||
|
||||
static bool hasAtLeastGiB(int gib)
|
||||
{
|
||||
const qulonglong GiB = 1024ull * 1024ull * 1024ull;
|
||||
return totalMemoryBytes() >= (qulonglong)gib * GiB;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_SYSTEM_MEMORY_QUERIER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue