fixup! Give frontend access to the hle service interfaces

This commit is contained in:
B3n30 2018-10-03 20:08:01 +02:00
parent d3694a930e
commit 544eb25c99
2 changed files with 3 additions and 2 deletions

View file

@ -10,6 +10,7 @@
#include "common/common_types.h"
#include "core/hle/kernel/object.h"
#include "core/hle/kernel/wait_object.h"
#include "core/hle/result.h"
namespace Kernel {

View file

@ -47,7 +47,7 @@ public:
ResultVal<Kernel::SharedPtr<Kernel::ClientSession>> ConnectToService(const std::string& name);
template <typename T>
std::shared_ptr<T> GetService(const std::string& service_name) {
std::shared_ptr<T> GetService(const std::string& service_name) const {
static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>,
"Not a base of ServiceFrameworkBase");
auto service = registered_services.find(service_name);
@ -59,7 +59,7 @@ public:
if (port == nullptr) {
return nullptr;
}
return std::dynamic_pointer_cast<T>(port->hle_handler);
return std::static_pointer_cast<T>(port->hle_handler);
}
private: