SDL port for Android SDK/NDK 1.6

Quickly share your Android Code Snippets here...

Re: SDL port for Android SDK/NDK 1.6

Postby shishanjiu » Thu Sep 20, 2012 12:16 pm

SwVideoMode=y is set. SDL 1.2 is used.
In fact, I compare my AndroidAppSettings.cfg with ballfield's, no substantive differences. This is my AndroidAppSettings.cfg :

# The application settings for Android libSDL port
AppSettingVersion=17
LibSdlVersion=1.2
AppName="Ebook1"
AppFullName=com.ethersoft.ebook1
ScreenOrientation=h
InhibitSuspend=n
AppDataDownloadUrl="Book data is 50 Mb|misc.zip"
VideoDepthBpp=16
NeedDepthBuffer=n
NeedStencilBuffer=n
NeedGles2=n
SwVideoMode=y
SdlVideoResize=y
SdlVideoResizeKeepAspect=n
CompatibilityHacks=n
CompatibilityHacksStaticInit=n
CompatibilityHacksTextInputEmulatesHwKeyboard=n
AppUsesMouse=y
AppNeedsTwoButtonMouse=n
ShowMouseCursor=n
ForceRelativeMouseMode=n
AppNeedsArrowKeys=n
AppNeedsTextInput=n
AppUsesJoystick=n
AppUsesAccelerometer=n
AppUsesMultitouch=n
NonBlockingSwapBuffers=n
RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE ESCAPE"
AppTouchscreenKeyboardKeysAmount=0
AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="1 2 3 4 5 6 1 2 3 4"
StartupMenuButtonTimeout=0
HiddenMenuOptions='OptionalDownloadConfig AdditionalInputConfig KeyboardConfigMainMenu MouseConfigMainMenu ArrowKeysConfig AccelerometerConfig AudioConfig RemapHwKeysConfig ScreenGesturesConfig VideoSettingsConfig OkButton'
FirstStartMenuOptions='new Settings.DownloadConfig()'
MultiABI=n
AppVersionCode=230
AppVersionName="2.3.0"
ResetSdlConfigForThisVersion=n
DeleteFilesOnUpgrade="y"
CompiledLibraries="mad sdl_mixer sdl_image sdl_gfx sdl_ttf xml2 EtherLib"
CustomBuildScript=n
AppCflags='-O2 -finline-functions -DSOFT_KIND=2 -DSOFT_NUM=1'
AppLdflags=''
AppSubdirsBuild=''
AppCmdline=''
ReadmeText='^Readme text'
MinimumScreenSize=n
AdmobPublisherId=n
AdmobTestDeviceId=
AdmobBannerSize=
shishanjiu
Junior Developer
Junior Developer
 
Posts: 10
Joined: Thu Sep 20, 2012 3:41 am

Top

Re: SDL port for Android SDK/NDK 1.6

Postby pelya » Thu Sep 20, 2012 12:31 pm

Looks perfectly fine, SDL should handle all video-related stuff all by itself.
SDL will send you a SDL_VIDEORESIZE and SDL_ACTIVEEVENT when it comes from background, maybe your code tries to handle that events and calls SDL_SetVideoMode()? It's better just to ignore them.
I would propose one little tweak, since it's a ebook:
InhibitSuspend=y - that will prevent the phone to go into the sleep mode, when the app is in foreground and user does not touch the screen.
pelya
Master Developer
Master Developer
 
Posts: 323
Joined: Mon Nov 23, 2009 11:31 am

Re: SDL port for Android SDK/NDK 1.6

Postby shishanjiu » Thu Sep 20, 2012 12:35 pm

Do we need SDL_Flip(SDL_GetVideoSurface()) in a while (1) loop like ballfield.cpp?

slvn also said to call SDL_Flip in 1Hz.

Doies this is actully need to solve the pause/resume issue after press home button? I feel it so wild.
shishanjiu
Junior Developer
Junior Developer
 
Posts: 10
Joined: Thu Sep 20, 2012 3:41 am

Re: SDL port for Android SDK/NDK 1.6

Postby slvn » Thu Sep 20, 2012 12:41 pm

