Changeset 2618 for trunk/src/platform
- Timestamp:
- Mar 29, 2013, 7:03:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/platform/android/androidapp.cpp
r2584 r2618 91 91 92 92 android_app* m_native_app; 93 94 /* The resolution that was asked (not the one we got) */ 95 /* FIXME: we need proper unproject or at least screen space events!! */ 96 ivec2 m_wanted_resolution; 93 97 94 98 SavedState m_state; … … 201 205 { 202 206 case AINPUT_EVENT_TYPE_MOTION: 203 Input::SetMousePos(ivec2(AMotionEvent_getX(event, 0), 204 AMotionEvent_getY(event, 0))); 207 /* FIXME: we flip the Y axis here, but is it the right place? */ 208 ivec2 pos(AMotionEvent_getX(event, 0), 209 AMotionEvent_getY(event, 0)); 210 pos = pos * m_wanted_resolution / Video::GetSize(); 211 pos.y = m_wanted_resolution.y - 1 - pos.y; 212 Input::SetMousePos(pos); 205 213 switch (AKeyEvent_getAction(event) & AMOTION_EVENT_ACTION_MASK) 206 214 { … … 285 293 : m_data(g_data) 286 294 { 287 ;295 m_data->m_wanted_resolution = res; 288 296 } 289 297
Note: See TracChangeset
for help on using the changeset viewer.