Reapply "Merge remote-tracking branch 'upstream/canary_experimental' into canary_experimental"
This reverts commit fd3484f48753d2690d28a8cdd08f6b26f7c31336.
This commit is contained in:
parent
4d19245c4a
commit
5de1f23228
|
@ -410,6 +410,15 @@ struct ThreadPriority {
|
|||
static const int32_t kAboveNormal = 1;
|
||||
static const int32_t kHighest = 2;
|
||||
};
|
||||
#else
|
||||
struct ThreadPriority {
|
||||
static const int32_t kLowest = 1;
|
||||
static const int32_t kBelowNormal = 8;
|
||||
static const int32_t kNormal = 16;
|
||||
static const int32_t kAboveNormal = 24;
|
||||
static const int32_t kHighest = 32;
|
||||
};
|
||||
#endif
|
||||
|
||||
// Models a Win32-like thread object.
|
||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms682453(v=vs.85).aspx
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <ctime>
|
||||
#include <memory>
|
||||
|
||||
#include "logging.h"
|
||||
|
||||
#if XE_PLATFORM_ANDROID
|
||||
#include <dlfcn.h>
|
||||
|
||||
|
@ -660,8 +662,18 @@ class PosixCondition<Thread> : public PosixConditionBase {
|
|||
WaitStarted();
|
||||
sched_param param{};
|
||||
param.sched_priority = new_priority;
|
||||
if (pthread_setschedparam(thread_, SCHED_FIFO, ¶m) != 0)
|
||||
assert_always();
|
||||
int res = pthread_setschedparam(thread_, SCHED_FIFO, ¶m);
|
||||
if (res != 0) {
|
||||
switch (res) {
|
||||
case EPERM:
|
||||
XELOGW("Permission denied while setting priority");
|
||||
break;
|
||||
case EINVAL:
|
||||
assert_always();
|
||||
default:
|
||||
XELOGW("Unknown error while setting priority");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QueueUserCallback(std::function<void()> callback) {
|
||||
|
|
|
@ -1373,6 +1373,12 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
|
|||
return X_STATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (!module->is_executable()) {
|
||||
kernel_state_->UnloadUserModule(module, false);
|
||||
XELOGE("Failed to load user module {}", path);
|
||||
return X_STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
X_RESULT result = kernel_state_->ApplyTitleUpdate(module);
|
||||
if (XFAILED(result)) {
|
||||
XELOGE("Failed to apply title update! Cannot run module {}", path);
|
||||
|
|
|
@ -799,6 +799,18 @@ dword_result_t XamUserGetUserFlagsFromXUID_entry(qword_t xuid) {
|
|||
}
|
||||
DECLARE_XAM_EXPORT1(XamUserGetUserFlagsFromXUID, kUserProfiles, kImplemented);
|
||||
|
||||
dword_result_t XamUserGetOnlineLanguageFromXUID_entry(qword_t xuid) {
|
||||
/* Notes:
|
||||
- Calls XamUserGetUserFlagsFromXUID and returns (ulonglong)(cached_flag <<
|
||||
0x20) >> 0x39 & 0x1f;
|
||||
- XamUserGetMembershipTierFromXUID and XamUserGetOnlineCountryFromXUID also
|
||||
call it
|
||||
- Removed in metro
|
||||
*/
|
||||
return cvars::user_language;
|
||||
}
|
||||
DECLARE_XAM_EXPORT1(XamUserGetOnlineLanguageFromXUID, kUserProfiles, kStub);
|
||||
|
||||
constexpr uint8_t kStatsMaxAmount = 64;
|
||||
|
||||
struct X_STATS_DETAILS {
|
||||
|
|
Loading…
Reference in New Issue