mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-19 17:07:55 -05:00
- extracted srv: calls from service.cpp and put in its own module
- added function tables for service calls - lots of refactoring
This commit is contained in:
@ -37,14 +37,6 @@ public:
|
||||
return (NativeUID)m_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string name used by CTROS for a service
|
||||
* @return String name of service
|
||||
*/
|
||||
virtual std::string GetName() const {
|
||||
return "[UNKNOWN SERVICE NAME]";
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string name used by CTROS for a service
|
||||
* @return Port name of service
|
||||
@ -59,8 +51,19 @@ public:
|
||||
*/
|
||||
virtual Syscall::Result Sync() = 0;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Registers the functions in the service
|
||||
*/
|
||||
void Register(const HLE::FunctionDef* functions, int len) {
|
||||
for (int i = 0; i < len; i++) {
|
||||
m_functions[functions[i].id] = functions[i];
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
u32 m_uid;
|
||||
std::map<u32, HLE::FunctionDef> m_functions;
|
||||
};
|
||||
|
||||
/// Simple class to manage accessing services from ports and UID handles
|
||||
|
Reference in New Issue
Block a user