diff --git a/project/jni/SettingsTemplate.mk b/project/jni/SettingsTemplate.mk index 2bdc5718e..dccb30c70 100644 --- a/project/jni/SettingsTemplate.mk +++ b/project/jni/SettingsTemplate.mk @@ -1,5 +1,5 @@ -# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip +# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 APP_MODULES := application sdl-1.2 sdl_main stlport jpeg png ogg flac vorbis freetype tremor ogg # To filter out static libs from all libs in makefile diff --git a/project/jni/application/scummvm/AndroidBuild.sh b/project/jni/application/scummvm/AndroidBuild.sh index 1d635f432..e3cb16bb2 100755 --- a/project/jni/application/scummvm/AndroidBuild.sh +++ b/project/jni/application/scummvm/AndroidBuild.sh @@ -21,6 +21,6 @@ ln -sf libtremor.a $LOCAL_PATH/../../../obj/local/armeabi/libvorbisidec.a ln -sf libflac.a $LOCAL_PATH/../../../obj/local/armeabi/libFLAC.a if [ \! -f scummvm/config.mk ] ; then - ../setEnvironment.sh sh -c "cd scummvm && env LIBS='-lflac -ltremor -logg -lmad -lz -lgcc -lfluidsynth' ./configure --host=androidsdl --enable-zlib --enable-tremor --enable-mad --enable-flac --enable-vkeybd --enable-verbose-build --disable-hq-scalers --disable-readline --disable-nasm --disable-mt32emu --datadir=. --with-fluidsynth-prefix=$LOCAL_PATH/../../fluidsynth" + ../setEnvironment.sh sh -c "cd scummvm && env LIBS='-lflac -ltremor -logg -lmad -lz -lgcc -lfluidsynth -lstdc++' ./configure --host=androidsdl --enable-zlib --enable-tremor --enable-mad --enable-flac --enable-vkeybd --enable-verbose-build --disable-hq-scalers --disable-readline --disable-nasm --disable-mt32emu --datadir=. --with-fluidsynth-prefix=$LOCAL_PATH/../../fluidsynth" fi ../setEnvironment.sh make -C scummvm -j2 && cp -f scummvm/scummvm libapplication.so diff --git a/project/jni/application/scummvm/scummvm-1.2.0.diff b/project/jni/application/scummvm/scummvm-1.2.0.diff index 5bf2a67a4..9e08824e4 100644 --- a/project/jni/application/scummvm/scummvm-1.2.0.diff +++ b/project/jni/application/scummvm/scummvm-1.2.0.diff @@ -9,7 +9,7 @@ Index: configure +androidsdl) + _host_os=androidsdl + _host_cpu=arm -+ _host_alias=arm-linux-androideabi ++ _host_alias=arm-eabi + ;; arm-riscos) _host_os=riscos diff --git a/project/jni/application/src b/project/jni/application/src index 4de17cd97..104f796a6 120000 --- a/project/jni/application/src +++ b/project/jni/application/src @@ -1 +1 @@ -alienblaster \ No newline at end of file +ballfield \ No newline at end of file diff --git a/project/jni/sdl-1.3/src/video/android/SDL_androidinput.c b/project/jni/sdl-1.3/src/video/android/SDL_androidinput.c index c42018539..b3d9ba413 100644 --- a/project/jni/sdl-1.3/src/video/android/SDL_androidinput.c +++ b/project/jni/sdl-1.3/src/video/android/SDL_androidinput.c @@ -115,6 +115,7 @@ int relativeMovementY = 0; unsigned int relativeMovementTime = 0; int oldMouseX = 0; int oldMouseY = 0; +int oldMouseButtons = 0; static inline int InsideRect(const SDL_Rect * r, int x, int y) { @@ -510,10 +511,9 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMouse) ( JNIEnv* env, jobject thiz, j { int button = (leftClickMethod == LEFT_CLICK_WITH_PRESSURE) ? SDL_BUTTON_LEFT : SDL_BUTTON_RIGHT; int buttonState = ( force > maxForce || radius > maxRadius ); - if( button == SDL_BUTTON_RIGHT && (SDL_GetMouseState( NULL, NULL ) & SDL_BUTTON(SDL_BUTTON_LEFT)) ) + if( button == SDL_BUTTON_RIGHT ) SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_LEFT ); - if( ( (SDL_GetMouseState( NULL, NULL ) & SDL_BUTTON(button)) != 0 ) != buttonState ) - SDL_ANDROID_MainThreadPushMouseButton( buttonState ? SDL_PRESSED : SDL_RELEASED, button ); + SDL_ANDROID_MainThreadPushMouseButton( buttonState ? SDL_PRESSED : SDL_RELEASED, button ); } if( mouseInitialX >= 0 && mouseInitialY >= 0 && ( leftClickMethod == LEFT_CLICK_WITH_TIMEOUT || leftClickMethod == LEFT_CLICK_WITH_TAP || @@ -559,8 +559,7 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMouse) ( JNIEnv* env, jobject thiz, j } else if( rightClickMethod == RIGHT_CLICK_WITH_MULTITOUCH ) { - if( SDL_GetMouseState( NULL, NULL ) & SDL_BUTTON(SDL_BUTTON_LEFT) ) - SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_LEFT ); + SDL_ANDROID_MainThreadPushMouseButton( SDL_RELEASED, SDL_BUTTON_LEFT ); SDL_ANDROID_MainThreadPushMouseButton( (action == MOUSE_DOWN) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_RIGHT ); } } @@ -1155,7 +1154,11 @@ extern void SDL_ANDROID_PumpEvents() SDL_SendMouseMotion(NULL, 0, ev->motion.x, ev->motion.y); break; case SDL_MOUSEBUTTONDOWN: - SDL_SendMouseButton( NULL, ev->button.state, ev->button.button ); + if( ((oldMouseButtons & SDL_BUTTON(ev->button.button)) != 0) != ev->button.state ) + { + oldMouseButtons = (oldMouseButtons & ~SDL_BUTTON(ev->button.button)) | (ev->button.state ? SDL_BUTTON(ev->button.button) : 0); + SDL_SendMouseButton( NULL, ev->button.state, ev->button.button ); + } break; case SDL_KEYDOWN: //__android_log_print(ANDROID_LOG_INFO, "libSDL", "SDL_KEYDOWN: %i %i", ev->key.keysym.sym, ev->key.state);