diff --git a/Common/MemArena.cpp b/Common/MemArena.cpp index de57d50f57..2c3753d131 100644 --- a/Common/MemArena.cpp +++ b/Common/MemArena.cpp @@ -226,13 +226,13 @@ u8* MemArena::Find4GBBase() } return base; #else - void* base = mmap(0, 0x31000000, PROT_READ | PROT_WRITE, + void* base = mmap(0, 0x10000000, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); if (base == MAP_FAILED) { PanicAlert("Failed to map 1 GB of memory space: %s", strerror(errno)); return 0; } - munmap(base, 0x31000000); + munmap(base, 0x10000000); return static_cast(base); #endif #endif diff --git a/SDL/CMakeLists.txt b/SDL/CMakeLists.txt index d2fae5a724..0782cc494f 100644 --- a/SDL/CMakeLists.txt +++ b/SDL/CMakeLists.txt @@ -73,13 +73,13 @@ add_subdirectory(../Common Common) add_subdirectory(../GPU GPU) add_subdirectory(../Core Core) -set(LIBS ${LIBS} ${SDL_LIBRARY} ${OPENGL_LIBRARIES} file lin ${PNG_LIBRARY} z gfx gfx_es2 etcdec image stb_image mixer net ui profiler timeutil file zip base lin vjson stb_vorbis sha1 jsonwriter common core gpu kirk) +set(LIBS ${LIBS} ${SDL_LIBRARY} file lin ${PNG_LIBRARY} z gfx gfx_es2 image stb_image mixer net ui profiler timeutil file zip base lin vjson stb_vorbis sha1 jsonwriter common core gpu kirk) # TODO: Blackberry specific libs (eg. TCO) if(BLACKBERRY) - set(LIBS ${LIBS} socket) + set(LIBS ${LIBS} bps screen socket EGL GLESv2) else() - set(LIBS ${LIBS} GLEW) + set(LIBS ${LIBS} ${OPENGL_LIBRARIES} GLEW etcdec) endif() set(FILES @@ -89,12 +89,16 @@ set(FILES ../android/jni/GamepadEmu.cpp ../android/jni/UIShader.cpp ../android/jni/ui_atlas.cpp - ../native/base/PCMain.cpp ) -if(APPLE) - set(FILES ${FILES} SDLMain.m) -endif(APPLE) +if(BLACKBERRY) + set(FILES ${FILES} ../native/base/BlackberryMain.cpp) +else() + set(FILES ${FILES} ../native/base/PCMain.cpp) + if(APPLE) + set(FILES ${FILES} SDLMain.m) + endif(APPLE) +endif() add_executable(ppsspp ${FILES}) diff --git a/SDL/bar-descriptor.xml b/SDL/bar-descriptor.xml new file mode 100644 index 0000000000..67ca11344c --- /dev/null +++ b/SDL/bar-descriptor.xml @@ -0,0 +1,32 @@ + + + com.Qtness.PPSSPP + PPSSPP + ppsspp + 0.0.1 + 1 + Playstation portable emulator. + + Qtness + gYAAgGE4qaHzBnzEAu8JKe4G1OI + + + landscape + false + none + false + + + core.games + + icon-114.png + + + + + run_native + access_shared + play_audio + + + diff --git a/SDL/build_for_playbook.sh b/SDL/build_for_playbook.sh old mode 100644 new mode 100755 diff --git a/SDL/icon-114.png b/SDL/icon-114.png new file mode 100755 index 0000000000..1a153b5fd1 Binary files /dev/null and b/SDL/icon-114.png differ diff --git a/SDL/package_for_playbook.sh b/SDL/package_for_playbook.sh new file mode 100755 index 0000000000..7568897119 --- /dev/null +++ b/SDL/package_for_playbook.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +TYPE=Device-Release +PPSSPP_ROOT=${PWD}/.. +WORKSPACE=${PPSSPP_ROOT}/.. +blackberry-nativepackager -package PPSSPP.bar bar-descriptor.xml ppsspp \ +-devMode -debugToken ~/debugtoken.bar \ +-e icon-114.png icon-114.png \ +-e ../android/assets assets \ +-e ${WORKSPACE}/SDL12/${TYPE}/libSDL12.so lib/libSDL12.so \ +-e ${WORKSPACE}/TouchControlOverlay/${TYPE}/libTouchControlOverlay.so lib/libTouchControlOverlay.so \ +-e ${WORKSPACE}/SDL_image/${TYPE}/libSDL_image.so lib/libSDL_image.so \ +-e ${WORKSPACE}/SDL_mixer/${TYPE}/libSDL_mixer.so lib/libSDL_mixer.so \ +-e ${WORKSPACE}/SDL_net/${TYPE}/libSDL_net.so lib/libSDL_net.so \ +-e ${WORKSPACE}/SDL_ttf/${TYPE}/libSDL_ttf.so lib/libSDL_ttf.so diff --git a/android/jni/EmuScreen.cpp b/android/jni/EmuScreen.cpp index 4ac35c0ede..01575562ae 100644 --- a/android/jni/EmuScreen.cpp +++ b/android/jni/EmuScreen.cpp @@ -175,10 +175,10 @@ void EmuScreen::render() } // Tiled renderers like PowerVR should benefit greatly from this. However - seems I can't call it? -#ifdef ANDROID +#if defined(ANDROID) || defined(BLACKBERRY) bool hasDiscard = false; // TODO if (hasDiscard) { - //glDiscardFramebufferEXT(GL_COLOR_EXT | GL_DEPTH_EXT | GL_STENCIL_EXT); + //glDiscardFramebuffer(GL_COLOR_EXT | GL_DEPTH_EXT | GL_STENCIL_EXT); } #endif } diff --git a/android/jni/NativeApp.cpp b/android/jni/NativeApp.cpp index 0c83120001..6b11be8e0a 100644 --- a/android/jni/NativeApp.cpp +++ b/android/jni/NativeApp.cpp @@ -152,7 +152,12 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co std::string user_data_path = savegame_directory; // We want this to be FIRST. +#ifdef BLACKBERRY + // Packed assets are included in app/native/ dir + VFSRegister("", new DirectoryAssetReader("app/native/assets/")); +#else VFSRegister("", new DirectoryAssetReader("assets/")); +#endif VFSRegister("", new DirectoryAssetReader(user_data_path.c_str())); host = new NativeHost(); @@ -188,7 +193,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co g_Config.Load(config_filename.c_str()); if (g_Config.currentDirectory == "") { -#ifdef ANDROID +#if defined(ANDROID) || defined(BLACKBERRY) g_Config.currentDirectory = external_directory; #else g_Config.currentDirectory = getenv("HOME");