Updated Ballfield test app

This commit is contained in:
pelya
2011-11-23 17:20:55 +02:00
parent 88dac36db5
commit 61dfc11a20
4 changed files with 9 additions and 23 deletions

View File

@@ -7,7 +7,7 @@ Known bugs
- Calling SDL_Init()/SDL_Quit() several times will make SDL 1.2 crash.
- SDL_FillRect() does not work in SDL 1.2 HW mode.
- SDL_FillRect() does not work with SDL 1.2 in HW mode (and probably with SDL 1.3 too).
- 32-bpp color mode does not work with SW video surface, 24-bpp and 32-bpp mode does not work with SDL_HWSURFACE.

View File

@@ -15,14 +15,15 @@ SdlVideoResize=y
SdlVideoResizeKeepAspect=n
CompatibilityHacks=n
AppUsesMouse=y
AppNeedsTwoButtonMouse=n
AppNeedsTwoButtonMouse=y
ShowMouseCursor=n
ForceRelativeMouseMode=n
AppNeedsArrowKeys=y
AppNeedsArrowKeys=n
AppNeedsTextInput=y
AppUsesJoystick=n
AppHandlesJoystickSensitivity=n
AppUsesMultitouch=n
NonBlockingSwapBuffers=y
NonBlockingSwapBuffers=n
RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE ESCAPE"
AppTouchscreenKeyboardKeysAmount=0
AppTouchscreenKeyboardKeysAmountAutoFire=0
@@ -33,6 +34,7 @@ FirstStartMenuOptions=''
MultiABI=n
AppVersionCode=101
AppVersionName="1.01"
ResetSdlConfigForThisVersion=n
CompiledLibraries="sdl_mixer sdl_image"
CustomBuildScript=n
AppCflags='-O2 -finline-functions'

View File

@@ -399,7 +399,7 @@ int main(int argc, char* argv[])
SDL_Surface *back, *logo, *font;
SDL_Event event;
int bpp = 16,
flags = SDL_DOUBLEBUF | SDL_HWSURFACE,
flags = 0,
alpha = 1;
int x_offs = 0, y_offs = 0;
long tick,
@@ -417,23 +417,6 @@ int main(int argc, char* argv[])
atexit(SDL_Quit);
for(i = 1; i < argc; ++i)
{
if(strncmp(argv[i], "-na", 3) == 0)
alpha = 0;
else if(strncmp(argv[i], "-nd", 3) == 0)
flags &= ~SDL_DOUBLEBUF;
else if(strncmp(argv[i], "-h", 2) == 0)
{
flags |= SDL_HWSURFACE;
flags &= ~SDL_SWSURFACE;
}
else if(strncmp(argv[i], "-f", 2) == 0)
flags |= SDL_FULLSCREEN;
else
bpp = atoi(&argv[i][1]);
}
screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, bpp, flags);
if(!screen)
{
@@ -582,6 +565,7 @@ int main(int argc, char* argv[])
r.x -= r.w/2;
r.y -= r.h/2;
SDL_FillRect(screen, &r, color);
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Mouse %d:%d buttons %d", mx, my, b);
SDL_Flip(SDL_GetVideoSurface());
SDL_Event evt;

View File

@@ -1 +1 @@
fheroes2
ballfield