diff options
| author | gibbed <rick@gibbed.us> | 2018-12-15 23:36:07 -0600 |
|---|---|---|
| committer | gibbed <rick@gibbed.us> | 2018-12-15 23:36:07 -0600 |
| commit | eee4d916211d7c1b40ae6d734e980fc9be34ce53 (patch) | |
| tree | 567230d3be723fb7c32614a522ac9b3fb29a0773 | |
| parent | 85b714f2af5b9f793e05682d8397268ca600b0cd (diff) | |
[App] Hopefully fix CPU support check for AVX so it will function on CPUs without AVX.
| -rw-r--r-- | src/xenia/app/premake5.lua | 4 | ||||
| -rw-r--r-- | src/xenia/app/xenia_main.cc | 10 | ||||
| -rw-r--r-- | src/xenia/base/main_win.cc | 10 |
3 files changed, 14 insertions, 10 deletions
diff --git a/src/xenia/app/premake5.lua b/src/xenia/app/premake5.lua index b907adb63..c5e9eb334 100644 --- a/src/xenia/app/premake5.lua +++ b/src/xenia/app/premake5.lua @@ -53,6 +53,10 @@ project("xenia-app") "xenia_main.cc", "../base/main_"..platform_suffix..".cc", }) + + filter("files:xenia_main.cc or ../base/main_"..platform_suffix..".cc") + vectorextensions("IA32") -- Disable AVX for main_win.cc so our AVX check/error can happen. + filter("platforms:Windows") files({ "main_resources.rc", diff --git a/src/xenia/app/xenia_main.cc b/src/xenia/app/xenia_main.cc index 5ea224000..2597fc02f 100644 --- a/src/xenia/app/xenia_main.cc +++ b/src/xenia/app/xenia_main.cc @@ -37,8 +37,6 @@ #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]"); @@ -140,14 +138,6 @@ 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 does not support AVX, which is required by 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()) { diff --git a/src/xenia/base/main_win.cc b/src/xenia/base/main_win.cc index 024a76d3c..e495b07d8 100644 --- a/src/xenia/base/main_win.cc +++ b/src/xenia/base/main_win.cc @@ -22,6 +22,8 @@ #include "xenia/base/platform_win.h" #include "xenia/base/string.h" +#include "third_party/xbyak/xbyak/xbyak_util.h" + #include <bcrypt.h> DEFINE_bool(win32_high_freq, true, @@ -127,6 +129,14 @@ int Main() { // Initialize logging. Needs parsed FLAGS. xe::InitializeLogging(entry_info.name); + Xbyak::util::Cpu cpu; + if (!cpu.has(Xbyak::util::Cpu::tAVX)) { + xe::FatalError( + "Your CPU does not support AVX, which is required by Xenia. See the " + "FAQ for system requirements at https://xenia.jp"); + return -1; + } + // Print version info. XELOGI("Build: %s / %s on %s", XE_BUILD_BRANCH, XE_BUILD_COMMIT, XE_BUILD_DATE); |
