Updated PrefClub

This commit is contained in:
pelya
2012-11-21 21:23:32 +02:00
parent 766fd3503c
commit b960c2cb50
9 changed files with 113 additions and 39 deletions

View File

@@ -1,34 +1,53 @@
# The application settings for Android libSDL port
AppSettingVersion=16
AppSettingVersion=17
LibSdlVersion=1.2
AppName="DosBox"
AppFullName=com.dosbox.sdl
ScreenOrientation=h
InhibitSuspend=y
AppDataDownloadUrl="Data size is 1 Mb|dosbox-data.zip"
VideoDepthBpp=16
NeedDepthBuffer=n
NeedStencilBuffer=n
NeedGles2=n
SwVideoMode=y
SdlVideoResize=y
SdlVideoResizeKeepAspect=n
NeedDepthBuffer=n
CompatibilityHacks=n
CompatibilityHacksStaticInit=n
CompatibilityHacksTextInputEmulatesHwKeyboard=n
CompatibilityHacksPreventAudioChopping=n
AppUsesMouse=y
AppNeedsTwoButtonMouse=y
AppNeedsArrowKeys=n
ShowMouseCursor=n
ForceRelativeMouseMode=n
AppNeedsArrowKeys=y
AppNeedsTextInput=y
AppUsesJoystick=n
AppHandlesJoystickSensitivity=n
AppUsesAccelerometer=n
AppUsesMultitouch=n
NonBlockingSwapBuffers=n
RedefinedKeys="SPACE RETURN PLUS MINUS F11 ESCAPE F5 F6 F7 F8"
AppTouchscreenKeyboardKeysAmount=4
RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP RETURN ESCAPE"
AppTouchscreenKeyboardKeysAmount=1
AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="F11 F12 F9 F10"
RedefinedKeysScreenKb="RETURN"
StartupMenuButtonTimeout=3000
HiddenMenuOptions='OptionalDownloadConfig'
FirstStartMenuOptions=''
MultiABI=n
AppVersionCode=07402
AppVersionName="0.74.02"
AppMinimumRAM=0
AppVersionCode=07403
AppVersionName="0.74.03"
ResetSdlConfigForThisVersion=y
DeleteFilesOnUpgrade="%"
CompiledLibraries="jpeg png sdl_mixer sdl_net sdl_sound"
CustomBuildScript=y
AppCflags=''
AppLdflags=''
AppSubdirsBuild=''
AppUseCrystaXToolchain=n
AppCmdline=''
AppCmdline='dosbox'
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
MinimumScreenSize=s
AdmobPublisherId=n
AdmobTestDeviceId=
AdmobBannerSize=

View File

@@ -8,12 +8,18 @@ ln -sf libsdl-1.2.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL.so
ln -sf libsdl_net.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL_net.so
ln -sf libsdl_sound.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL_sound.so
if [ \! -d dosbox-0.74 ] ; then
wget http://sourceforge.net/projects/dosbox/files/dosbox/0.74/dosbox-0.74.tar.gz && tar xvf dosbox-0.74.tar.gz && patch -p0 < dosbox-0.74-androidSDL.diff || exit 1
fi
if [ \! -f dosbox-0.74/configure ] ; then
sh -c "cd dosbox-0.74 && ./autogen.sh"
sh -c "cd dosbox-0.74 && ./autogen.sh" || exit 1
fi
if [ \! -f dosbox-0.74/Makefile ] ; then
../setEnvironment.sh sh -c "cd dosbox-0.74 && ./configure --build=x86_64-unknown-linux-gnu --host=arm-eabi"
env CFLAGS="-frtti -fexceptions" LDFLAGS="-frtti -fexceptions" \
../setEnvironment.sh sh -c "cd dosbox-0.74 && ./configure --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi" || exit 1
fi
../setEnvironment.sh sh -c "cd dosbox-0.74 && make -j1 VERBOSE=1 STRIP='' LIBS='-lsdl-1.2 -lpng -lgcc -lz -lc -lstdc++'" && cp -f dosbox-0.74/src/dosbox libapplication.so
../setEnvironment.sh sh -c "cd dosbox-0.74 && make -j4 VERBOSE=1 STRIP='' LIBS='-lsdl-1.2 -lpng -lgcc -lz -lc -lgnustl_static -lsupc++'" && cp -f dosbox-0.74/src/dosbox libapplication.so || exit 1
exit 0

View File

