mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Implement graphics pipelines loading screen core logic
This commit is contained in:
@ -63,8 +63,11 @@ namespace skyline {
|
||||
waitForSubmitOrCancelId{environ->GetMethodID(instanceClass, "waitForSubmitOrCancel", "(Lemu/skyline/applet/swkbd/SoftwareKeyboardDialog;)[Ljava/lang/Object;")},
|
||||
closeKeyboardId{environ->GetMethodID(instanceClass, "closeKeyboard", "(Lemu/skyline/applet/swkbd/SoftwareKeyboardDialog;)V")},
|
||||
showValidationResultId{environ->GetMethodID(instanceClass, "showValidationResult", "(Lemu/skyline/applet/swkbd/SoftwareKeyboardDialog;ILjava/lang/String;)I")},
|
||||
getVersionCodeId{environ->GetMethodID(instanceClass, "getVersionCode", "()I")},
|
||||
getIntegerValueId{environ->GetMethodID(environ->FindClass("java/lang/Integer"), "intValue", "()I")},
|
||||
showPipelineLoadingScreenId{environ->GetMethodID(instanceClass, "showPipelineLoadingScreen", "(I)V")},
|
||||
updatePipelineLoadingProgressId{environ->GetMethodID(instanceClass, "updatePipelineLoadingProgress", "(I)V")},
|
||||
hidePipelineLoadingScreenId{environ->GetMethodID(instanceClass, "hidePipelineLoadingScreen", "()V")},
|
||||
getVersionCodeId{environ->GetMethodID(instanceClass, "getVersionCode", "()I")},
|
||||
getDhcpInfoId{environ->GetMethodID(instanceClass, "getDhcpInfo", "()Landroid/net/DhcpInfo;")} {
|
||||
env.Initialize(environ);
|
||||
}
|
||||
@ -155,14 +158,26 @@ namespace skyline {
|
||||
env->DeleteGlobalRef(dialog);
|
||||
}
|
||||
|
||||
i32 JvmManager::GetVersionCode() {
|
||||
return env->CallIntMethod(instance, getVersionCodeId);
|
||||
}
|
||||
|
||||
JvmManager::KeyboardCloseResult JvmManager::ShowValidationResult(jobject dialog, KeyboardTextCheckResult checkResult, std::u16string message) {
|
||||
auto str{env->NewString(reinterpret_cast<const jchar *>(message.data()), static_cast<int>(message.length()))};
|
||||
auto result{static_cast<KeyboardCloseResult>(env->CallIntMethod(instance, showValidationResultId, dialog, checkResult, str))};
|
||||
env->DeleteLocalRef(str);
|
||||
return result;
|
||||
}
|
||||
|
||||
void JvmManager::ShowPipelineLoadingScreen(u32 totalPipelineCount) {
|
||||
env->CallVoidMethod(instance, showPipelineLoadingScreenId, static_cast<jint>(totalPipelineCount));
|
||||
}
|
||||
|
||||
void JvmManager::UpdatePipelineLoadingProgress(u32 progress) {
|
||||
env->CallVoidMethod(instance, updatePipelineLoadingProgressId, static_cast<jint>(progress));
|
||||
}
|
||||
|
||||
void JvmManager::HidePipelineLoadingScreen() {
|
||||
env->CallVoidMethod(instance, hidePipelineLoadingScreenId);
|
||||
}
|
||||
|
||||
i32 JvmManager::GetVersionCode() {
|
||||
return env->CallIntMethod(instance, getVersionCodeId);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user