mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 21:05:06 +01:00
add GetAvailableLanguageCodeCount for both lists
This commit is contained in:
parent
51ce3f7c3c
commit
a409f30e91
@ -19,12 +19,22 @@ namespace skyline::service::settings {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result ISettingsServer::GetAvailableLanguageCodeCount(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
response.Push<i32>(constant::OldLanguageCodeListSize);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result ISettingsServer::GetAvailableLanguageCodes2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
request.outputBuf.at(0).copy_from(language::LanguageCodeList);
|
||||
response.Push<i32>(constant::NewLanguageCodeListSize);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result ISettingsServer::GetAvailableLanguageCodeCount2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
response.Push<i32>(constant::NewLanguageCodeListSize);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result ISettingsServer::GetRegionCode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
region::RegionCode regionCode{*state.settings->systemRegion};
|
||||
|
||||
|
@ -24,6 +24,11 @@ namespace skyline::service::settings {
|
||||
*/
|
||||
Result MakeLanguageCode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @brief Returns the number of available language codes that an application can use (pre 4.0.0)
|
||||
*/
|
||||
Result GetAvailableLanguageCodeCount(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @brief Returns the user-selected region's code
|
||||
*/
|
||||
@ -34,11 +39,18 @@ namespace skyline::service::settings {
|
||||
*/
|
||||
Result GetAvailableLanguageCodes2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @brief Returns the number of available language codes that an application can use (post 4.0.0)
|
||||
*/
|
||||
Result GetAvailableLanguageCodeCount2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x1, ISettingsServer, GetAvailableLanguageCodes),
|
||||
SFUNC(0x2, ISettingsServer, MakeLanguageCode),
|
||||
SFUNC(0x3, ISettingsServer, GetAvailableLanguageCodeCount),
|
||||
SFUNC(0x4, ISettingsServer, GetRegionCode),
|
||||
SFUNC(0x5, ISettingsServer, GetAvailableLanguageCodes2)
|
||||
SFUNC(0x5, ISettingsServer, GetAvailableLanguageCodes2),
|
||||
SFUNC(0x6, ISettingsServer, GetAvailableLanguageCodeCount2)
|
||||
)
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user