~ubuntu-branches/ubuntu/trusty/manaplus/trusty

« back to all changes in this revision

Viewing changes to src/utils/cpu.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-10-07 10:26:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131007102614-tg2zjdz8vmtl6n7i
Tags: 1.3.9.29-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#include "utils/stringutils.h"
26
26
 
27
 
#include "resources/resourcemanager.h"
28
 
 
29
27
#include "debug.h"
30
28
 
31
29
int mCpuFlags = 0;
32
30
 
33
31
void Cpu::detect()
34
32
{
35
 
#if defined(__GNUC__) && (GCC_VERSION >= 40800)
 
33
#if defined(__GNUC__) && (GCC_VERSION >= 40800) && !defined(ANDROID)
36
34
    __builtin_cpu_init();
37
35
    if (__builtin_cpu_supports ("mmx"))
38
36
        mCpuFlags |= FEATURE_MMX;
92
90
 
93
91
void Cpu::printFlags()
94
92
{
95
 
    std::string str = "CPU features:";
 
93
    std::string str("CPU features:");
96
94
    if (mCpuFlags & FEATURE_MMX)
97
95
        str.append(" mmx");
98
96
    if (mCpuFlags & FEATURE_SSE)