Skip to content

Commit

Permalink
Please work x2
Browse files Browse the repository at this point in the history
  • Loading branch information
Wirtos committed Dec 10, 2024
1 parent 6a53afb commit 998d6e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/src/main/cpp/tguydroid.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <assert.h>
#include <string.h>
#include <stddef.h>
#include <android/log.h>

typedef struct {
TrashGuyState *tg;
Expand All @@ -15,6 +16,7 @@ JNIEXPORT jlong JNICALL
Java_com_wirtos_tguydroid_TGuy_tguy_1jni_1ctor(JNIEnv *env, jobject thiz,
jbyteArray text, jint spacing) {
(void) thiz;
__android_log_print(ANDROID_LOG_INFO, "TGUYDROID", "ctor");
const size_t u8len = (*env)->GetArrayLength(env, text);
nat_ctx *ctx = NULL;
TrashGuyState *tg = NULL;
Expand Down Expand Up @@ -45,6 +47,7 @@ Java_com_wirtos_tguydroid_TGuy_tguy_1jni_1ctor(JNIEnv *env, jobject thiz,

JNIEXPORT void JNICALL
Java_com_wirtos_tguydroid_TGuy_tguy_1jni_1dtor(JNIEnv *env, jobject thiz, jlong tgobj) {
__android_log_print(ANDROID_LOG_INFO, "TGUYDROID", "dtor");
(void) env, (void) thiz;
nat_ctx *ctx = (nat_ctx *) tgobj;
if (ctx) {
Expand All @@ -58,6 +61,7 @@ JNIEXPORT void JNICALL
Java_com_wirtos_tguydroid_TGuy_tguy_1jni_1set_1frame(JNIEnv *env, jobject thiz, jlong tgobj,
jint frame) {
(void) env, (void) thiz;
__android_log_print(ANDROID_LOG_INFO, "TGUYDROID", "set_frame");
nat_ctx *ctx = (nat_ctx *) tgobj;
tguy_set_frame(ctx->tg, frame);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/wirtos/tguydroid/TGuy.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class TGuy {

TGuy(String str, int spacing) {
byte[] res;

Log.i("TGUYDROID", "TGuy()");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
res = str.getBytes(StandardCharsets.UTF_8);
} else {
Expand Down

0 comments on commit 998d6e9

Please sign in to comment.