Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy android port #1530

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fbb91e5
Revert "engine: partially remove legacy Android port, in preparation …
mittorn Oct 23, 2023
eed13cf
waifulib/xcompile: host clang experiments (ndk ld)
mittorn Oct 24, 2023
bb97750
platform/android_nosdl: fix build (ndk10, host clang15)
mittorn Oct 24, 2023
30c69d3
wscript: add external projects support (updated waf required)
mittorn Oct 24, 2023
34aab39
waifulib/xcompile: fix host clang16
mittorn Oct 25, 2023
c2e14eb
platform/android: rewrite egl part to separate not android-specific file
mittorn Oct 26, 2023
ea35863
platform/android: disable swbuffer resize hack, wrong buffer size rea…
mittorn Oct 26, 2023
7b4fd3b
platform/android: debug surface enabling/disabling, add notification …
mittorn Oct 26, 2023
06c6371
platform/eglutil: prevent rendering while no surface
mittorn Oct 26, 2023
44b1a8e
platform/android: implement dumb dladdr fallback (only searches in se…
mittorn Oct 28, 2023
d423c43
waf/xcompile: fix ld path for host clang
mittorn Oct 28, 2023
bb55de5
platform/android: prevent rendering without context, fix android_slee…
mittorn Oct 30, 2023
46c82e8
waifu: set external waifulibs for extra-projects
mittorn Oct 31, 2023
16eeaef
wscript: check if extra-projects was set in configuration
mittorn Oct 31, 2023
313f2a8
waifulib/xcompile: add android-from-none for new host-clang versions,…
mittorn Nov 1, 2023
55943ad
waifulib/xcompile: disable stpcpy on host-clang
mittorn Nov 1, 2023
1b9af8c
waifulib/xcompile: add objcopy tool to android configuration, allow s…
mittorn Nov 1, 2023
88f76c6
ref_gl: workaround using fake arb functions on GLES (Mali400 has stub…
mittorn Nov 1, 2023
16aa2e9
vid/android: Remove pixelFormat selection code, it only used to set d…
mittorn Dec 1, 2023
e21d8df
platform/android-nosdl: Move all bindings to XashBindings class, work…
mittorn Dec 1, 2023
7841382
platform/android-nosdl: fix declaration style (werror)
mittorn Dec 1, 2023
0d18753
platform/android-nosdl: add Platform_Shutdown for preShutdown callback
mittorn Dec 1, 2023
0901fd9
platform/android-nosdl: optionally wait gdb in nativeInit, enable dum…
mittorn Dec 1, 2023
91d9ca7
platform/android-nosdl: restore SIGTRAP handler
mittorn Dec 2, 2023
a5f3fce
platform/android-nosdl: add workarounds for yama bullshit
mittorn Dec 3, 2023
9484eff
wscript: fix options in external projects
mittorn Dec 8, 2023
abeb267
scripts/waifulib: save zip task to make it output reuseable
mittorn Dec 10, 2023
6fec039
wscript: re-enable xash-extras on android
mittorn Dec 10, 2023
9c09797
wscript: only enable SINGLE_BINARY and XASH_SDLMAIN on android when S…
mittorn Dec 13, 2023
ffe1ff3
waifulib/xcompile: make clang work with original stlport
mittorn Dec 13, 2023
96c3679
platform/android/dlsym-weak: fix code style
mittorn Dec 16, 2023
4953656
platform/android/dlsym-weak: do not call LoadLibrary to find server l…
mittorn Dec 16, 2023
93e5faa
Remove unused macro and spaces restored by revert
mittorn Dec 16, 2023
892c735
Replace harmless single-line pair assigns by multi-line, need more ne…
mittorn Dec 16, 2023
ec92d05
Fix wrong function name and macro on ARM target
mittorn Dec 16, 2023
dbc54fb
platform/android_nosdl: reduce unneeded logging
mittorn Dec 16, 2023
be9dda2
platform/android_nosdl: remove NULL native object case
mittorn Dec 16, 2023
d6cfc65
platform/android_nosdl: remove dynamic cvars
mittorn Dec 16, 2023
26cbb1d
platform/android_nosdl: use ARRAYSIZE
mittorn Dec 16, 2023
bd5309b
platform/android_nosdl: fix forgotten static
mittorn Dec 16, 2023
42958bc
platform/android_nosdl: use FS_GetDiskPath for icon path
mittorn Dec 16, 2023
0442af7
platform/android_nosdl/dlsym-weak: move includes/defines to the begin…
mittorn Dec 16, 2023
38a3154
ref/gl: refactor gl extension checking again
mittorn Dec 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common/backends.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ GNU General Public License for more details.
// video backends (XASH_VIDEO)
#define VIDEO_NULL 0
#define VIDEO_SDL 1
#define VIDEO_ANDROID 2
#define VIDEO_FBDEV 3
#define VIDEO_DOS 4

// audio backends (XASH_SOUND)
#define SOUND_NULL 0
#define SOUND_SDL 1
#define SOUND_OPENSLES 2
#define SOUND_ALSA 3

// input (XASH_INPUT)
#define INPUT_NULL 0
#define INPUT_SDL 1
#define INPUT_ANDROID 2
#define INPUT_EVDEV 3

// timer (XASH_TIMER)
Expand All @@ -41,6 +44,7 @@ GNU General Public License for more details.
// messageboxes (XASH_MESSAGEBOX)
#define MSGBOX_STDERR 0
#define MSGBOX_SDL 1
#define MSGBOX_ANDROID 2
#define MSGBOX_WIN32 3
#define MSGBOX_NSWITCH 4

Expand Down
21 changes: 19 additions & 2 deletions common/defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ SETUP BACKENDS DEFINITIONS
#endif
#endif // XASH_MESSAGEBOX
#endif
#elif XASH_ANDROID
// we are building for Android platform, use Android APIs
#ifndef XASH_VIDEO
#define XASH_VIDEO VIDEO_ANDROID
#endif // XASH_VIDEO

#ifndef XASH_INPUT
#define XASH_INPUT INPUT_ANDROID
#endif // XASH_INPUT

#ifndef XASH_SOUND
#define XASH_SOUND SOUND_OPENSLES
#endif // XASH_SOUND

#ifndef XASH_MESSAGEBOX
#define XASH_MESSAGEBOX MSGBOX_ANDROID
#endif // XASH_MESSAGEBOX

#define XASH_USE_EVDEV 1
#elif XASH_LINUX
// we are building for Linux without SDL2, can draw only to framebuffer yet
#ifndef XASH_VIDEO
Expand Down Expand Up @@ -151,8 +170,6 @@ Default build-depended cvar and constant values
#define DEFAULT_MODE_WIDTH 960
#define DEFAULT_MODE_HEIGHT 544
#define DEFAULT_ALLOWCONSOLE 1
#elif XASH_ANDROID
#define DEFAULT_TOUCH_ENABLE "1"
#elif XASH_MOBILE_PLATFORM
#define DEFAULT_TOUCH_ENABLE "1"
#define DEFAULT_M_IGNORE "1"
Expand Down
2 changes: 1 addition & 1 deletion engine/platform/android/android.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GNU General Public License for more details.
*/
#include "platform/platform.h"

#if !defined(XASH_DEDICATED)
#if !defined(XASH_DEDICATED) && XASH_SDL

#include "input.h"
#include "client.h"
Expand Down
Loading
Loading