aboutsummaryrefslogtreecommitdiff
path: root/jni/main.c
blob: f309e642b27cdc5991571fb01fac496c69fceb36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <android_native_app_glue.h>
#include <android/log.h>

void android_main(struct android_app *state) {
	/* Declarations */
	struct android_poll_source *source;
	int events;

	/* Code starts here */
	app_dummy(); 

	/* do stuff here */
	
	while (1) {
		if (ALooper_pollAll(-1, NULL, &events, (void**)&source) >= 0) {
			if (source) {
				source->process(state, source);
			}
		}
		/* more stuff here */
	}
}