pelya wrote:Android framework sends touch events with a full history of events that happened when the current frame was rendering, SDL is currently discarding that history and only use the latest touch coordinates. I can make a setting to push all that history as a mouse/touch SDL events, that may impact a speed a bit though (and I would rather enable it by default for fast devices).
It's mostly important for drawing programs, where you need to precisely track the path of a finger on screen.
So, do you need such feature?


Dont need the full history. But twice more events would be nice ! It would allow to have a more smooth drag and drop !
(without doing myself some interpolation) ! I think it's important to get the information in real time !

Can't we make SDL forward all the event to the application without buffering ? or just reduce the size of the buffer ?
slvn
Developer
Developer
 
Posts: 33
Joined: Thu Jul 28, 2011 7:45 am

Re: SDL port for Android SDK/NDK 1.6

Postby pelya » Thu Sep 20, 2012 4:27 pm

shishanjiu wrote:Do we need SDL_Flip(SDL_GetVideoSurface()) in a while (1) loop like ballfield.cpp?

slvn also said to call SDL_Flip in 1Hz.

Doies this is actully need to solve the pause/resume issue after press home button? I feel it so wild.

Yes, SDL destroys and re-creates video surfaces inside SDL_Flip() call, so you need to call it from time to time (once per 5 seconds at least).
It also sends SDL_ACTIVEEVENT and SDL_VIDEORESIZE events from inside SDL_Flip(), however I did a quick fix, now it will send a SDL_ACTIVEEVENT asynchronously, when the app is put to background.
Please update your SDL repo, and replace all long wait functions in your app with SDL_WaitEvent() (or SDL_PollEvent() with a short sleep in a loop). I think you already did that, because your app should wait for user input.
Whenever you receive a SDL_ACTIVEEVENT - you should call one extra SDL_Flip(), that should fix the bug. SDL_Flip() will block, and will return only when user brings app to foreground.

Can't we make SDL forward all the event to the application without buffering ? or just reduce the size of the buffer ?

Actually, there are two event buffers - one is inside core SDL, and another one is inside my Android video glue code.
It's done that way because one particular application uses SDL_SetEventFilter() callback, and will not redraw the screen if the event comes not from the main thread, because SDL_Flip() may be called only from the main thread.
I think I'll rewrite that code a bit, and will force that app to use a separate video thread, which will solve that problem. I don't think that will impact overall SDL performance - only one thread context switch is done for each event, and it will be the same way after cleaning the code, the code will be a bit shorter though.

Are you reading all the events in a loop with SDL_PollEvent(), until the queue is empty, before drawing each video frame? Maybe your problem is just low FPS? Maybe you should use faster HW video mode, or GL ES directly? The software rendering sohuld be fast enough on most modern devices though.
Does Ballfield also have this kind of lag? Do other games work better on your device?
pelya
Master Developer
Master Developer
 
Posts: 323
Joined: Mon Nov 23, 2009 11:31 am

Re: SDL port for Android SDK/NDK 1.6

Postby slvn » Thu Sep 20, 2012 9:43 pm

pelya wrote:Are you reading all the events in a loop with SDL_PollEvent(), until the queue is empty, before drawing each video frame? Maybe your problem is just low FPS? Maybe you should use faster HW video mode, or GL ES directly? The software rendering sohuld be fast enough on most modern devices though.
Does Ballfield also have this kind of lag? Do other games work better on your device?


Ok, it's seems a side effect on my side... I am limiting the frame rate (40fps) and very fast movement seemed to be too jerky.

I am using HW video mode, and reading all events before Flipping. Only re-drawing when there is actually an update to be done !

Ballfield is fine ! (the screen was 320x200, so I gave try with a higher resolution !)
I saw you were using "SDL_GetMouseState(x,y)", is it giving a more precise information than the "ballmotion" event ?

One more question : with HW mode, should we put the flag DOUBLE_BUF ?
slvn
Developer
Developer
 
Posts: 33
Joined: Thu Jul 28, 2011 7:45 am

Top

Re: SDL port for Android SDK/NDK 1.6

Postby pelya » Fri Sep 21, 2012 12:19 pm

DOUBLE_BUF flag is ignored - the video surface is always double-buffered. It will not be rendered to screen until you call SDL_Flip().
pelya
Master Developer
Master Developer
 
Posts: 323
Joined: Mon Nov 23, 2009 11:31 am

Re: SDL port for Android SDK/NDK 1.6

Postby slvn » Sun Sep 23, 2012 8:12 am

hey,

Any idea for the two followings points :

In HW mode, when switching between foregroud/background, the surface with colorkey gets broken (the colorkey has to be removed first, then background. then going back to foreground, then restoring the colorkey?).

How to tell whether a "SDL_DisplayFormat" -to optimise a surface-, has be done or not ?

thanks,
slvn
Developer
Developer
 
Posts: 33
Joined: Thu Jul 28, 2011 7:45 am

Re: SDL port for Android SDK/NDK 1.6

Postby slvn » Thu Sep 27, 2012 10:00 pm

Hey Pelya,

In HW mode, when going to background, then foreground, the image colorkey is broken, and also the alpha value. If any.

Here's a patch that seems to solve the problem. maybe double-check it !

In file "SDL_androidvideo-1.2.c", function SDL_ANDROID_VideoContextRecreated :
replace, the call to "ANDROID_UnlockHWSurface", by :

Code: Select all
         {   
            int flags = HwSurfaceList[i]->flags;
            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
            }   


thanks,
slvn
Developer
Developer
 
Posts: 33
Joined: Thu Jul 28, 2011 7:45 am

Re: SDL port for Android SDK/NDK 1.6

Postby pelya » Fri Sep 28, 2012 3:11 pm

Thanks, I've applied your patch.
pelya
Master Developer
Master Developer
 
Posts: 323
Joined: Mon Nov 23, 2009 11:31 am

Re: SDL port for Android SDK/NDK 1.6

Postby LimboFanatic » Sat Sep 29, 2012 2:37 pm

Hi,

I am trying to port a game I developed some time ago to android using your SDL framework (looks pretty impressive btw :) ). I managed to compile my application and generate the corresponding apk file. However the app crashes on startup and I did not manage to find the source for this error. I don't exactly do what you suggest in the readme as I run everything on windows with cygwin, don't know if that has anything to do with it. And this is the first time I am doing something with Android so please tell me if I forget to mention anything from value here.

Here is what I do:

1) I build the game using your script build.sh
2) I start an emulator with 4.1 platform running
3) I install the app -> adb install ...
4) I try to start/debug the app -> ndk-gdb --verbose --start --force

ndk-dbg gives me some warnings but I guess they are not important (Tell me if I'm wrong here). What looks like the error is this output from logcat:

Code: Select all
E/AndroidRuntime(  666): FATAL EXCEPTION: Thread-69
E/AndroidRuntime(  666): java.lang.UnsatisfiedLinkError: Native method not found                              : de.lom.AudioThread.nativeAudioInitJavaCallbacks:()I
E/AndroidRuntime(  666):        at de.lom.AudioThread.nativeAudioIni                              tJavaCallbacks(Native Method)
E/AndroidRuntime(  666):        at de.lom.AudioThread.<init>(Audio.j                              ava:54)
E/AndroidRuntime(  666):        at de.lom.MainActivity$1Callback.run                              (MainActivity.java:164)
E/AndroidRuntime(  666):        at java.lang.Thread.run(Thread.java:856)


Used tool versions:
ant 1.8.4
ndk r8b
cygwin 1.7.16

Another question I have: How is writing/reading files managed in your framework? I read that there is a seperate place for apps to store their data but you have to request the path to that location. Is this something I have to do myself anyhow or did you give an easy solution for this already?

Thanks in advance and thanks for your great work!

Edit: Hmmm, funny.. while I wrote this post I wanted to reproduce everything I made, just to be sure to tell you the truth :) and now the error does not occur anymore. Instead the application just seems to freeze...

Edit2: Upon further investigation the last output now is:
Code: Select all
09-29 13:51:52.322: I/System.out(1056): libSDL: onWindowFocusChanged: true - sending onPause/onResume
[...]
09-29 13:51:58.091: W/ActivityManager(595): Launch timeout has expired, giving up wake lock!

Did I mess up something with the event processing? And I did not change anything regarding the first problem however I would be glad to know the reason for this.
LimboFanatic
Freshman
Freshman
 
Posts: 3
Joined: Sat Sep 29, 2012 2:00 pm

