Fix to mouse input, tried to force libintl to load translations but failed

This commit is contained in:
pelya
2010-11-15 19:01:26 +02:00
parent 4558ec8e91
commit 0a9bbef6ab
3 changed files with 9 additions and 8 deletions

View File

@@ -651,8 +651,9 @@ class Settings
String lang = new String(Locale.getDefault().getLanguage());
if( Locale.getDefault().getCountry().length() > 0 )
lang = lang + "_" + Locale.getDefault().getCountry();
System.out.println( "libSDL: setting envvar LANG to '" + lang + "'");
System.out.println( "libSDL: setting envvar LANGUAGE to '" + lang + "'");
nativeSetEnv( "LANG", lang );
nativeSetEnv( "LANGUAGE", lang );
// TODO: get current user name and set envvar USER, the API is not availalbe on Android 1.6 so I don't bother with this
}

View File

@@ -13,10 +13,10 @@ LOCAL_CFLAGS := -Os -I$(LOCAL_PATH)/src -I$(LOCAL_PATH)/include -DBUILDING_LIBIN
-Dset_relocation_prefix=libintl_set_relocation_prefix \
-Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 \
-DNO_XMALLOC -DHAVE_CONFIG_H \
-DLOCALEDIR=\"/usr/local/share/locale\" \
-DLIBDIR=\"/usr/local/lib\" \
-DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" \
-DINSTALLDIR=\"/usr/local/lib\"
-DLOCALEDIR=\"\" \
-DLIBDIR=\"\" \
-DLOCALE_ALIAS_PATH=\"\" \
-DINSTALLDIR=\"\"
# -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" \
# -DINSTALLDIR=\"/usr/local/lib\"

View File

@@ -195,7 +195,7 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMouse) ( JNIEnv* env, jobject thiz, j
if( action == MOUSE_DOWN )
{
if( !leftClickUsesPressure && !leftClickUsesMultitouch )
SDL_SendMouseButton( NULL, (action == MOUSE_DOWN) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_LEFT );
SDL_SendMouseButton( NULL, SDL_PRESSED, SDL_BUTTON_LEFT );
else
action == MOUSE_MOVE;
UpdateScreenUnderFingerRect(x, y);
@@ -214,13 +214,13 @@ JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeMouse) ( JNIEnv* env, jobject thiz, j
UpdateScreenUnderFingerRect(x, y);
}
}
if( pointerId == 1 && rightClickMethod == RIGHT_CLICK_WITH_MULTITOUCH && (action == MOUSE_DOWN || action == MOUSE_UP) )
if( pointerId == 1 && (action == MOUSE_DOWN || action == MOUSE_UP) )
{
if( leftClickUsesMultitouch )
{
SDL_SendMouseButton( NULL, (action == MOUSE_DOWN) ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_LEFT );
}
else
else if( rightClickMethod == RIGHT_CLICK_WITH_MULTITOUCH )
{
if( SDL_GetMouseState( NULL, NULL ) & SDL_BUTTON(SDL_BUTTON_LEFT) )
SDL_SendMouseButton( NULL, SDL_RELEASED, SDL_BUTTON_LEFT );