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=d5d4c904679ddf7bbea60ffb9acc197b849b5513;p=d2df-sdl.git android: export jni functions --- diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr index ac4218a..cfa26f5 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, @@ -1081,7 +1081,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