Re: SDL port for Android SDK/NDK 1.6

Postby pelya » Sat Sep 29, 2012 4:07 pm

The first error occurred because the application package name (de.lom in your instance) has to be the same in both Java and C code, and it seems like ChangeAppSettings.sh did not update some file, this may happen because of Cygwin.
Could you please try to compile and launch Ballfield example from the repository? Is there any other logcat output, like "calling SDL_main()"?
The application data is extracted into the directory on SD card, then SDL chdir()-s there and runs your SDL_main(), plain and simple. I did not integrate the download manager from the Play Store, because it can download just two 2Gb files, you can extract data from them, but you may not delete them afterwards, because they will be downloaded again. Also, it will not work, if you've installed the app not from the Play Store, hosting your data files is not a problem nowadays - for example Sourceforge will give you an unlimited hosting storage, as long as your app is opensource.
pelya
Master Developer
Master Developer
 
Posts: 323
Joined: Mon Nov 23, 2009 11:31 am

Re: SDL port for Android SDK/NDK 1.6

Postby LimboFanatic » Sun Sep 30, 2012 1:50 pm

Wow that was a fast answer :) Ok so the first error was probably fixed due to my rebuild. I tried to run ballfield but with the same result as with my app. It freezes during startup. Sometimes the SDL splash screen is visible, sometimes not. This is the complete output of the debug session of ballfield with stdout redirected to log:

