mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 08:15:46 +00:00
android: Add initial frontend for LAN network rooms (#76)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/76 Co-authored-by: Briar <205427297+icy-briar@users.noreply.github.com> Co-committed-by: Briar <205427297+icy-briar@users.noreply.github.com>
This commit is contained in:
parent
d9eea0dc72
commit
54c3c4503a
44 changed files with 2105 additions and 19 deletions
|
@ -1,6 +1,9 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project / Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "android_common.h"
|
||||
|
||||
#include <string>
|
||||
|
@ -34,6 +37,15 @@ jstring ToJString(JNIEnv* env, std::string_view str) {
|
|||
static_cast<jint>(converted_string.size()));
|
||||
}
|
||||
|
||||
jobjectArray ToJStringArray(JNIEnv* env, const std::vector<std::string>& strs) {
|
||||
jobjectArray array =
|
||||
env->NewObjectArray(static_cast<jsize>(strs.size()), env->FindClass("java/lang/String"), env->NewStringUTF(""));
|
||||
for (std::size_t i = 0; i < strs.size(); ++i) {
|
||||
env->SetObjectArrayElement(array, static_cast<jsize>(i), ToJString(env, strs[i]));
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
jstring ToJString(JNIEnv* env, std::u16string_view str) {
|
||||
return ToJString(env, Common::UTF16ToUTF8(str));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue