Files
commandergenius/project/jni/application/dosbox/dosbox-0.74-androidSDL.diff
2013-11-28 20:23:19 +02:00

102 lines
4.2 KiB
Diff

diff -u -r ../dosbox-0.74/config.sub dosbox-0.74/config.sub
--- ../dosbox-0.74/config.sub 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/config.sub 2013-11-28 19:20:33.285066723 +0200
@@ -1298,7 +1298,7 @@
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -udi* | -eabi* | -android* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
diff -u -r ../dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_local.cpp
--- ../dosbox-0.74/src/dos/drive_local.cpp 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/src/dos/drive_local.cpp 2013-11-28 19:20:33.285066723 +0200
@@ -273,7 +273,7 @@
find_size=(Bit32u) stat_block.st_size;
struct tm *time;
- if((time=localtime(&stat_block.st_mtime))!=0){
+ if((time=localtime((const time_t *) &stat_block.st_mtime))!=0){
find_date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday);
find_time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec);
} else {
@@ -393,7 +393,7 @@
if(stat(newname,&temp_stat)!=0) return false;
/* Convert the stat to a FileStat */
struct tm *time;
- if((time=localtime(&temp_stat.st_mtime))!=0) {
+ if((time=localtime((const time_t *) &temp_stat.st_mtime))!=0) {
stat_block->time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec);
stat_block->date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday);
} else {
@@ -532,7 +532,7 @@
struct stat temp_stat;
fstat(fileno(fhandle),&temp_stat);
struct tm * ltime;
- if((ltime=localtime(&temp_stat.st_mtime))!=0) {
+ if((ltime=localtime((const time_t *) &temp_stat.st_mtime))!=0) {
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 -u -r ../dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp
--- ../dosbox-0.74/src/gui/sdlmain.cpp 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/src/gui/sdlmain.cpp 2013-11-28 19:23:09.782280538 +0200
@@ -32,6 +32,7 @@
#include <signal.h>
#include <process.h>
#endif
+#include <android/log.h>
#include "cross.h"
#include "SDL.h"
@@ -755,7 +756,7 @@
sdl.updating=false;
switch (sdl.desktop.type) {
case SCREEN_SURFACE:
- if (SDL_MUSTLOCK(sdl.surface)) {
+ if (SDL_MUSTLOCK(sdl.surface) || true) {
if (sdl.blit.surface) {
SDL_UnlockSurface(sdl.blit.surface);
int Blit = SDL_BlitSurface( sdl.blit.surface, 0, sdl.surface, &sdl.clip );
@@ -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);
}
@@ -1529,7 +1531,7 @@
if ( !sdl.inited && SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) < 0 ) textonly = true;
sdl.inited = true;
#endif
- printf(message);
+ printf("%s", message);
if(textonly) return;
if(!sdl.surface) sdl.surface = SDL_SetVideoMode(640,400,0,0);
if(!sdl.surface) return;
@@ -1743,8 +1745,7 @@
#if SDL_VERSION_ATLEAST(1, 2, 14)
putenv(const_cast<char*>("SDL_DISABLE_LOCK_KEYS=1"));
#endif
- if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_CDROM
- |SDL_INIT_NOPARACHUTE
+ 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;
diff -u ../dosbox-0.74/src/cpu/core_dyn_x86/risc_x86.h dosbox-0.74/src/cpu/core_dyn_x86/risc_x86.h
--- ../dosbox-0.74/src/cpu/core_dyn_x86/risc_x86.h 2010-05-10 20:43:54.000000000 +0300
+++ dosbox-0.74/src/cpu/core_dyn_x86/risc_x86.h 2013-11-28 19:54:35.678624476 +0200
@@ -112,7 +112,7 @@
pop ebx
mov [retval],eax
}
-#elif defined (MACOSX)
+#elif defined (MACOSX) || defined(__ANDROID__)
register Bit32u tempflags=reg_flags & FMASK_TEST;
__asm__ volatile (
"pushl %%ebx \n"