From: DeaDDooMER Date: Tue, 15 Jun 2021 19:02:53 +0000 (+0300) Subject: android: export jni functions X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=994ec81432c8530ebd95c347203c00f2f86cb6ce;p=d2df-sdl.git android: export jni functions --- diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr index 74354e0..5911994 100644 --- a/src/game/Doom2DF.lpr +++ b/src/game/Doom2DF.lpr @@ -24,7 +24,7 @@ uses {$IFDEF ANDROID} - ctypes, + ctypes, jni, {$ENDIF} {$IFDEF UNIX} cthreads, BaseUnix, @@ -1042,7 +1042,19 @@ end; result := 0 end; - exports SDL_main; + function JNI_OnLoad (vm: PJavaVM; reserved: pointer): JInt; cdecl; + begin + result:= JNI_VERSION_1_6; + end; + + procedure JNI_OnUnload(vm: PJavaVM; reserved: pointer); cdecl; + begin + end; + + // DONT REMOVE JNI FUNCTIONS. SPECIAL HANDLING BY FPC. + exports SDL_main name 'SDL_main'; + exports JNI_OnLoad name 'JNI_OnLoad'; + exports JNI_OnUnload name 'JNI_Unload'; {$ELSE} begin EntryPoint