summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgibbed <rick@gibbed.us>2018-11-26 10:24:17 -0600
committergibbed <rick@gibbed.us>2018-11-26 10:24:17 -0600
commit08be8af5c0efc4e2f0f06dd5e290c03d8b6ea87a (patch)
tree5cfe98370b1643d8e4cdbdd080037cc8f65ed758
parent28b494dadc5cbcc74ba47784872b0b58ca89d7a3 (diff)
[App] Abort out early with an error message if CPU does not support AVX.
-rw-r--r--src/xenia/app/xenia_main.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xenia/app/xenia_main.cc b/src/xenia/app/xenia_main.cc
index 2597fc02f..98dcbf4f4 100644
--- a/src/xenia/app/xenia_main.cc
+++ b/src/xenia/app/xenia_main.cc
@@ -37,6 +37,8 @@
#include "xenia/hid/xinput/xinput_hid.h"
#endif // XE_PLATFORM_WIN32
+#include "third_party/xbyak/xbyak/xbyak_util.h"
+
DEFINE_string(apu, "any", "Audio system. Use: [any, nop, xaudio2]");
DEFINE_string(gpu, "any", "Graphics system. Use: [any, vulkan, null]");
DEFINE_string(hid, "any", "Input system. Use: [any, nop, winkey, xinput]");
@@ -138,6 +140,14 @@ int xenia_main(const std::vector<std::wstring>& args) {
Profiler::Initialize();
Profiler::ThreadEnter("main");
+ Xbyak::util::Cpu cpu;
+ if (!cpu.has(Xbyak::util::Cpu::tAVX)) {
+ xe::FatalError(
+ "Your CPU is too old to support Xenia. See the FAQ for system "
+ "requirements at https://xenia.jp");
+ return -1;
+ }
+
// Figure out where content should go.
std::wstring content_root;
if (!FLAGS_content_root.empty()) {