[All] Fixed multiple issues during build on Linux
- Added some fixes introduced by RodoMa92 in PR198 - Lack of AVX2 extension (should be done differently in the future) - Disable deprecated-volatile warning - Added missing override in posix EventInfo, ImGui notification class and XContent class - Removed not used XAudio2.h include in XMP - Fixed missing switch-case in XObject - Added fugly template in native_list.h - Fixed multiple smaller issues
This commit is contained in:
committed by
Radosław Gliński
parent
cdd3f161fa
commit
09be7e874a
@@ -707,7 +707,7 @@ dword_result_t XamContentLaunchImageInternal_entry(lpvoid_t content_data_ptr,
|
||||
|
||||
auto& loader_data = xam->loader_data();
|
||||
loader_data.host_path = xe::path_to_utf8(host_path);
|
||||
loader_data.launch_path = xex_path;
|
||||
loader_data.launch_path = xex_path.value();
|
||||
|
||||
xam->SaveLoaderData();
|
||||
|
||||
|
||||
@@ -459,20 +459,19 @@ DECLARE_XAM_EXPORT1(XamQueryLiveHiveW, kNone, kStub);
|
||||
// http://www.noxa.org/blog/2011/02/28/building-an-xbox-360-emulator-part-3-feasibilityos/
|
||||
// http://www.noxa.org/blog/2011/08/13/building-an-xbox-360-emulator-part-5-xex-files/
|
||||
dword_result_t RtlSleep_entry(dword_t dwMilliseconds, dword_t bAlertable) {
|
||||
LARGE_INTEGER delay{};
|
||||
uint64_t delay{};
|
||||
|
||||
// Convert the delay time to 100-nanosecond intervals
|
||||
delay.QuadPart = dwMilliseconds == -1
|
||||
? LLONG_MAX
|
||||
: static_cast<LONGLONG>(-10000) * dwMilliseconds;
|
||||
delay = dwMilliseconds == -1 ? LLONG_MAX
|
||||
: static_cast<int64_t>(-10000) * dwMilliseconds;
|
||||
|
||||
X_STATUS result = xboxkrnl::KeDelayExecutionThread(
|
||||
MODE::UserMode, bAlertable, (uint64_t*)&delay, nullptr);
|
||||
X_STATUS result = xboxkrnl::KeDelayExecutionThread(MODE::UserMode, bAlertable,
|
||||
&delay, nullptr);
|
||||
|
||||
// If the delay was interrupted by an APC, keep delaying the thread
|
||||
while (bAlertable && result == X_STATUS_ALERTED) {
|
||||
result = xboxkrnl::KeDelayExecutionThread(MODE::UserMode, bAlertable,
|
||||
(uint64_t*)&delay, nullptr);
|
||||
&delay, nullptr);
|
||||
}
|
||||
|
||||
return result == X_STATUS_SUCCESS ? X_STATUS_SUCCESS : X_STATUS_USER_APC;
|
||||
@@ -486,7 +485,7 @@ DECLARE_XAM_EXPORT1(SleepEx, kNone, kImplemented);
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-sleep
|
||||
void Sleep_entry(dword_t dwMilliseconds) {
|
||||
RtlSleep_entry(dwMilliseconds, FALSE);
|
||||
RtlSleep_entry(dwMilliseconds, false);
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(Sleep, kNone, kImplemented);
|
||||
|
||||
@@ -601,28 +600,29 @@ DECLARE_XAM_EXPORT1(GetCurrentThreadId, kNone, kImplemented);
|
||||
|
||||
qword_result_t XapiFormatTimeOut_entry(lpqword_t result,
|
||||
dword_t dwMilliseconds) {
|
||||
LARGE_INTEGER delay{};
|
||||
if (dwMilliseconds == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Convert the delay time to 100-nanosecond intervals
|
||||
delay.QuadPart =
|
||||
dwMilliseconds == -1 ? 0 : static_cast<LONGLONG>(-10000) * dwMilliseconds;
|
||||
|
||||
return (uint64_t)&delay;
|
||||
*result = static_cast<int64_t>(-10000) * dwMilliseconds;
|
||||
return result.host_address();
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XapiFormatTimeOut, kNone, kImplemented);
|
||||
|
||||
dword_result_t WaitForSingleObjectEx_entry(dword_t hHandle,
|
||||
dword_t dwMilliseconds,
|
||||
dword_t bAlertable) {
|
||||
uint64_t* timeout = nullptr;
|
||||
uint64_t timeout_ptr = XapiFormatTimeOut_entry(timeout, dwMilliseconds);
|
||||
// TODO(Gliniak): Figure it out to be less janky.
|
||||
uint64_t timeout;
|
||||
uint64_t* timeout_ptr = reinterpret_cast<uint64_t*>(
|
||||
static_cast<uint64_t>(XapiFormatTimeOut_entry(&timeout, dwMilliseconds)));
|
||||
|
||||
X_STATUS result = xe::kernel::xboxkrnl::NtWaitForSingleObjectEx(
|
||||
hHandle, 1, bAlertable, &timeout_ptr);
|
||||
X_STATUS result =
|
||||
xboxkrnl::NtWaitForSingleObjectEx(hHandle, 1, bAlertable, timeout_ptr);
|
||||
|
||||
while (bAlertable && result == X_STATUS_ALERTED) {
|
||||
result = xe::kernel::xboxkrnl::NtWaitForSingleObjectEx(
|
||||
hHandle, 1, bAlertable, &timeout_ptr);
|
||||
result =
|
||||
xboxkrnl::NtWaitForSingleObjectEx(hHandle, 1, bAlertable, timeout_ptr);
|
||||
}
|
||||
|
||||
RtlSetLastNTError_entry(result);
|
||||
|
||||
@@ -722,7 +722,7 @@ dword_result_t NetDll_getsockopt_entry(dword_t caller, dword_t socket_handle,
|
||||
return -1;
|
||||
}
|
||||
|
||||
int native_len = *optlen;
|
||||
uint32_t native_len = *optlen;
|
||||
X_STATUS status = socket->GetOption(level, optname, optval_ptr, &native_len);
|
||||
return XSUCCEEDED(status) ? 0 : -1;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ class ProfilePasscodeDialog : public XamDialog {
|
||||
if (ImGui::BeginPopupModal(title_.c_str(), nullptr,
|
||||
ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||
if (description_.size()) {
|
||||
ImGui::Text(description_.c_str());
|
||||
ImGui::Text("%s", description_.c_str());
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < passcode_length; i++) {
|
||||
@@ -642,14 +642,12 @@ class GameAchievementsDialog final : public XamDialog {
|
||||
|
||||
ImGui::PushFont(imgui_drawer()->GetTitleFont());
|
||||
const auto primary_line_height = ImGui::GetTextLineHeight();
|
||||
ImGui::TextUnformatted(
|
||||
fmt::format("{}", GetAchievementTitle(achievement_entry)).c_str());
|
||||
ImGui::Text("%s", GetAchievementTitle(achievement_entry).c_str());
|
||||
ImGui::PopFont();
|
||||
|
||||
ImGui::PushTextWrapPos(ImGui::GetMainViewport()->Size.x * 0.5f);
|
||||
ImGui::TextWrapped(
|
||||
fmt::format("{}", GetAchievementDescription(achievement_entry))
|
||||
.c_str());
|
||||
ImGui::TextWrapped("%s",
|
||||
GetAchievementDescription(achievement_entry).c_str());
|
||||
ImGui::PopTextWrapPos();
|
||||
|
||||
ImGui::SetCursorPosY(start_drawing_pos.y + default_image_icon_size.x -
|
||||
@@ -872,7 +870,7 @@ class GamesInfoDialog final : public ui::ImGuiDialog {
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + textOffsetX);
|
||||
}
|
||||
|
||||
ImGui::Text(no_entries_message.c_str());
|
||||
ImGui::Text("%s", no_entries_message.c_str());
|
||||
ImGui::PopFont();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user