@@ -1,6 +1,6 @@
diff -ru orig/dosbox-0.74/config.sub dosbox-0.74/config.sub
--- orig/dosbox-0.74/config.sub 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/config.sub 2011-02-01 15:00:39.000000000 -0500
diff -u -r old/dosbox-0.74/config.sub dosbox-0.74/config.sub
--- old/dosbox-0.74/config.sub 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/config.sub 2012-11-21 20:07:56.792101410 +0200
@@ -1298,7 +1298,7 @@
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
@@ -10,10 +10,9 @@ diff -ru orig/dosbox-0.74/config.sub dosbox-0.74/config.sub
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
diff -ru orig/dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_local.cpp
--- orig/dosbox-0.74/src/dos/drive_local.cpp 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/src/dos/drive_local.cpp 2010-11-26 07:31:54.000000000 -0500
diff -u -r old/dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_local.cpp
--- old/dosbox-0.74/src/dos/drive_local.cpp 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/src/dos/drive_local.cpp 2012-11-21 20:07:56.792101410 +0200
@@ -273,7 +273,7 @@
find_size=(Bit32u) stat_block.st_size;
@@ -41,10 +40,26 @@ diff -ru orig/dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_loca
time=DOS_PackTime((Bit16u)ltime->tm_hour,(Bit16u)ltime->tm_min,(Bit16u)ltime->tm_sec);
date=DOS_PackDate((Bit16u)(ltime->tm_year+1900),(Bit16u)(ltime->tm_mon+1),(Bit16u)ltime->tm_mday);
} else {
diff -ru orig/dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp
--- orig/dosbox-0.74/src/gui/sdlmain.cpp 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/src/gui/sdlmain.cpp 2011-02-01 15:39:31.000000000 -0500
@@ -1743,8 +1743,7 @@
diff -u -r old/dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp
--- old/dosbox-0.74/src/gui/sdlmain.cpp 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/src/gui/sdlmain.cpp 2012-11-21 20:15:34.276097221 +0200
@@ -32,6 +32,7 @@
#include <signal.h>
#include <process.h>
#endif
+#include <android/log.h>
#include "cross.h"
#include "SDL.h"
@@ -1453,6 +1454,7 @@
strcat(buf,"\n");
va_end(msg);
if(!no_stdout) printf("%s",buf); //Else buf is parsed again.
+ __android_log_print(ANDROID_LOG_INFO, "DosBox", "%s", buf);
}
@@ -1743,8 +1745,7 @@
#if SDL_VERSION_ATLEAST(1, 2, 14)
putenv(const_cast<char*>("SDL_DISABLE_LOCK_KEYS=1"));
#endif
@@ -53,3 +68,4 @@ diff -ru orig/dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp
+ if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE
) < 0 ) E_Exit("Can't init SDL %s",SDL_GetError());
sdl.inited = true;

View File

@@ -40,13 +40,13 @@ AppVersionCode=07405
AppVersionName="0.74.05"
ResetSdlConfigForThisVersion=y
DeleteFilesOnUpgrade="prefclub"
CompiledLibraries="jpeg png sdl_mixer sdl_net sdl_sound"
CompiledLibraries="jpeg png sdl_net"
CustomBuildScript=y
AppCflags=''
AppLdflags=''
AppSubdirsBuild=''
AppCmdline=''
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
AppCmdline='dosbox -conf .dosbox/dosbox-0.74.conf'
ReadmeText='Touch upper-left corner to type your name or tip amount^ru:Нажмите левый верхний угол экрана, чтобы ввести своё имя или размер чаевых'
MinimumScreenSize=s
AdmobPublisherId=n
AdmobTestDeviceId=

View File

@@ -1,6 +1,6 @@
diff -ru orig/dosbox-0.74/config.sub dosbox-0.74/config.sub
--- orig/dosbox-0.74/config.sub 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/config.sub 2011-02-01 15:00:39.000000000 -0500
diff -u -r old/dosbox-0.74/config.sub dosbox-0.74/config.sub
--- old/dosbox-0.74/config.sub 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/config.sub 2012-11-21 20:07:56.792101410 +0200
@@ -1298,7 +1298,7 @@
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
@@ -10,10 +10,9 @@ diff -ru orig/dosbox-0.74/config.sub dosbox-0.74/config.sub
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
diff -ru orig/dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_local.cpp
--- orig/dosbox-0.74/src/dos/drive_local.cpp 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/src/dos/drive_local.cpp 2010-11-26 07:31:54.000000000 -0500
diff -u -r old/dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_local.cpp
--- old/dosbox-0.74/src/dos/drive_local.cpp 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/src/dos/drive_local.cpp 2012-11-21 20:07:56.792101410 +0200
@@ -273,7 +273,7 @@
find_size=(Bit32u) stat_block.st_size;
@@ -41,10 +40,26 @@ diff -ru orig/dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_loca
time=DOS_PackTime((Bit16u)ltime->tm_hour,(Bit16u)ltime->tm_min,(Bit16u)ltime->tm_sec);
date=DOS_PackDate((Bit16u)(ltime->tm_year+1900),(Bit16u)(ltime->tm_mon+1),(Bit16u)ltime->tm_mday);
} else {
diff -ru orig/dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp
--- orig/dosbox-0.74/src/gui/sdlmain.cpp 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/src/gui/sdlmain.cpp 2011-02-01 15:39:31.000000000 -0500
@@ -1743,8 +1743,7 @@
diff -u -r old/dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp
--- old/dosbox-0.74/src/gui/sdlmain.cpp 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/src/gui/sdlmain.cpp 2012-11-21 20:15:34.276097221 +0200
@@ -32,6 +32,7 @@
#include <signal.h>
#include <process.h>
#endif
+#include <android/log.h>
#include "cross.h"
#include "SDL.h"
@@ -1453,6 +1454,7 @@
strcat(buf,"\n");
va_end(msg);
if(!no_stdout) printf("%s",buf); //Else buf is parsed again.
+ __android_log_print(ANDROID_LOG_INFO, "DosBox", "%s", buf);
}
@@ -1743,8 +1745,7 @@
#if SDL_VERSION_ATLEAST(1, 2, 14)
putenv(const_cast<char*>("SDL_DISABLE_LOCK_KEYS=1"));
#endif
@@ -53,3 +68,4 @@ diff -ru orig/dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp
+ if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE
) < 0 ) E_Exit("Can't init SDL %s",SDL_GetError());
sdl.inited = true;

