| OLD | NEW |
| (Empty) |
| 1 #include "jni/context.h" | |
| 2 #include "jni/dart_host.h" | |
| 3 #include "jni/eventloop.h" | |
| 4 #include "jni/graphics.h" | |
| 5 #include "jni/input_service.h" | |
| 6 #include "jni/vm_glue.h" | |
| 7 | |
| 8 SoundService* psound_service; | |
| 9 | |
| 10 void android_main(android_app* application) { | |
| 11 Timer timer; | |
| 12 Graphics graphics(application, &timer); | |
| 13 VMGlue vmGlue(&graphics); | |
| 14 InputService inputService(application, &vmGlue, | |
| 15 graphics.width(), graphics.height()); | |
| 16 SoundService sound_service(application); | |
| 17 psound_service = &sound_service; | |
| 18 Context context; | |
| 19 context = { &graphics, &inputService, psound_service, &timer, &vmGlue }; | |
| 20 EventLoop eventLoop(application); | |
| 21 DartHost host(&context); | |
| 22 eventLoop.Run(&host, &context); | |
| 23 } | |
| 24 | |
| 25 void PlayBackground(const char* path) { | |
| 26 psound_service->PlayBackground(path); | |
| 27 } | |
| 28 | |
| 29 void StopBackground() { | |
| 30 psound_service->StopBackground(); | |
| 31 } | |
| OLD | NEW |