Merge branch 'sdl_android' of github.com:pelya/commandergenius into android

This commit is contained in:
pelya
2012-10-01 19:00:39 +03:00
3 changed files with 25 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ ForceRelativeMouseMode=n
AppNeedsArrowKeys=n
AppNeedsTextInput=n
AppUsesJoystick=n
AppHandlesJoystickSensitivity=n
AppUsesAccelerometer=n
AppUsesMultitouch=n
NonBlockingSwapBuffers=n
RedefinedKeys="LCTRL T NO_REMAP NO_REMAP H"
@@ -34,14 +34,18 @@ StartupMenuButtonTimeout=3000
HiddenMenuOptions=''
FirstStartMenuOptions=''
MultiABI=n
AppVersionCode=286220
AppVersionName="2862.20"
AppVersionCode=288220
AppVersionName="2882.20"
ResetSdlConfigForThisVersion=n
DeleteFilesOnUpgrade="libsdl-DownloadFinished-5.flag libsdl-DownloadFinished-6.flag libsdl-DownloadFinished-7.flag libsdl-DownloadFinished-8.flag libsdl-DownloadFinished-9.flag libsdl-DownloadFinished-10.flag libsdl-DownloadFinished-11.flag libsdl-DownloadFinished-12.flag libsdl-DownloadFinished-13.flag libsdl-DownloadFinished-14.flag"
CompiledLibraries="sdl_net sdl_mixer sdl_image sdl_ttf png intl"
CustomBuildScript=n
AppCflags='-finline-functions -O2 -DWITH_ZLIB -DWITH_MIXER -DWITH_XML -DWITH_IMAGE -DWITH_TTF -DWITH_AI=simple -DWITH_DEBUG -DWITH_EDITOR'
AppCflags='-finline-functions -O2 -DWITH_ZLIB -DWITH_MIXER -DWITH_XML -DWITH_IMAGE -DWITH_TTF -DWITH_AI=simple -DWITH_DEBUG -DWITH_EDITOR -frtti'
AppLdflags=''
AppSubdirsBuild='fheroes2/src/engine fheroes2/src/xmlccwrap fheroes2/src/fheroes2/agg fheroes2/src/fheroes2/ai fheroes2/src/fheroes2/ai/simple fheroes2/src/fheroes2/army fheroes2/src/fheroes2/battle fheroes2/src/fheroes2/castle fheroes2/src/fheroes2/dialog fheroes2/src/fheroes2/editor fheroes2/src/fheroes2/game fheroes2/src/fheroes2/gui fheroes2/src/fheroes2/heroes fheroes2/src/fheroes2/image fheroes2/src/fheroes2/kingdom fheroes2/src/fheroes2/maps fheroes2/src/fheroes2/monster fheroes2/src/fheroes2/objects fheroes2/src/fheroes2/pocketpc fheroes2/src/fheroes2/resource fheroes2/src/fheroes2/spell fheroes2/src/fheroes2/system fheroes2/src/fheroes2/test'
AppCmdline='fheroes2'
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
MinimumScreenSize=s
AdmobPublisherId=n
AdmobTestDeviceId=
AdmobBannerSize=

View File

@@ -16,7 +16,7 @@ SdlVideoResizeKeepAspect=n
CompatibilityHacks=n
CompatibilityHacksStaticInit=n
CompatibilityHacksTextInputEmulatesHwKeyboard=n
AppUsesMouse=y
AppUsesMouse=n
AppNeedsTwoButtonMouse=n
ShowMouseCursor=n
ForceRelativeMouseMode=n

View File

@@ -1092,6 +1092,7 @@ void SDL_ANDROID_VideoContextRecreated()
{
// Allocate HW texture
Uint32 format = PixelFormatEnumColorkey; // 1-bit alpha for color key, every surface will have colorkey so it's easier for us
int flags = HwSurfaceList[i]->flags;
if( HwSurfaceList[i]->format->Amask )
format = PixelFormatEnumAlpha;
if( HwSurfaceList[i] == SDL_CurrentVideoSurface )
@@ -1104,7 +1105,21 @@ void SDL_ANDROID_VideoContextRecreated()
}
if( SDL_ANDROID_VideoLinearFilter )
SDL_SetTextureScaleMode((SDL_Texture *)HwSurfaceList[i]->hwdata, SDL_SCALEMODE_SLOW);
ANDROID_UnlockHWSurface(NULL, HwSurfaceList[i]); // Re-fill texture with graphics
if (flags & SDL_SRCALPHA)
{
int alpha = HwSurfaceList[i]->format->alpha;
ANDROID_SetHWAlpha(NULL, HwSurfaceList[i], alpha);
ANDROID_UnlockHWSurface(NULL, HwSurfaceList[i]); // Re-fill texture with graphics
}
else if (flags & SDL_SRCCOLORKEY)
{
int colorkey = HwSurfaceList[i]->format->colorkey;
ANDROID_SetHWColorKey(NULL, HwSurfaceList[i], colorkey);
}
else
{
ANDROID_UnlockHWSurface(NULL, HwSurfaceList[i]); // Re-fill texture with graphics
}
}
}
};