sdl2-android-example icon indicating copy to clipboard operation
sdl2-android-example copied to clipboard

Port a SDL2 PC game to Android.

Open zinwalin opened this issue 3 years ago • 3 comments

I had a PC game which wrote in cpp with SDL2 lib, on Android, SDL2 libs are ready to run, in terms of UI activity, can I reuse cpp code to run on Android ?

Any reply is appreciated.

zinwalin avatar Dec 11 '21 16:12 zinwalin

Hi @zinwalin . It should be possible to reuse maximum of cpp code. There are some differences on OS level API, but they can be wrapped by ifdef. If you have a link to source code or log build problems, let me know.

georgik avatar Dec 11 '21 19:12 georgik

Hi @zinwalin . It should be possible to reuse maximum of cpp code. There are some differences on OS level API, but they can be wrapped by ifdef. If you have a link to source code or log build problems, let me know.

Thanks a lot for your project. Did you have document on how to set up this project? When I try to enable ogg/vorbis support, stucked with sdl2 and sdl2_mixer upgrade. When I enable OGG_MUSIC and DYNAMIC_OGG, the building was successful, but failed to run because of .so lib can't find.

zinwalin avatar Dec 12 '21 14:12 zinwalin

Hi @zinwalin . It should be possible to reuse maximum of cpp code. There are some differences on OS level API, but they can be wrapped by ifdef. If you have a link to source code or log build problems, let me know.

Thanks a lot for your project. Did you have document on how to set up this project? When I try to enable ogg/vorbis support, stucked with sdl2 and sdl2_mixer upgrade. When I enable OGG_MUSIC and DYNAMIC_OGG, the building was successful, but failed to run because of .so lib can't find.

Make sure specific .so lib is in apk file

rafal1137 avatar Jul 27 '23 14:07 rafal1137