Merge branch 'master' into d3d12

This commit is contained in:
Triang3l 2018-12-16 12:49:09 +03:00
commit 03f440582d
3 changed files with 19 additions and 15 deletions

View File

@ -54,6 +54,10 @@ project("xenia-app")
"xenia_main.cc", "xenia_main.cc",
"../base/main_"..platform_suffix..".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") filter("platforms:Windows")
files({ files({
"main_resources.rc", "main_resources.rc",

View File

@ -40,8 +40,6 @@
#include "xenia/hid/xinput/xinput_hid.h" #include "xenia/hid/xinput/xinput_hid.h"
#endif // XE_PLATFORM_WIN32 #endif // XE_PLATFORM_WIN32
#include "third_party/xbyak/xbyak/xbyak_util.h"
DEFINE_string(apu, "any", "Audio system. Use: [any, nop, xaudio2]"); DEFINE_string(apu, "any", "Audio system. Use: [any, nop, xaudio2]");
DEFINE_string(gpu, "any", "Graphics system. Use: [any, vulkan, null]"); DEFINE_string(gpu, "any", "Graphics system. Use: [any, vulkan, null]");
DEFINE_string(hid, "any", "Input system. Use: [any, nop, winkey, xinput]"); DEFINE_string(hid, "any", "Input system. Use: [any, nop, winkey, xinput]");
@ -155,14 +153,6 @@ int xenia_main(const std::vector<std::wstring>& args) {
Profiler::Initialize(); Profiler::Initialize();
Profiler::ThreadEnter("main"); 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. // Figure out where content should go.
std::wstring content_root; std::wstring content_root;
if (!FLAGS_content_root.empty()) { if (!FLAGS_content_root.empty()) {

View File

@ -22,6 +22,8 @@
#include "xenia/base/platform_win.h" #include "xenia/base/platform_win.h"
#include "xenia/base/string.h" #include "xenia/base/string.h"
#include "third_party/xbyak/xbyak/xbyak_util.h"
#include <bcrypt.h> #include <bcrypt.h>
DEFINE_bool(win32_high_freq, true, DEFINE_bool(win32_high_freq, true,
@ -85,11 +87,6 @@ static void RequestHighPerformance() {
int Main() { int Main() {
auto entry_info = xe::GetEntryInfo(); auto entry_info = xe::GetEntryInfo();
// Request high performance timing.
if (FLAGS_win32_high_freq) {
RequestHighPerformance();
}
// Convert command line to an argv-like format so we can share code/use // Convert command line to an argv-like format so we can share code/use
// gflags. // gflags.
auto command_line = GetCommandLineW(); auto command_line = GetCommandLineW();
@ -132,10 +129,23 @@ int Main() {
// Initialize logging. Needs parsed FLAGS. // Initialize logging. Needs parsed FLAGS.
xe::InitializeLogging(entry_info.name); 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. // Print version info.
XELOGI("Build: %s / %s on %s", XE_BUILD_BRANCH, XE_BUILD_COMMIT, XELOGI("Build: %s / %s on %s", XE_BUILD_BRANCH, XE_BUILD_COMMIT,
XE_BUILD_DATE); XE_BUILD_DATE);
// Request high performance timing.
if (FLAGS_win32_high_freq) {
RequestHighPerformance();
}
// Call app-provided entry point. // Call app-provided entry point.
int result = entry_info.entry_point(args); int result = entry_info.entry_point(args);