Changeset 1964 for trunk/src/platform
- Timestamp:
- Oct 2, 2012, 10:35:20 AM (10 years ago)
- Location:
- trunk/src/platform/android
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/platform/android/androidapp.cpp
r1949 r1964 35 35 Queue<int> g_main_queue; 36 36 Thread *g_main_thread; 37 float g_fps; 37 38 38 39 AndroidApp::AndroidApp(char const *title, ivec2 res, float fps) 39 : data(0)40 : m_data(0) 40 41 { 42 g_fps = fps; 41 43 } 42 44 … … 51 53 void AndroidApp::Run() 52 54 { 55 g_main_queue.Push(1); 53 56 g_main_queue.Push(1); 54 57 … … 101 104 Java_org_zoy_LolEngine_LolRenderer_nativeInit(JNIEnv* env) 102 105 { 103 Log::Info("Java layer initialising renderer"); 104 Ticker::Setup(30.0f); 106 /* Initialise app thread and wait for it to be ready, ie. set 107 * the FPS value at least. */ 108 g_main_thread = new Thread(lol::AndroidApp::MainRun, NULL);; 109 g_main_queue.Pop(); 110 111 /* Launch our ticker */ 112 Log::Info("Java layer initialising renderer at %g fps", g_fps); 113 Ticker::Setup(g_fps); 105 114 Video::Setup(ivec2(320, 200)); 106 115 107 g_main_thread = new Thread(lol::AndroidApp::MainRun, NULL);;116 /* Wake up app thread */ 108 117 g_main_queue.Pop(); 109 118 } … … 146 155 jint x, jint y) 147 156 { 148 ivec2 pos = ivec2(0, 479) + ivec2(x * 640, -y * 480) / Video::GetSize(); 149 Input::SetMousePos(pos); 157 Input::SetMousePos(ivec2(x, y)); 150 158 } 151 159 -
trunk/src/platform/android/androidapp.h
r1684 r1964 36 36 37 37 private: 38 AndroidAppData * data;38 AndroidAppData *m_data; 39 39 }; 40 40
Note: See TracChangeset
for help on using the changeset viewer.