分类:
2011-01-27 14:11:42
void android_main(struct android_app* state) {
// Make sure glue isn't stripped.
app_dummy();
// loop waiting for stuff to do.
while (1) {
// Read all pending events.
int ident;
int events;
struct android_poll_source* source;
// Read events and draw a frame of animation.
if ((ident = ALooper_pollAll(0, NULL, &events,
(void**)&source)) >= 0) {
// Process this event.
if (source != NULL) {
source->process(state, source);
}
}
// draw a frame of animation
bringTheAwesome();
}
}