Compare commits
6 Commits
085f4eb6d9
...
ed484956fd
Author | SHA1 | Date |
---|---|---|
Margen67 | ed484956fd | |
Marco Rodolfi | 55bbb28a80 | |
The-Little-Wolf | 4d7b30e844 | |
Adrian | ae23222ba8 | |
Adrian | d99d053408 | |
Margen67 | d1be412836 |
|
@ -66,6 +66,7 @@ filter({"configurations:Release", "platforms:Windows"})
|
|||
buildoptions({
|
||||
"/Gw",
|
||||
"/Ob3",
|
||||
"/Qpar",
|
||||
})
|
||||
|
||||
filter("configurations:Debug")
|
||||
|
|
|
@ -402,6 +402,7 @@ class Timer : public WaitHandle {
|
|||
virtual bool Cancel() = 0;
|
||||
};
|
||||
|
||||
#if XE_PLATFORM_WINDOWS
|
||||
struct ThreadPriority {
|
||||
static const int32_t kLowest = -2;
|
||||
static const int32_t kBelowNormal = -1;
|
||||
|
@ -409,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) {
|
||||
|
|
|
@ -1372,6 +1372,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 {
|
||||
|
|
|
@ -48,8 +48,8 @@ void PluginLoader::LoadConfigs() {
|
|||
xe::filesystem::FilterByName(dir_files, std::regex("[A-Fa-f0-9]{8}"));
|
||||
|
||||
for (const auto& entry : dir_files) {
|
||||
const uint32_t title_id =
|
||||
std::stoi(entry.name.filename().string(), nullptr, 16);
|
||||
const uint32_t title_id = string_util::from_string<uint32_t>(
|
||||
entry.name.filename().string(), true);
|
||||
|
||||
LoadTitleConfig(title_id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue