mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-11 09:08:53 +00:00
GameActivity PATCH: Rename android_main _rust_glue_entry
The real `android_main` is going to be written in Rust and android-activity needs to handle its own initialization before calling the application's `android_main` and so the C/C++ code calls an intermediate `_rust_glue_entry` function.
This commit is contained in:
+1
-1
@@ -233,7 +233,7 @@ static void* android_app_entry(void* param) {
|
||||
pthread_cond_broadcast(&android_app->cond);
|
||||
pthread_mutex_unlock(&android_app->mutex);
|
||||
|
||||
android_main(android_app);
|
||||
_rust_glue_entry(android_app);
|
||||
|
||||
android_app_destroy(android_app);
|
||||
return NULL;
|
||||
|
||||
+3
-3
@@ -448,10 +448,10 @@ void android_app_clear_motion_events(struct android_input_buffer* inputBuffer);
|
||||
void android_app_clear_key_events(struct android_input_buffer* inputBuffer);
|
||||
|
||||
/**
|
||||
* This is the function that application code must implement, representing
|
||||
* the main entry to the app.
|
||||
* This is a springboard into the Rust glue layer that wraps calling the
|
||||
* main entry for the app itself.
|
||||
*/
|
||||
extern void android_main(struct android_app* app);
|
||||
extern void _rust_glue_entry(struct android_app* app);
|
||||
|
||||
/**
|
||||
* Set the filter to use when processing key events.
|
||||
|
||||
Reference in New Issue
Block a user