Code: Select all
09-30 12:35:34.260: D/AndroidRuntime(1198): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-30 12:35:34.260: D/AndroidRuntime(1198): CheckJNI is ON
09-30 12:35:34.350: D/dalvikvm(1198): Trying to load lib libjavacore.so 0x0
09-30 12:35:34.369: D/dalvikvm(1198): Added shared lib libjavacore.so 0x0
09-30 12:35:34.439: D/dalvikvm(1198): Trying to load lib libnativehelper.so 0x0
09-30 12:35:34.439: D/dalvikvm(1198): Added shared lib libnativehelper.so 0x0
09-30 12:35:36.079: D/AndroidRuntime(1198): Calling main entry com.android.commands.am.Am
09-30 12:35:36.150: I/stdout(1198): Starting: Intent { cmp=net.olofson.ballfield/.MainActivity }
09-30 12:35:36.159: I/ActivityManager(688): START {flg=0x10000000 cmp=net.olofson.ballfield/.MainActivity u=0} from pid 1198
09-30 12:35:36.220: D/PermissionCache(675): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (1623 us)
09-30 12:35:36.229: W/WindowManager(688): Failure taking screenshot for (394x236) to layer 21005
09-30 12:35:36.250: D/skia(688): --- SkImageDecoder::Factory returned null
09-30 12:35:36.300: W/PackageManager(688): Failure retrieving icon 0x7f020008 in package net.olofson.ballfield
09-30 12:35:36.300: W/PackageManager(688): java.lang.NullPointerException
09-30 12:35:36.300: W/PackageManager(688):    at android.app.ApplicationPackageManager.putCachedIcon(ApplicationPackageManager.java:782)
09-30 12:35:36.300: W/PackageManager(688):    at android.app.ApplicationPackageManager.getDrawable(ApplicationPackageManager.java:618)
09-30 12:35:36.300: W/PackageManager(688):    at android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:140)
09-30 12:35:36.300: W/PackageManager(688):    at com.android.internal.widget.ActionBarView.<init>(ActionBarView.java:211)
09-30 12:35:36.300: W/PackageManager(688):    at java.lang.reflect.Constructor.constructNative(Native Method)
09-30 12:35:36.300: W/PackageManager(688):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
09-30 12:35:36.300: W/PackageManager(688):    at android.view.LayoutInflater.createView(LayoutInflater.java:587)
09-30 12:35:36.300: W/PackageManager(688):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
09-30 12:35:36.300: W/PackageManager(688):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
09-30 12:35:36.300: W/PackageManager(688):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
09-30 12:35:36.300: W/PackageManager(688):    at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
09-30 12:35:36.300: W/PackageManager(688):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
09-30 12:35:36.300: W/PackageManager(688):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
09-30 12:35:36.300: W/PackageManager(688):    at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2784)
09-30 12:35:36.300: W/PackageManager(688):    at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2844)
09-30 12:35:36.300: W/PackageManager(688):    at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1542)
09-30 12:35:36.300: W/PackageManager(688):    at com.android.internal.policy.impl.PhoneWindowManager.addStartingWindow(PhoneWindowManager.java:1530)
09-30 12:35:36.300: W/PackageManager(688):    at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:6987)
09-30 12:35:36.300: W/PackageManager(688):    at android.os.Handler.dispatchMessage(Handler.java:99)
09-30 12:35:36.300: W/PackageManager(688):    at android.os.Looper.loop(Looper.java:137)
09-30 12:35:36.300: W/PackageManager(688):    at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:828)
09-30 12:35:36.369: D/AndroidRuntime(1198): Shutting down VM
09-30 12:35:36.390: D/dalvikvm(1209): Not late-enabling CheckJNI (already on)
09-30 12:35:36.431: I/AndroidRuntime(1198): NOTE: attach of thread 'Binder_3' failed
09-30 12:35:36.479: D/dalvikvm(676): WAIT_FOR_CONCURRENT_GC blocked 0ms
09-30 12:35:36.489: D/dalvikvm(1198): GC_CONCURRENT freed 102K, 77% free 489K/2048K, paused 2ms+21ms, total 81ms
09-30 12:35:36.512: D/jdwp(1198): Got wake-up signal, bailing out of select
09-30 12:35:36.512: D/dalvikvm(1198): Debugger has detached; object registry had 1 entries
09-30 12:35:36.520: I/stdout(1198): Shutting down
09-30 12:35:36.520: D/dalvikvm(1198): Joining stdio converter...
09-30 12:35:36.550: I/ActivityManager(688): Start proc net.olofson.ballfield for activity net.olofson.ballfield/.MainActivity: pid=1209 uid=10044 gids={3003, 1015, 1028}
09-30 12:35:36.909: D/dalvikvm(676): GC_EXPLICIT freed 38K, 4% free 7964K/8259K, paused 84ms+44ms, total 429ms
09-30 12:35:36.919: D/dalvikvm(676): WAIT_FOR_CONCURRENT_GC blocked 0ms
09-30 12:35:37.191: D/dalvikvm(676): GC_EXPLICIT freed <1K, 4% free 7964K/8259K, paused 62ms+17ms, total 273ms
09-30 12:35:37.210: D/dalvikvm(676): WAIT_FOR_CONCURRENT_GC blocked 0ms
09-30 12:35:37.470: D/dalvikvm(676): GC_EXPLICIT freed <1K, 4% free 7964K/8259K, paused 31ms+28ms, total 251ms
09-30 12:35:37.710: I/Choreographer(688): Skipped 35 frames!  The application may be doing too much work on its main thread.
09-30 12:35:37.950: E/Trace(1209): error opening trace file: No such file or directory (2)
09-30 12:35:38.800: I/System.out(1209): libSDL: Creating startup screen
09-30 12:35:38.989: D/dalvikvm(1209): GC_FOR_ALLOC freed 72K, 4% free 8005K/8259K, paused 93ms, total 96ms
09-30 12:35:39.000: I/dalvikvm-heap(1209): Grow heap (frag case) to 8.330MB for 486264-byte allocation
09-30 12:35:39.180: D/dalvikvm(1209): GC_CONCURRENT freed <1K, 4% free 8479K/8775K, paused 41ms+23ms, total 174ms
09-30 12:35:39.331: D/dalvikvm(1209): GC_FOR_ALLOC freed 0K, 4% free 8479K/8775K, paused 75ms, total 75ms
09-30 12:35:39.390: I/dalvikvm-heap(1209): Grow heap (frag case) to 9.374MB for 1094872-byte allocation
09-30 12:35:39.801: D/dalvikvm(1209): GC_CONCURRENT freed 0K, 4% free 9549K/9863K, paused 55ms+40ms, total 409ms
09-30 12:35:39.801: D/dalvikvm(1209): WAIT_FOR_CONCURRENT_GC blocked 6ms
09-30 12:35:40.189: I/System.out(1209): libSDL: Loading libraries
09-30 12:35:40.189: I/System.out(1209): libSDL: loaded GLESv2 lib
09-30 12:35:40.250: I/System.out(1209): libSDL: loading lib /data/data/net.olofson.ballfield/files/../lib/libsdl-1.2.so
09-30 12:35:40.250: D/dalvikvm(1209): Trying to load lib /data/data/net.olofson.ballfield/files/../lib/libsdl-1.2.so 0x411ea868
09-30 12:35:40.474: D/dalvikvm(1209): Added shared lib /data/data/net.olofson.ballfield/files/../lib/libsdl-1.2.so 0x411ea868
09-30 12:35:40.480: I/System.out(1209): libSDL: loading lib /data/data/net.olofson.ballfield/files/../lib/libsdl_mixer.so
09-30 12:35:40.558: D/dalvikvm(1209): Trying to load lib /data/data/net.olofson.ballfield/files/../lib/libsdl_mixer.so 0x411ea868
09-30 12:35:40.600: D/dalvikvm(1209): Added shared lib /data/data/net.olofson.ballfield/files/../lib/libsdl_mixer.so 0x411ea868
09-30 12:35:40.629: D/dalvikvm(1209): No JNI_OnLoad found in /data/data/net.olofson.ballfield/files/../lib/libsdl_mixer.so 0x411ea868, skipping init
09-30 12:35:40.629: I/System.out(1209): libSDL: loading lib /data/data/net.olofson.ballfield/files/../lib/libsdl_image.so
09-30 12:35:40.629: D/dalvikvm(1209): Trying to load lib /data/data/net.olofson.ballfield/files/../lib/libsdl_image.so 0x411ea868
09-30 12:35:40.629: D/dalvikvm(1209): Added shared lib /data/data/net.olofson.ballfield/files/../lib/libsdl_image.so 0x411ea868
09-30 12:35:40.629: D/dalvikvm(1209): No JNI_OnLoad found in /data/data/net.olofson.ballfield/files/../lib/libsdl_image.so 0x411ea868, skipping init
09-30 12:35:40.680: I/System.out(1209): libSDL: Loading settings
09-30 12:35:40.970: I/dalvikvm(688): Jit: resizing JitTable from 4096 to 8192
09-30 12:35:46.331: W/ActivityManager(688): Launch timeout has expired, giving up wake lock!
09-30 12:35:47.950: W/ActivityManager(688): Activity idle timeout for ActivityRecord{413f3bd0 net.olofson.ballfield/.MainActivity}
09-30 12:36:00.630: I/Choreographer(897): Skipped 35 frames!  The application may be doing too much work on its main thread.


I also tried a minimal app with just a "cout << "TEST" << endl" in the main() but with the same result and "TEST" was not printed. Any ideas?


According the read/write files question: I asked because I write player statistics and stuff to files and at the moment I just use a relative path to the current working directory. Is this still correct on Android?
LimboFanatic
Freshman
Freshman
 
Posts: 3
Joined: Sat Sep 29, 2012 2:00 pm

Re: SDL port for Android SDK/NDK 1.6

Postby LimboFanatic » Thu Oct 04, 2012 7:53 pm

Hey, I've found the error :)

Although I've seen the error all the time I did not recognize it. The error is visible in the output, it's the exception about the missing icon. The icon was not missing it was there, but it was symlink content copied to icon.png. The symlinks do not work the same way on windows, I had to replace some files in the SDL directory, too. I just did not see that the icon.png was a symlink. There are some new errors now, SDL music is complaining about something but I will look into that the next time.
LimboFanatic
Freshman
Freshman
 
Posts: 3
Joined: Sat Sep 29, 2012 2:00 pm

Re: SDL port for Android SDK/NDK 1.6

Postby pelya » Fri Oct 05, 2012 10:54 am

Why don't you try to install Portable Ubuntu instead of Cygwin? https://sourceforge.net/projects/portableubuntu/
It's like a Linux inside a virtual machine, but works faster (and compiles faster than Cygwin, as I've heard).
If you insist of continuing to struggle with Cygwin, you need to use Git command provided by Cygwin installer - any other Git for Windows, like TortoiseGit etc, will screw up symlinks, and my SDL port depends on them quite heavily.
pelya
Master Developer
Master Developer
 
Posts: 323
Joined: Mon Nov 23, 2009 11:31 am

Top
PreviousNext

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 2 guests