View File

@@ -30,6 +30,7 @@
#include "SDL_cursor_c.h"
#include "../events/SDL_sysevents.h"
#include "../events/SDL_events_c.h"
#include <android/log.h>
/* Available video drivers */
static VideoBootStrap *bootstrap[] = {
@@ -591,11 +592,13 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
int is_opengl;
SDL_GrabMode saved_grab;
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "calling SDL_SetVideoMode(%d, %d, %d, %d)", width, height, bpp, flags);
/* Start up the video driver, if necessary..
WARNING: This is the only function protected this way!
*/
if ( ! current_video ) {
if ( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) < 0 ) {
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "SDL_SetVideoMode(): SDL_Init() failed, returning NULL");
return(NULL);
}
}
@@ -619,6 +622,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
video_h = height;
video_bpp = bpp;
if ( ! SDL_GetVideoMode(&video_w, &video_h, &video_bpp, flags) ) {
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "SDL_SetVideoMode(): SDL_GetVideoMode() failed, returning NULL");
return(NULL);
}
@@ -687,6 +691,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
/* Sam - If we asked for OpenGL mode, and didn't get it, fail */
if ( is_opengl && !(mode->flags & SDL_OPENGL) ) {
mode = NULL;
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "SDL_SetVideoMode(): app requests OpenGL, we cannot provide that");
SDL_SetError("OpenGL not available");
}
}
@@ -706,6 +711,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
if ( (mode != NULL) && (!is_opengl) ) {
/* Sanity check */
if ( (mode->w < width) || (mode->h < height) ) {
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "SDL_SetVideoMode(): Video mode smaller than requested, returning NULL");
SDL_SetError("Video mode smaller than requested");
return(NULL);
}
@@ -736,6 +742,9 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
width, height, bpp,
mode->w, mode->h, mode->format->BitsPerPixel, mode->offset);
#endif
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "SDL_SetVideoMode(): Requested mode: %dx%dx%d, obtained mode %dx%dx%d",
width, height, bpp,
mode->w, mode->h, mode->format->BitsPerPixel);
mode->w = width;
mode->h = height;
SDL_SetClipRect(mode, NULL);
@@ -745,6 +754,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
/* If we failed setting a video mode, return NULL... (Uh Oh!) */
if ( mode == NULL ) {
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "SDL_SetVideoMode(): failed to set video mode, returning NULL");
return(NULL);
}
@@ -904,6 +914,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
SDL_CreateShadowSurface(bpp);
if ( SDL_ShadowSurface == NULL ) {
SDL_SetError("Couldn't create shadow surface");
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "SDL_SetVideoMode(): failed create shadow surface, returning NULL");
return(NULL);
}
SDL_PublicSurface = SDL_ShadowSurface;
@@ -915,6 +926,7 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
video->info.current_h = SDL_VideoSurface->h;
/* We're done! */
__android_log_print(ANDROID_LOG_VERBOSE, "libSDL", "SDL_SetVideoMode(): returning surface %p", SDL_PublicSurface);
return(SDL_PublicSurface);
}

View File

@@ -221,6 +221,10 @@ int ANDROID_VideoInit(_THIS, SDL_PixelFormat *vformat)
int i;
static SDL_PixelFormat alphaFormat;
int bpp;
static int alreadyInitialized = 0;
if(alreadyInitialized)
__android_log_print(ANDROID_LOG_WARN, "libSDL", "Application calls SDL_Init() multiple times, this is not supported yet!");
alreadyInitialized = 1;
/* Determine the screen depth (use default 16-bit depth) */
/* we change this during the SDL_SetVideoMode implementation... */
@@ -409,6 +413,7 @@ SDL_Surface *ANDROID_SetVideoMode(_THIS, SDL_Surface *current,
*/
void ANDROID_VideoQuit(_THIS)
{
__android_log_print(ANDROID_LOG_INFO, "libSDL", "Calling VideoQuit()");
if( !SDL_ANDROID_InsideVideoThread() )
{
__android_log_print(ANDROID_LOG_INFO, "libSDL", "Error: calling %s not from the main thread!", __PRETTY_FUNCTION__);