Changeset 719


Ignore:
Timestamp:
Mar 3, 2011, 1:07:23 AM (10 years ago)
Author:
sam
Message:

android: JNI hooks for single touch input.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/androidapp.cpp

    r714 r719  
    7070}
    7171
     72extern "C" void
     73Java_org_zoy_LolEngine_LolGLSurfaceView_nativeDown(JNIEnv* env)
     74{
     75    Input::SetMouseButton(0);
     76}
     77
     78extern "C" void
     79Java_org_zoy_LolEngine_LolGLSurfaceView_nativeUp(JNIEnv* env)
     80{
     81    Input::UnsetMouseButton(0);
     82}
     83
     84extern "C" void
     85Java_org_zoy_LolEngine_LolGLSurfaceView_nativeMove(JNIEnv* env, jobject thiz,
     86                                                   jint x, jint y)
     87{
     88    vec2i pos(x * 640 / Video::GetWidth(),
     89              480 - 1 - y * 480 / Video::GetHeight());
     90    Input::SetMousePos(pos);
     91}
     92
    7293/* Call to render the next GL frame */
    7394extern "C" void
Note: See TracChangeset for help on using the changeset viewer.