Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
926d6c10
Unverified
Commit
926d6c10
authored
May 24, 2020
by
Rémi Verschelde
Committed by
GitHub
May 24, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39007 from nekomatata/android-object-id-long
Use long instead of int for object id in Android java wrapper
parents
57d21ebe
39f59786
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
GodotLib.java
.../android/java/lib/src/org/godotengine/godot/GodotLib.java
+2
-2
GodotPayment.java
...va/org/godotengine/godot/plugin/payment/GodotPayment.java
+3
-3
java_godot_lib_jni.cpp
platform/android/java_godot_lib_jni.cpp
+4
-4
java_godot_lib_jni.h
platform/android/java_godot_lib_jni.h
+2
-2
No files found.
platform/android/java/lib/src/org/godotengine/godot/GodotLib.java
View file @
926d6c10
...
@@ -189,7 +189,7 @@ public class GodotLib {
...
@@ -189,7 +189,7 @@ public class GodotLib {
* @param p_method Name of the method to invoke
* @param p_method Name of the method to invoke
* @param p_params Parameters to use for method invocation
* @param p_params Parameters to use for method invocation
*/
*/
public
static
native
void
callobject
(
int
p_id
,
String
p_method
,
Object
[]
p_params
);
public
static
native
void
callobject
(
long
p_id
,
String
p_method
,
Object
[]
p_params
);
/**
/**
* Invoke method |p_method| on the Godot object specified by |p_id| during idle time.
* Invoke method |p_method| on the Godot object specified by |p_id| during idle time.
...
@@ -197,7 +197,7 @@ public class GodotLib {
...
@@ -197,7 +197,7 @@ public class GodotLib {
* @param p_method Name of the method to invoke
* @param p_method Name of the method to invoke
* @param p_params Parameters to use for method invocation
* @param p_params Parameters to use for method invocation
*/
*/
public
static
native
void
calldeferred
(
int
p_id
,
String
p_method
,
Object
[]
p_params
);
public
static
native
void
calldeferred
(
long
p_id
,
String
p_method
,
Object
[]
p_params
);
/**
/**
* Forward the results from a permission request.
* Forward the results from a permission request.
...
...
platform/android/java/plugins/godotpayment/src/main/java/org/godotengine/godot/plugin/payment/GodotPayment.java
View file @
926d6c10
...
@@ -48,7 +48,7 @@ import org.json.JSONException;
...
@@ -48,7 +48,7 @@ import org.json.JSONException;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
public
class
GodotPayment
extends
GodotPlugin
{
public
class
GodotPayment
extends
GodotPlugin
{
private
Integer
purchaseCallbackId
=
0
;
private
Long
purchaseCallbackId
=
0L
;
private
String
accessToken
;
private
String
accessToken
;
private
String
purchaseValidationUrlPrefix
;
private
String
purchaseValidationUrlPrefix
;
private
String
transactionId
;
private
String
transactionId
;
...
@@ -129,11 +129,11 @@ public class GodotPayment extends GodotPlugin {
...
@@ -129,11 +129,11 @@ public class GodotPayment extends GodotPlugin {
GodotLib
.
calldeferred
(
purchaseCallbackId
,
"purchase_owned"
,
new
Object
[]
{
sku
});
GodotLib
.
calldeferred
(
purchaseCallbackId
,
"purchase_owned"
,
new
Object
[]
{
sku
});
}
}
public
int
getPurchaseCallbackId
()
{
public
long
getPurchaseCallbackId
()
{
return
purchaseCallbackId
;
return
purchaseCallbackId
;
}
}
public
void
setPurchaseCallbackId
(
int
purchaseCallbackId
)
{
public
void
setPurchaseCallbackId
(
long
purchaseCallbackId
)
{
this
.
purchaseCallbackId
=
purchaseCallbackId
;
this
.
purchaseCallbackId
=
purchaseCallbackId
;
}
}
...
...
platform/android/java_godot_lib_jni.cpp
View file @
926d6c10
...
@@ -375,8 +375,8 @@ JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *
...
@@ -375,8 +375,8 @@ JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *
return
env
->
NewStringUTF
(
ProjectSettings
::
get_singleton
()
->
get
(
js
).
operator
String
().
utf8
().
get_data
());
return
env
->
NewStringUTF
(
ProjectSettings
::
get_singleton
()
->
get
(
js
).
operator
String
().
utf8
().
get_data
());
}
}
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_callobject
(
JNIEnv
*
env
,
jclass
clazz
,
j
int
ID
,
jstring
method
,
jobjectArray
params
)
{
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_callobject
(
JNIEnv
*
env
,
jclass
clazz
,
j
long
ID
,
jstring
method
,
jobjectArray
params
)
{
Object
*
obj
=
ObjectDB
::
get_instance
(
ObjectID
(
(
uint64_t
)
ID
));
Object
*
obj
=
ObjectDB
::
get_instance
(
ObjectID
(
ID
));
ERR_FAIL_COND
(
!
obj
);
ERR_FAIL_COND
(
!
obj
);
int
res
=
env
->
PushLocalFrame
(
16
);
int
res
=
env
->
PushLocalFrame
(
16
);
...
@@ -405,8 +405,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *en
...
@@ -405,8 +405,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *en
env
->
PopLocalFrame
(
nullptr
);
env
->
PopLocalFrame
(
nullptr
);
}
}
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_calldeferred
(
JNIEnv
*
env
,
jclass
clazz
,
j
int
ID
,
jstring
method
,
jobjectArray
params
)
{
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_calldeferred
(
JNIEnv
*
env
,
jclass
clazz
,
j
long
ID
,
jstring
method
,
jobjectArray
params
)
{
Object
*
obj
=
ObjectDB
::
get_instance
(
ObjectID
(
(
uint64_t
)
ID
));
Object
*
obj
=
ObjectDB
::
get_instance
(
ObjectID
(
ID
));
ERR_FAIL_COND
(
!
obj
);
ERR_FAIL_COND
(
!
obj
);
int
res
=
env
->
PushLocalFrame
(
16
);
int
res
=
env
->
PushLocalFrame
(
16
);
...
...
platform/android/java_godot_lib_jni.h
View file @
926d6c10
...
@@ -61,8 +61,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gyroscope(JNIEnv *env
...
@@ -61,8 +61,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gyroscope(JNIEnv *env
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_focusin
(
JNIEnv
*
env
,
jclass
clazz
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_focusin
(
JNIEnv
*
env
,
jclass
clazz
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_focusout
(
JNIEnv
*
env
,
jclass
clazz
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_focusout
(
JNIEnv
*
env
,
jclass
clazz
);
JNIEXPORT
jstring
JNICALL
Java_org_godotengine_godot_GodotLib_getGlobal
(
JNIEnv
*
env
,
jclass
clazz
,
jstring
path
);
JNIEXPORT
jstring
JNICALL
Java_org_godotengine_godot_GodotLib_getGlobal
(
JNIEnv
*
env
,
jclass
clazz
,
jstring
path
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_callobject
(
JNIEnv
*
env
,
jclass
clazz
,
j
int
ID
,
jstring
method
,
jobjectArray
params
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_callobject
(
JNIEnv
*
env
,
jclass
clazz
,
j
long
ID
,
jstring
method
,
jobjectArray
params
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_calldeferred
(
JNIEnv
*
env
,
jclass
clazz
,
j
int
ID
,
jstring
method
,
jobjectArray
params
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_calldeferred
(
JNIEnv
*
env
,
jclass
clazz
,
j
long
ID
,
jstring
method
,
jobjectArray
params
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight
(
JNIEnv
*
env
,
jclass
clazz
,
jint
p_height
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_setVirtualKeyboardHeight
(
JNIEnv
*
env
,
jclass
clazz
,
jint
p_height
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_requestPermissionResult
(
JNIEnv
*
env
,
jclass
clazz
,
jstring
p_permission
,
jboolean
p_result
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_requestPermissionResult
(
JNIEnv
*
env
,
jclass
clazz
,
jstring
p_permission
,
jboolean
p_result
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_onRendererResumed
(
JNIEnv
*
env
,
jclass
clazz
);
JNIEXPORT
void
JNICALL
Java_org_godotengine_godot_GodotLib_onRendererResumed
(
JNIEnv
*
env
,
jclass
clazz
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment