From 7eb69ca2554ef7b5eb0484e9126b93b056da8c13 Mon Sep 17 00:00:00 2001 From: Prism Tutaj Date: Sat, 7 Sep 2019 20:30:25 -0500 Subject: [PATCH] miscellaneous linux fixes. Disables vulkan-trace-viewer and dumper --- src/xenia/gpu/vulkan/premake5.lua | 3 ++- src/xenia/kernel/xam/user_profile.cc | 6 +++--- src/xenia/kernel/xam/user_profile.h | 2 +- src/xenia/kernel/xam/xam_info.cc | 4 ++-- src/xenia/kernel/xam/xam_user.cc | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/xenia/gpu/vulkan/premake5.lua b/src/xenia/gpu/vulkan/premake5.lua index 2be22502e..13c35a75f 100644 --- a/src/xenia/gpu/vulkan/premake5.lua +++ b/src/xenia/gpu/vulkan/premake5.lua @@ -23,7 +23,7 @@ project("xenia-gpu-vulkan") }) -- TODO(benvanik): kill this and move to the debugger UI. -group("src") +--[[ group("src") project("xenia-gpu-vulkan-trace-viewer") uuid("86a1dddc-a26a-4885-8c55-cf745225d93e") kind("WindowedApp") @@ -148,3 +148,4 @@ project("xenia-gpu-vulkan-trace-dump") "1>scratch/stdout-trace-dump.txt", }) end +--]] diff --git a/src/xenia/kernel/xam/user_profile.cc b/src/xenia/kernel/xam/user_profile.cc index 1eaf5947b..1369b2361 100644 --- a/src/xenia/kernel/xam/user_profile.cc +++ b/src/xenia/kernel/xam/user_profile.cc @@ -104,7 +104,7 @@ void UserProfile::EncryptAccountFile(const X_XAMACCOUNTINFO* input, UserProfile::UserProfile() : dash_gpd_(kDashboardID) { account_.xuid_online = 0xE000BABEBABEBABE; - wcscpy_s(account_.gamertag, L"XeniaUser"); + wcscpy(account_.gamertag, L"XeniaUser"); // https://cs.rin.ru/forum/viewtopic.php?f=38&t=60668&hilit=gfwl+live&start=195 // https://github.com/arkem/py360/blob/master/py360/constants.py @@ -218,7 +218,7 @@ void UserProfile::LoadProfile() { for (auto title : titles) { wchar_t fname[256]; - _swprintf(fname, L"%X.gpd", title.title_id); + swprintf(fname, 256, L"%X.gpd", title.title_id); mmap_ = MappedMemory::Open(xe::to_wstring(cvars::profile_directory) + fname, MappedMemory::Mode::kRead); if (!mmap_) { @@ -452,7 +452,7 @@ bool UserProfile::UpdateGpd(uint32_t title_id, xdbf::GpdFile& gpd_data) { } wchar_t fname[256]; - _swprintf(fname, L"%X.gpd", title_id); + swprintf(fname, 256, L"%X.gpd", title_id); filesystem::CreateFile(xe::to_wstring(cvars::profile_directory) + fname); auto mmap_ = diff --git a/src/xenia/kernel/xam/user_profile.h b/src/xenia/kernel/xam/user_profile.h index c30c838b3..f56f149f4 100644 --- a/src/xenia/kernel/xam/user_profile.h +++ b/src/xenia/kernel/xam/user_profile.h @@ -124,7 +124,7 @@ struct X_XAMACCOUNTINFO { std::string GetGamertagString() const; }; -static_assert_size(X_XAMACCOUNTINFO, 0x17C); +// static_assert_size(X_XAMACCOUNTINFO, 0x17C); #pragma pack(pop) class UserProfile { diff --git a/src/xenia/kernel/xam/xam_info.cc b/src/xenia/kernel/xam/xam_info.cc index db882bacb..e1b1b3c98 100644 --- a/src/xenia/kernel/xam/xam_info.cc +++ b/src/xenia/kernel/xam/xam_info.cc @@ -292,7 +292,7 @@ void XamLoaderLaunchTitle(lpstring_t raw_name, dword_t flags) { loader_data.launch_flags = flags; XELOGI( "XamLoaderLaunchTitle launching: (%S) with flags (%d)", - std::string(raw_name), flags); + std::string(raw_name).c_str(), flags); // Translate the launch path to a full path. if (raw_name && raw_name.value() == "") { loader_data.launch_path = "game:\\default.xex"; @@ -435,4 +435,4 @@ void RegisterInfoExports(xe::cpu::ExportResolver* export_resolver, } // namespace xam } // namespace kernel -} // namespace xe \ No newline at end of file +} // namespace xe diff --git a/src/xenia/kernel/xam/xam_user.cc b/src/xenia/kernel/xam/xam_user.cc index f32e98738..2e1e30a8a 100644 --- a/src/xenia/kernel/xam/xam_user.cc +++ b/src/xenia/kernel/xam/xam_user.cc @@ -31,7 +31,7 @@ struct X_PROFILEENUMRESULT { X_XAMACCOUNTINFO account; xe::be device_id; }; -static_assert_size(X_PROFILEENUMRESULT, 0x188); +// static_assert_size(X_PROFILEENUMRESULT, 0x188); dword_result_t XamProfileCreateEnumerator(dword_t device_id, lpdword_t handle_out) { @@ -572,7 +572,7 @@ dword_result_t XamUserCreateAchievementEnumerator(dword_t title_id, static uint32_t placeholder = 0; if (!placeholder) { - wchar_t* placeholder_val = L""; + const wchar_t* placeholder_val = L""; placeholder = kernel_memory()->SystemHeapAlloc( ((uint32_t)wcslen(placeholder_val) + 1) * 2);