Skip to content

Commit 4a8505c

Browse files
committed
Add undefine ALIGN if defined for jar_mx.h and updated android_main entrypoint in rcore_android.c per 5ed7905.
1 parent da2700f commit 4a8505c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

raylib/external/jar_xm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,10 @@ int jar_xm_create_context(jar_xm_context_t** ctxp, const char* moddata, uint32_t
525525
return jar_xm_create_context_safe(ctxp, moddata, SIZE_MAX, rate);
526526
}
527527

528+
#ifdef ALIGN
529+
#undef ALIGN
530+
#endif
531+
528532
#define ALIGN(x, b) (((x) + ((b) - 1)) & ~((b) - 1))
529533
#define ALIGN_PTR(x, b) (void*)(((uintptr_t)(x) + ((b) - 1)) & ~((b) - 1))
530534
int jar_xm_create_context_safe(jar_xm_context_t** ctxp, const char* moddata, size_t moddata_length, uint32_t rate) {

raylib/platforms/rcore_android.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,18 @@ static GamepadButton AndroidTranslateGamepadButton(int button);
278278

279279
// To allow easier porting to android, we allow the user to define a
280280
// main function which we call from android_main, defined by ourselves
281-
extern int main(int argc, char *argv[]);
281+
//extern int main(int argc, char *argv[]);
282+
extern void android_run();
282283

283284
// Android main function
284285
void android_main(struct android_app *app)
285286
{
286287
char arg0[] = "raylib"; // NOTE: argv[] are mutable
287288
platform.app = app;
288289

290+
(void)android_run();
289291
// NOTE: Return from main is ignored
290-
(void)main(1, (char *[]) { arg0, NULL });
292+
//(void)main(1, (char *[]) { arg0, NULL });
291293

292294
// Request to end the native activity
293295
ANativeActivity_finish(app->activity);

0 commit comments

Comments
 (0)