mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-11-25 12:38:25 -05:00
early-access version 2229
This commit is contained in:
parent
f5993d8d87
commit
7d7d23592d
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2228.
|
This is the source code for early-access 2229.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -13,7 +13,12 @@ namespace Service::PM {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr ResultCode ERROR_PROCESS_NOT_FOUND{ErrorModule::PM, 1};
|
constexpr ResultCode ResultProcessNotFound{ErrorModule::PM, 1};
|
||||||
|
[[maybe_unused]] constexpr ResultCode ResultAlreadyStarted{ErrorModule::PM, 2};
|
||||||
|
[[maybe_unused]] constexpr ResultCode ResultNotTerminated{ErrorModule::PM, 3};
|
||||||
|
[[maybe_unused]] constexpr ResultCode ResultDebugHookInUse{ErrorModule::PM, 4};
|
||||||
|
[[maybe_unused]] constexpr ResultCode ResultApplicationRunning{ErrorModule::PM, 5};
|
||||||
|
[[maybe_unused]] constexpr ResultCode ResultInvalidSize{ErrorModule::PM, 6};
|
||||||
|
|
||||||
constexpr u64 NO_PROCESS_FOUND_PID{0};
|
constexpr u64 NO_PROCESS_FOUND_PID{0};
|
||||||
|
|
||||||
@ -95,18 +100,18 @@ public:
|
|||||||
private:
|
private:
|
||||||
void GetProcessId(Kernel::HLERequestContext& ctx) {
|
void GetProcessId(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto title_id = rp.PopRaw<u64>();
|
const auto program_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
LOG_DEBUG(Service_PM, "called, title_id={:016X}", title_id);
|
LOG_DEBUG(Service_PM, "called, program_id={:016X}", program_id);
|
||||||
|
|
||||||
const auto process =
|
const auto process =
|
||||||
SearchProcessList(kernel.GetProcessList(), [title_id](const auto& proc) {
|
SearchProcessList(kernel.GetProcessList(), [program_id](const auto& proc) {
|
||||||
return proc->GetProgramID() == title_id;
|
return proc->GetProgramID() == program_id;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!process.has_value()) {
|
if (!process.has_value()) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ERROR_PROCESS_NOT_FOUND);
|
rb.Push(ResultProcessNotFound);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,13 +133,16 @@ public:
|
|||||||
explicit Info(Core::System& system_, const std::vector<Kernel::KProcess*>& process_list_)
|
explicit Info(Core::System& system_, const std::vector<Kernel::KProcess*>& process_list_)
|
||||||
: ServiceFramework{system_, "pm:info"}, process_list{process_list_} {
|
: ServiceFramework{system_, "pm:info"}, process_list{process_list_} {
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &Info::GetTitleId, "GetTitleId"},
|
{0, &Info::GetProgramId, "GetProgramId"},
|
||||||
|
{65000, &Info::AtmosphereGetProcessId, "AtmosphereGetProcessId"},
|
||||||
|
{65001, nullptr, "AtmosphereHasLaunchedProgram"},
|
||||||
|
{65002, nullptr, "AtmosphereGetProcessInfo"},
|
||||||
};
|
};
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetTitleId(Kernel::HLERequestContext& ctx) {
|
void GetProgramId(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto process_id = rp.PopRaw<u64>();
|
const auto process_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
@ -146,7 +154,7 @@ private:
|
|||||||
|
|
||||||
if (!process.has_value()) {
|
if (!process.has_value()) {
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(ERROR_PROCESS_NOT_FOUND);
|
rb.Push(ResultProcessNotFound);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,6 +163,27 @@ private:
|
|||||||
rb.Push((*process)->GetProgramID());
|
rb.Push((*process)->GetProgramID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AtmosphereGetProcessId(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto program_id = rp.PopRaw<u64>();
|
||||||
|
|
||||||
|
LOG_DEBUG(Service_PM, "called, program_id={:016X}", program_id);
|
||||||
|
|
||||||
|
const auto process = SearchProcessList(process_list, [program_id](const auto& proc) {
|
||||||
|
return proc->GetProgramID() == program_id;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!process.has_value()) {
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
|
rb.Push(ResultProcessNotFound);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.Push((*process)->GetProcessID());
|
||||||
|
}
|
||||||
|
|
||||||
const std::vector<Kernel::KProcess*>& process_list;
|
const std::vector<Kernel::KProcess*>& process_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1158,7 +1158,6 @@ void DeduceBlitImages(ImageInfo& dst_info, ImageInfo& src_info, const ImageBase*
|
|||||||
src_info.size = src->info.size;
|
src_info.size = src->info.size;
|
||||||
}
|
}
|
||||||
if (dst) {
|
if (dst) {
|
||||||
is_resolve = dst->info.num_samples > 1;
|
|
||||||
dst_info.num_samples = dst->info.num_samples;
|
dst_info.num_samples = dst->info.num_samples;
|
||||||
dst_info.size = dst->info.size;
|
dst_info.size = dst->info.size;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user