mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00

ARM only at the moment. Could potentially support x86 and MIPS if necessary. Capable of parsing the manufacturer codes and part IDs of some (but not all part numbers). If anyone knows of part numbers that aren't in the list, please report them.
48 lines
1.9 KiB
Java
48 lines
1.9 KiB
Java
package org.dolphinemu.dolphinemu.about;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import org.dolphinemu.dolphinemu.R;
|
|
import org.dolphinemu.dolphinemu.about.AboutActivity.AboutFragmentItem;
|
|
import org.dolphinemu.dolphinemu.utils.CPUHelper;
|
|
|
|
import android.app.ListFragment;
|
|
import android.os.Build;
|
|
import android.os.Bundle;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.ListView;
|
|
|
|
/**
|
|
* {@link ListFragment class that is responsible
|
|
* for displaying information related to the CPU.
|
|
*/
|
|
public final class CPUInfoFragment extends ListFragment
|
|
{
|
|
@Override
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
|
{
|
|
ListView rootView = (ListView) inflater.inflate(R.layout.gamelist_listview, container, false);
|
|
List<AboutActivity.AboutFragmentItem> items = new ArrayList<AboutActivity.AboutFragmentItem>();
|
|
|
|
CPUHelper cpuHelper = new CPUHelper(getActivity());
|
|
|
|
items.add(new AboutFragmentItem(getString(R.string.cpu_info), cpuHelper.getProcessorInfo()));
|
|
items.add(new AboutFragmentItem(getString(R.string.cpu_type), cpuHelper.getProcessorType()));
|
|
items.add(new AboutFragmentItem(getString(R.string.cpu_abi_one), Build.CPU_ABI));
|
|
items.add(new AboutFragmentItem(getString(R.string.cpu_abi_two), Build.CPU_ABI2));
|
|
items.add(new AboutFragmentItem(getString(R.string.num_cores), Integer.toString(cpuHelper.getNumCores())));
|
|
items.add(new AboutFragmentItem(getString(R.string.cpu_features), cpuHelper.getFeatures()));
|
|
items.add(new AboutFragmentItem(getString(R.string.cpu_hardware), Build.HARDWARE));
|
|
if (CPUHelper.isARM())
|
|
items.add(new AboutFragmentItem(getString(R.string.cpu_implementer), cpuHelper.getImplementer()));
|
|
|
|
AboutActivity.InfoFragmentAdapter adapter = new AboutActivity.InfoFragmentAdapter(getActivity(), R.layout.about_layout, items);
|
|
rootView.setAdapter(adapter);
|
|
|
|
return rootView;
|
|
}
|
|
}
|