mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Update android port.
This commit is contained in:
parent
2dff3aab22
commit
d2121ccd62
@ -159,9 +159,8 @@ if (ANDROID)
|
|||||||
dl
|
dl
|
||||||
z
|
z
|
||||||
${OPENSCENEGRAPH_LIBRARIES}
|
${OPENSCENEGRAPH_LIBRARIES}
|
||||||
${OSG_PLUGINS}
|
freetype
|
||||||
jpeg
|
jpeg
|
||||||
gif
|
|
||||||
png
|
png
|
||||||
)
|
)
|
||||||
endif (ANDROID)
|
endif (ANDROID)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
int stderr = 0; // Hack: fix linker error
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
#include "SDL_main.h"
|
#include "SDL_main.h"
|
||||||
@ -17,6 +18,8 @@ void releaseArgv();
|
|||||||
int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls,
|
int Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls,
|
||||||
jobject obj) {
|
jobject obj) {
|
||||||
|
|
||||||
|
setenv("OPENMW_DECOMPRESS_TEXTURES", "1", 1);
|
||||||
|
|
||||||
SDL_Android_Init(env, cls);
|
SDL_Android_Init(env, cls);
|
||||||
|
|
||||||
SDL_SetMainReady();
|
SDL_SetMainReady();
|
||||||
|
@ -290,7 +290,11 @@ private:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ANDROID
|
||||||
|
extern "C" int SDL_main(int argc, char**argv)
|
||||||
|
#else
|
||||||
int main(int argc, char**argv)
|
int main(int argc, char**argv)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0);
|
setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "imagetosurface.hpp"
|
#include "imagetosurface.hpp"
|
||||||
|
|
||||||
#ifdef OSG_LIBRARY_STATIC
|
#if defined(OSG_LIBRARY_STATIC) && !defined(ANDROID)
|
||||||
// Sets the default windowing system interface according to the OS.
|
// Sets the default windowing system interface according to the OS.
|
||||||
// Necessary for OpenSceneGraph to do some things, like decompression.
|
// Necessary for OpenSceneGraph to do some things, like decompression.
|
||||||
USE_GRAPHICSWINDOW()
|
USE_GRAPHICSWINDOW()
|
||||||
@ -220,7 +220,9 @@ namespace SDLUtil
|
|||||||
|
|
||||||
void SDLCursorManager::createCursor(const std::string& name, int rotDegrees, osg::Image* image, Uint8 hotspot_x, Uint8 hotspot_y)
|
void SDLCursorManager::createCursor(const std::string& name, int rotDegrees, osg::Image* image, Uint8 hotspot_x, Uint8 hotspot_y)
|
||||||
{
|
{
|
||||||
|
#ifndef ANDROID
|
||||||
_createCursorFromResource(name, rotDegrees, image, hotspot_x, hotspot_y);
|
_createCursorFromResource(name, rotDegrees, image, hotspot_x, hotspot_y);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDLCursorManager::_createCursorFromResource(const std::string& name, int rotDegrees, osg::Image* image, Uint8 hotspot_x, Uint8 hotspot_y)
|
void SDLCursorManager::_createCursorFromResource(const std::string& name, int rotDegrees, osg::Image* image, Uint8 hotspot_x, Uint8 hotspot_y)
|
||||||
|
Loading…
Reference in New Issue
Block a user