Skip to content

Commit

Permalink
Fix android build, apply clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamer64ytb committed Jul 29, 2024
1 parent 1944d83 commit 4e10afc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2024 Mandarine Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

package io.github.mandarine3ds.mandarine.utils

import android.app.Activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@

std::string GetJString(JNIEnv* env, jstring jstr);
jstring ToJString(JNIEnv* env, std::string_view str);
jobjectArray ToJStringArray(JNIEnv* env, const std::vector<std::string>& strs);
2 changes: 1 addition & 1 deletion src/android/app/src/main/jni/multiplayer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Citra Enhanced Project
// Copyright 2024 Mandarine Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

Expand Down
2 changes: 1 addition & 1 deletion src/android/app/src/main/jni/multiplayer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Citra Enhanced Project
// Copyright 2024 Mandarine Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

Expand Down
15 changes: 10 additions & 5 deletions src/android/app/src/main/jni/native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -679,22 +679,26 @@ JNIEXPORT jint JNICALL Java_io_github_mandarine3ds_mandarine_utils_NetPlayManage
NetPlayJoinRoom(GetJString(env, ipaddress), port, GetJString(env, username)));
}

JNIEXPORT jobjectArray JNICALL Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlayRoomInfo(
JNIEXPORT jobjectArray JNICALL
Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlayRoomInfo(
JNIEnv* env, [[maybe_unused]] jobject obj) {
return ToJStringArray(env, NetPlayRoomInfo());
}

JNIEXPORT jboolean JNICALL Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlayIsJoined(
JNIEXPORT jboolean JNICALL
Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlayIsJoined(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj) {
return NetPlayIsJoined();
}

JNIEXPORT jboolean JNICALL Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlayIsHostedRoom(
JNIEXPORT jboolean JNICALL
Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlayIsHostedRoom(
[[maybe_unused]] JNIEnv* env, [[maybe_unused]] jobject obj) {
return NetPlayIsHostedRoom();
}

JNIEXPORT void JNICALL Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlaySendMessage(
JNIEXPORT void JNICALL
Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlaySendMessage(
JNIEnv* env, [[maybe_unused]] jobject obj, jstring msg) {
NetPlaySendMessage(GetJString(env, msg));
}
Expand All @@ -709,7 +713,8 @@ JNIEXPORT void JNICALL Java_io_github_mandarine3ds_mandarine_utils_NetPlayManage
NetPlayLeaveRoom();
}

JNIEXPORT jstring JNICALL Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlayGetConsoleId(
JNIEXPORT jstring JNICALL
Java_io_github_mandarine3ds_mandarine_utils_NetPlayManager_netPlayGetConsoleId(
JNIEnv* env, [[maybe_unused]] jobject obj) {
return ToJString(env, NetPlayGetConsoleId());
}
Expand Down

0 comments on commit 4e10afc

Please sign in to comment.