mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-22 14:59:15 +01:00
Stub GetLanguageCode
This commit is contained in:
parent
3e078d54b6
commit
41cf4bb12d
@ -8,6 +8,13 @@
|
||||
namespace skyline::service::settings {
|
||||
ISettingsServer::ISettingsServer(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||
|
||||
Result ISettingsServer::GetLanguageCode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
auto systemLanguage{language::GetApplicationLanguage(*state.settings->systemLanguage)};
|
||||
|
||||
response.Push(language::GetLanguageCode(language::GetSystemLanguage(systemLanguage)));
|
||||
return {};
|
||||
}
|
||||
|
||||
Result ISettingsServer::GetAvailableLanguageCodes(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
request.outputBuf.at(0).copy_from(span(language::LanguageCodeList).first(constant::OldLanguageCodeListSize));
|
||||
response.Push<i32>(constant::OldLanguageCodeListSize);
|
||||
|
@ -14,6 +14,12 @@ namespace skyline::service::settings {
|
||||
public:
|
||||
ISettingsServer(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
/**
|
||||
* @brief Gets the current system language
|
||||
* @url https://switchbrew.org/wiki/Settings_services#GetLanguageCode
|
||||
*/
|
||||
Result GetLanguageCode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @brief Reads the available language codes that an application can use (pre 4.0.0)
|
||||
*/
|
||||
@ -45,6 +51,7 @@ namespace skyline::service::settings {
|
||||
Result GetAvailableLanguageCodeCount2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x0, ISettingsServer, GetLanguageCode),
|
||||
SFUNC(0x1, ISettingsServer, GetAvailableLanguageCodes),
|
||||
SFUNC(0x2, ISettingsServer, MakeLanguageCode),
|
||||
SFUNC(0x3, ISettingsServer, GetAvailableLanguageCodeCount),
|
||||
|
Loading…
Reference in New Issue
Block a user