diff --git a/Common/ArmCPUDetect.cpp b/Common/ArmCPUDetect.cpp index 810aa4784f..8a723fb419 100644 --- a/Common/ArmCPUDetect.cpp +++ b/Common/ArmCPUDetect.cpp @@ -207,9 +207,6 @@ void CPUInfo::Detect() #endif strcpy(brand_string, "Apple A"); num_cores = 2; -#elif defined(__SYMBIAN32__) - strcpy(brand_string, "Samsung ARMv6"); - num_cores = 1; #else strcpy(brand_string, "Unknown"); num_cores = 1; diff --git a/Common/ArmEmitter.cpp b/Common/ArmEmitter.cpp index 9cca69a393..7edc56e237 100644 --- a/Common/ArmEmitter.cpp +++ b/Common/ArmEmitter.cpp @@ -24,11 +24,6 @@ #include #include -// For cache flushing on Symbian/iOS -#ifdef __SYMBIAN32__ -#include -#endif - #ifdef IOS #include #include @@ -628,9 +623,7 @@ void ARMXEmitter::FlushIcache() void ARMXEmitter::FlushIcacheSection(u8 *start, u8 *end) { -#ifdef __SYMBIAN32__ - User::IMB_Range(start, end); -#elif defined(IOS) +#if defined(IOS) // Header file says this is equivalent to: sys_icache_invalidate(start, end - start); sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start); #elif !defined(_WIN32) diff --git a/Common/ArmEmitter.h b/Common/ArmEmitter.h index d0cc1de2ed..f875596fe9 100644 --- a/Common/ArmEmitter.h +++ b/Common/ArmEmitter.h @@ -25,8 +25,6 @@ #include "CodeBlock.h" #include "MsgHandler.h" -// TODO: Check if Pandora still needs signal.h/kill here. Symbian doesn't. - // VCVT flags #define TO_FLOAT 0 #define TO_INT 1 << 0 diff --git a/Common/CodeBlock.h b/Common/CodeBlock.h index 41970932b9..76ee2b5640 100644 --- a/Common/CodeBlock.h +++ b/Common/CodeBlock.h @@ -97,11 +97,7 @@ public: // Call this when shutting down. Don't rely on the destructor, even though it'll do the job. void FreeCodeSpace() { -#ifdef __SYMBIAN32__ - ResetExecutableMemory(region); -#else FreeMemoryPages(region, region_size); -#endif region = nullptr; region_size = 0; } diff --git a/Common/FakeEmitter.h b/Common/FakeEmitter.h index 40e8bc4bad..25ef39b419 100644 --- a/Common/FakeEmitter.h +++ b/Common/FakeEmitter.h @@ -26,8 +26,6 @@ #include "Common.h" #include "MsgHandler.h" -// TODO: Check if Pandora still needs signal.h/kill here. Symbian doesn't. - // VCVT flags #define TO_FLOAT 0 #define TO_INT 1 << 0 diff --git a/Common/FileUtil.cpp b/Common/FileUtil.cpp index b155d854b2..e6d207f790 100644 --- a/Common/FileUtil.cpp +++ b/Common/FileUtil.cpp @@ -76,24 +76,6 @@ #define DIR_SEP_CHRS "/" #endif -// Hack -#if defined(__SYMBIAN32__) -static inline int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) { - struct dirent *readdir_entry; - - readdir_entry = readdir(dirp); - if (readdir_entry == NULL) { - *result = NULL; - return errno; - } - - *entry = *readdir_entry; - *result = entry; - return 0; -} -#endif - - // This namespace has various generic functions related to files and paths. // The code still needs a ton of cleanup. // REMEMBER: strdup considered harmful! diff --git a/Common/Log.h b/Common/Log.h index 4222c390b9..ee658b8b07 100644 --- a/Common/Log.h +++ b/Common/Log.h @@ -121,16 +121,12 @@ bool GenericLogEnabled(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type); __LINE__, __FILE__); \ if (!PanicYesNo("*** Assertion (see log)***\n")) {Crash();} \ } -#ifdef __SYMBIAN32__ -#define _dbg_assert_msg_(_t_, _a_, ...) if (!(_a_)) ERROR_LOG(_t_, __VA_ARGS__); -#else #define _dbg_assert_msg_(_t_, _a_, ...)\ if (!(_a_)) {\ printf(__VA_ARGS__); \ ERROR_LOG(_t_, __VA_ARGS__); \ if (!PanicYesNo(__VA_ARGS__)) {Crash();} \ } -#endif #define _dbg_update_() ; //Host_UpdateLogDisplay(); #else // not debug diff --git a/Common/LogManager.cpp b/Common/LogManager.cpp index 5d7d5da981..15a58d8474 100644 --- a/Common/LogManager.cpp +++ b/Common/LogManager.cpp @@ -23,9 +23,6 @@ #include "Timer.h" #include "FileUtil.h" #include "../Core/Config.h" -#ifdef __SYMBIAN32__ -#include -#endif // Don't need to savestate this. const char *hleCurrentThreadName = NULL; @@ -278,16 +275,12 @@ void LogChannel::RemoveListener(LogListener *listener) { } void LogChannel::Trigger(LogTypes::LOG_LEVELS level, const char *msg) { -#ifdef __SYMBIAN32__ - RDebug::Printf("%s",msg); -#else lock_guard lk(m_listeners_lock); std::set::const_iterator i; for (i = m_listeners.begin(); i != m_listeners.end(); ++i) { (*i)->Log(level, msg); } -#endif } FileLogListener::FileLogListener(const char *filename) { diff --git a/Common/MemoryUtil.cpp b/Common/MemoryUtil.cpp index ee1f964682..d16f71d767 100644 --- a/Common/MemoryUtil.cpp +++ b/Common/MemoryUtil.cpp @@ -48,20 +48,6 @@ static SYSTEM_INFO sys_info; #define MEM_PAGE_MASK ((MEM_PAGE_SIZE)-1) #define round_page(x) ((((uintptr_t)(x)) + MEM_PAGE_MASK) & ~(MEM_PAGE_MASK)) -#ifdef __SYMBIAN32__ -#include -#define CODECHUNK_SIZE 1024*1024*20 -static RChunk* g_code_chunk = NULL; -static RHeap* g_code_heap = NULL; -static u8* g_next_ptr = NULL; -static u8* g_orig_ptr = NULL; - -void ResetExecutableMemory(void* ptr) { - // Just reset the ptr to the base - g_next_ptr = g_orig_ptr; -} -#endif - #ifdef _WIN32 // Win32 flags are odd... uint32_t ConvertProtFlagsWin32(uint32_t flags) { @@ -153,19 +139,6 @@ void *AllocateExecutableMemory(size_t size) { else #endif ptr = VirtualAlloc(0, size, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE); -#elif defined(__SYMBIAN32__) - //This function may be called more than once, and we want to create only one big - //memory chunk for all the executable code for the JIT - if( g_code_chunk == NULL && g_code_heap == NULL) - { - g_code_chunk = new RChunk(); - g_code_chunk->CreateLocalCode(CODECHUNK_SIZE, CODECHUNK_SIZE + 3*GetMemoryProtectPageSize()); - g_code_heap = UserHeap::ChunkHeap(*g_code_chunk, CODECHUNK_SIZE, 1, CODECHUNK_SIZE + 3*GetMemoryProtectPageSize()); - g_next_ptr = reinterpret_cast(g_code_heap->AllocZ(CODECHUNK_SIZE)); - g_orig_ptr = g_next_ptr; - } - void* ptr = (void*)g_next_ptr; - g_next_ptr += size; #else static char *map_hint = 0; #if defined(_M_X64) @@ -191,7 +164,7 @@ void *AllocateExecutableMemory(size_t size) { #endif /* defined(_WIN32) */ -#if !defined(_WIN32) && !defined(__SYMBIAN32__) +#if !defined(_WIN32) static const void *failed_result = MAP_FAILED; #else static const void *failed_result = nullptr; @@ -222,8 +195,6 @@ void *AllocateMemoryPages(size_t size, uint32_t memProtFlags) { #ifdef _WIN32 uint32_t protect = ConvertProtFlagsWin32(memProtFlags); void* ptr = VirtualAlloc(0, size, MEM_COMMIT, protect); -#elif defined(__SYMBIAN32__) - void* ptr = malloc(size); #else uint32_t protect = ConvertProtFlagsUnix(memProtFlags); void* ptr = mmap(0, size, protect, MAP_ANON | MAP_PRIVATE, -1, 0); @@ -243,9 +214,6 @@ void *AllocateAlignedMemory(size_t size, size_t alignment) { void* ptr = NULL; #ifdef ANDROID ptr = memalign(alignment, size); -#elif defined(__SYMBIAN32__) - // On Symbian, alignment won't matter as NEON isn't supported. - ptr = malloc(size); #else if (posix_memalign(&ptr, alignment, size) != 0) ptr = NULL; @@ -268,8 +236,6 @@ void FreeMemoryPages(void *ptr, size_t size) { #ifdef _WIN32 if (!VirtualFree(ptr, 0, MEM_RELEASE)) PanicAlert("FreeMemoryPages failed!\n%s", GetLastErrorMsg()); -#elif defined(__SYMBIAN32__) - free(ptr); #else munmap(ptr, size); #endif @@ -310,8 +276,6 @@ void ProtectMemoryPages(const void* ptr, size_t size, uint32_t memProtFlags) { DWORD oldValue; if (!VirtualProtect((void *)ptr, size, protect, &oldValue)) PanicAlert("WriteProtectMemory failed!\n%s", GetLastErrorMsg()); -#elif defined(__SYMBIAN32__) - // Do nothing #else uint32_t protect = ConvertProtFlagsUnix(memProtFlags); uint32_t page_size = GetMemoryProtectPageSize(); diff --git a/Common/MemoryUtil.h b/Common/MemoryUtil.h index 9880c1fc73..a9b1394b6f 100644 --- a/Common/MemoryUtil.h +++ b/Common/MemoryUtil.h @@ -46,10 +46,6 @@ void FreeMemoryPages(void* ptr, size_t size); void* AllocateAlignedMemory(size_t size, size_t alignment); void FreeAlignedMemory(void* ptr); -#ifdef __SYMBIAN32__ -void ResetExecutableMemory(void* ptr); -#endif - int GetMemoryProtectPageSize(); template diff --git a/Common/MipsEmitter.cpp b/Common/MipsEmitter.cpp index 2a97723234..bd26315ba0 100644 --- a/Common/MipsEmitter.cpp +++ b/Common/MipsEmitter.cpp @@ -15,11 +15,6 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -// Symbian can't build this due to an old gcc/lib combination, and doesn't need to. -// Kind programmer, if you want to translate this to a proper feature-detection -// define, please feel free to. -#ifndef __SYMBIAN32__ - #include "base/logging.h" #include @@ -497,5 +492,3 @@ void MIPSCodeBlock::FreeCodeSpace() { } } - -#endif diff --git a/Common/MipsEmitter.h b/Common/MipsEmitter.h index 2c0a93391f..582e1eb4b4 100644 --- a/Common/MipsEmitter.h +++ b/Common/MipsEmitter.h @@ -16,10 +16,6 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #pragma once -// Symbian can't build this due to an old gcc/lib combination, and doesn't need to. -// Kind programmer, if you want to translate this to a proper feature-detection -// define, please feel free to. -#ifndef __SYMBIAN32__ #include #include @@ -321,5 +317,3 @@ protected: }; }; - -#endif diff --git a/Common/Misc.cpp b/Common/Misc.cpp index 9c711cd900..dc9c0e8b9a 100644 --- a/Common/Misc.cpp +++ b/Common/Misc.cpp @@ -20,7 +20,7 @@ #include -#if defined(__APPLE__) || defined(__SYMBIAN32__) +#if defined(__APPLE__) #define __thread #endif diff --git a/Core/Config.cpp b/Core/Config.cpp index ee1dc5d81a..c354c2faa5 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -407,12 +407,7 @@ static int DefaultZoomType() { } static bool DefaultTimerHack() { -// Has been in use on Symbian since v0.7. Preferred option. -#ifdef __SYMBIAN32__ - return true; -#else return false; -#endif } static int DefaultAndroidHwScale() { @@ -569,7 +564,7 @@ static ConfigSetting controlSettings[] = { ConfigSetting("ComboKey3Mapping", &g_Config.iCombokey3, 0, true, true), ConfigSetting("ComboKey4Mapping", &g_Config.iCombokey4, 0, true, true), -#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) +#if !defined(IOS) && !defined(MAEMO) #if defined(_WIN32) // A win32 user seeing touch controls is likely using PPSSPP on a tablet. There it makes // sense to default this to on. @@ -672,7 +667,7 @@ static ConfigSetting networkSettings[] = { static int DefaultPSPModel() { // TODO: Can probably default this on, but not sure about its memory differences. -#if !defined(_M_X64) && !defined(_WIN32) && !defined(__SYMBIAN32__) +#if !defined(_M_X64) && !defined(_WIN32) return PSP_MODEL_FAT; #else return PSP_MODEL_SLIM; diff --git a/Core/Config.h b/Core/Config.h index aa9dcd6e44..559fffba07 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -342,7 +342,7 @@ public: int iCombokey3; int iCombokey4; -#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) +#if !defined(IOS) && !defined(MAEMO) bool bShowTouchPause; #endif diff --git a/Core/Core.cpp b/Core/Core.cpp index 100722e573..2bd0e8f13e 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -133,9 +133,6 @@ bool Core_GetPowerSaving() { bool UpdateScreenScale(int width, int height, bool smallWindow) { g_dpi = 72; g_dpi_scale = 1.0f; -#if defined(__SYMBIAN32__) - g_dpi_scale = 1.4f; -#endif if (smallWindow) { g_dpi_scale = 2.0f; } diff --git a/Core/FileLoaders/HTTPFileLoader.cpp b/Core/FileLoaders/HTTPFileLoader.cpp index 8e51d38f40..4585dee0e9 100644 --- a/Core/FileLoaders/HTTPFileLoader.cpp +++ b/Core/FileLoaders/HTTPFileLoader.cpp @@ -61,12 +61,7 @@ void HTTPFileLoader::Prepare() { size_pos = header.find_first_not_of(' ', size_pos); } if (size_pos != header.npos) { - // TODO: Find a way to get this to work right on Symbian? -#ifndef __SYMBIAN32__ filesize_ = atoll(&header[size_pos]); -#else - filesize_ = atoi(&header[size_pos]); -#endif } } if (startsWithNoCase(header, "Accept-Ranges:")) { diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index 8321d83bbe..0ba37fbef5 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -40,9 +40,6 @@ #include #include #define statvfs statfs -#elif defined(__SYMBIAN32__) -#include -QTM_USE_NAMESPACE #else #include #endif diff --git a/Core/FileSystems/DirectoryFileSystem.h b/Core/FileSystems/DirectoryFileSystem.h index e13cf5a733..67b0acb0c0 100644 --- a/Core/FileSystems/DirectoryFileSystem.h +++ b/Core/FileSystems/DirectoryFileSystem.h @@ -39,7 +39,7 @@ typedef void * HANDLE; #define HOST_IS_CASE_SENSITIVE 1 #endif -#elif defined(_WIN32) || defined(__SYMBIAN32__) +#elif defined(_WIN32) #define HOST_IS_CASE_SENSITIVE 0 #else // Android, Linux, BSD (and the rest?) diff --git a/Core/HLE/sceRtc.cpp b/Core/HLE/sceRtc.cpp index c396c65247..d368dec02a 100644 --- a/Core/HLE/sceRtc.cpp +++ b/Core/HLE/sceRtc.cpp @@ -97,7 +97,7 @@ time_t rtc_timegm(struct tm *tm) return _mkgmtime(tm); } -#elif (defined(__GLIBC__) && !defined(ANDROID)) || defined(__SYMBIAN32__) +#elif (defined(__GLIBC__) && !defined(ANDROID)) #define rtc_timegm timegm #else diff --git a/Core/MIPS/IR/IRInst.h b/Core/MIPS/IR/IRInst.h index 005cca9672..50d9a6707d 100644 --- a/Core/MIPS/IR/IRInst.h +++ b/Core/MIPS/IR/IRInst.h @@ -6,16 +6,6 @@ #include "Common/CommonTypes.h" #include "Core/MIPS/MIPS.h" -#ifdef __SYMBIAN32__ -// Seems std::move() doesn't exist, so assuming it can't do moves at all. -namespace std { - template - const T &move(const T &x) { - return x; - } -}; -#endif - // Basic IR // // This IR refers implicitly to the MIPS register set and is simple to interpret. diff --git a/Core/MIPS/IR/IRJit.h b/Core/MIPS/IR/IRJit.h index dfefbbc00e..0d085b86c3 100644 --- a/Core/MIPS/IR/IRJit.h +++ b/Core/MIPS/IR/IRJit.h @@ -51,31 +51,6 @@ public: b.const_ = nullptr; } -#ifdef __SYMBIAN32__ - IRBlock(const IRBlock &b) { - *this = b; - } - - IRBlock &operator=(const IRBlock &b) { - // No std::move on Symbian... But let's try not to use elsewhere. - numInstructions_ = b.numInstructions_; - numConstants_ = b.numConstants_; - instr_ = new IRInst[numInstructions_]; - if (numInstructions_) { - memcpy(instr_, b.instr_, sizeof(IRInst) * numInstructions_); - } - const_ = new u32[numConstants_]; - if (numConstants_) { - memcpy(const_, b.const_, sizeof(u32) * numConstants_); - } - origAddr_ = b.origAddr_; - origSize_ = b.origSize_; - origFirstOpcode_ = b.origFirstOpcode_; - - return *this; - } -#endif - ~IRBlock() { delete[] instr_; delete[] const_; diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index 610d42afde..7af8f6fc11 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -44,12 +44,7 @@ recursive_mutex functions_lock; // One function can appear in multiple copies in memory, and they will all have // the same hash and should all be replaced if possible. -#ifdef __SYMBIAN32__ -// Symbian does not have a functional unordered_multimap. -static std::multimap hashToFunction; -#else static std::unordered_multimap hashToFunction; -#endif struct HashMapFunc { char name[64]; @@ -755,7 +750,7 @@ namespace MIPSAnalyst { lock_guard guard(functions_lock); hashToFunction.clear(); // Really need to detect C++11 features with better defines. -#if !defined(__SYMBIAN32__) && !defined(IOS) +#if !defined(IOS) hashToFunction.reserve(functions.size()); #endif for (auto iter = functions.begin(); iter != functions.end(); iter++) { diff --git a/Core/MemMap.cpp b/Core/MemMap.cpp index d01fb17df6..2e81ddd3b5 100644 --- a/Core/MemMap.cpp +++ b/Core/MemMap.cpp @@ -20,9 +20,7 @@ #include "base/mutex.h" #include "Common/Common.h" #include "Common/MemoryUtil.h" -#ifndef __SYMBIAN32__ #include "Common/MemArena.h" -#endif #include "Common/ChunkFile.h" #include "Core/MemMap.h" @@ -42,12 +40,8 @@ namespace Memory { // The base pointer to the auto-mirrored arena. u8* base = NULL; -#ifdef __SYMBIAN32__ -RChunk* memmap; -#else // The MemArena class MemArena g_arena; -#endif // ============== // 64-bit: Pointers to low-mem (sub-0x10000000) mirror @@ -145,7 +139,7 @@ static bool Memory_TryBase(u32 flags) { #if defined(_XBOX) void *ptr; -#elif !defined(__SYMBIAN32__) +#else size_t position = 0; size_t last_position = 0; #endif @@ -167,12 +161,7 @@ static bool Memory_TryBase(u32 flags) { continue; SKIP(flags, view.flags); -#ifdef __SYMBIAN32__ - if (!CanIgnoreView(view)) { - memmap->Commit(view.virtual_address & MEMVIEW32_MASK, view.size); - } - *(view.out_ptr) = (u8*)base + (view.virtual_address & MEMVIEW32_MASK); -#elif defined(_XBOX) +#if defined(_XBOX) if (!CanIgnoreView(view)) { *(view.out_ptr_low) = (u8*)(base + view.virtual_address); ptr = VirtualAlloc(base + (view.virtual_address & MEMVIEW32_MASK), view.size, MEM_COMMIT, PAGE_READWRITE); @@ -207,7 +196,6 @@ static bool Memory_TryBase(u32 flags) { return true; -#if !defined(__SYMBIAN32__) bail: // Argh! ERROR! Free what we grabbed so far so we can try again. for (int j = 0; j <= i; j++) @@ -229,7 +217,6 @@ bail: } } return false; -#endif } void MemoryMap_Setup(u32 flags) @@ -237,10 +224,6 @@ void MemoryMap_Setup(u32 flags) // Find a base to reserve 256MB #if defined(_XBOX) base = (u8*)VirtualAlloc(0, 0x10000000, MEM_RESERVE|MEM_LARGE_PAGES, PAGE_READWRITE); -#elif defined(__SYMBIAN32__) - memmap = new RChunk(); - memmap->CreateDisconnectedLocal(0 , 0, 0x10000000); - base = memmap->Base(); #else size_t total_mem = 0; @@ -296,11 +279,6 @@ void MemoryMap_Setup(u32 flags) void MemoryMap_Shutdown(u32 flags) { -#ifdef __SYMBIAN32__ - memmap->Decommit(0, memmap->MaxSize()); - memmap->Close(); - delete memmap; -#else for (int i = 0; i < num_views; i++) { if (views[i].size == 0) @@ -315,7 +293,6 @@ void MemoryMap_Shutdown(u32 flags) *views[i].out_ptr_low = NULL; } g_arena.ReleaseSpace(); -#endif } void Init() diff --git a/Core/MemMap.h b/Core/MemMap.h index b397781c37..cc65de36f5 100644 --- a/Core/MemMap.h +++ b/Core/MemMap.h @@ -18,9 +18,6 @@ #pragma once #include -#ifdef __SYMBIAN32__ -#include -#endif #ifndef offsetof #include #endif diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index 1e51bae050..fb7fcbf339 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -15,10 +15,6 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#ifdef __SYMBIAN32__ -#include -#endif - #include "file/file_util.h" #include "Common/StringUtils.h" diff --git a/Core/Reporting.cpp b/Core/Reporting.cpp index 76a58ca797..0ac9ac4aae 100644 --- a/Core/Reporting.cpp +++ b/Core/Reporting.cpp @@ -260,8 +260,6 @@ namespace Reporting return "iOS"; #elif defined(__APPLE__) return "Mac"; -#elif defined(__SYMBIAN32__) - return "Symbian"; #elif defined(LOONGSON) return "Loongson"; #elif defined(MAEMO) diff --git a/Core/TextureReplacer.h b/Core/TextureReplacer.h index b7c9ef355e..bbf84def86 100644 --- a/Core/TextureReplacer.h +++ b/Core/TextureReplacer.h @@ -103,7 +103,6 @@ struct ReplacementAliasKey { } }; -#ifndef __SYMBIAN32__ namespace std { template <> struct hash { @@ -119,7 +118,6 @@ namespace std { } }; } -#endif struct ReplacedTexture { inline bool Valid() { @@ -202,20 +200,10 @@ protected: std::string basePath_; ReplacedTextureHash hash_; typedef std::pair WidthHeightPair; -#ifdef __SYMBIAN32__ - std::map hashranges_; - std::map aliases_; -#else std::unordered_map hashranges_; std::unordered_map aliases_; -#endif ReplacedTexture none_; -#ifdef __SYMBIAN32__ - std::map cache_; - std::map savedCache_; -#else std::unordered_map cache_; std::unordered_map savedCache_; -#endif }; diff --git a/Core/Util/GameManager.cpp b/Core/Util/GameManager.cpp index f8b3351e4b..69e10110f2 100644 --- a/Core/Util/GameManager.cpp +++ b/Core/Util/GameManager.cpp @@ -139,9 +139,6 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) { int error; #ifdef _WIN32 struct zip *z = zip_open(ConvertUTF8ToWString(zipfile).c_str(), 0, &error); -#elif defined(__SYMBIAN32__) - // If zipfile is non-ascii, this may not function correctly. Other options? - struct zip *z = zip_open(std::wstring(zipfile.begin(), zipfile.end()).c_str(), 0, &error); #else struct zip *z = zip_open(zipfile.c_str(), 0, &error); #endif diff --git a/Qt/Common.pro b/Qt/Common.pro index 7d2b705f06..2b00c706c5 100644 --- a/Qt/Common.pro +++ b/Qt/Common.pro @@ -37,11 +37,6 @@ win32 { HEADERS += $$P/Common/stdafx.h } -!symbian { - SOURCES += $$P/Common/MemArena.cpp - HEADERS += $$P/Common/MemArena.h -} - armv7: SOURCES += $$P/Common/ColorConvNEON.cpp SOURCES += $$P/Common/ChunkFile.cpp \ @@ -50,6 +45,7 @@ SOURCES += $$P/Common/ChunkFile.cpp \ $$P/Common/FileUtil.cpp \ $$P/Common/LogManager.cpp \ $$P/Common/KeyMap.cpp \ + $$P/Common/MemArena.cpp \ $$P/Common/MemoryUtil.cpp \ $$P/Common/Misc.cpp \ $$P/Common/MsgHandler.cpp \ @@ -62,6 +58,7 @@ HEADERS += $$P/Common/ChunkFile.h \ $$P/Common/FileUtil.h \ $$P/Common/LogManager.h \ $$P/Common/KeyMap.h \ + $$P/Common/MemArena.h \ $$P/Common/MemoryUtil.h \ $$P/Common/MsgHandler.h \ $$P/Common/StringUtils.h \ diff --git a/Qt/PPSSPP.pro b/Qt/PPSSPP.pro index 8d6f2ba856..d350ae38e0 100644 --- a/Qt/PPSSPP.pro +++ b/Qt/PPSSPP.pro @@ -4,8 +4,7 @@ TARGET = ppsspp QT += core gui opengl # PPSSPP Modules -symbian: LIBS += -lCore.lib -lGPU.lib -lCommon.lib -lNative.lib -else: LIBS += -lCore -lGPU -lCommon -lNative +LIBS += -lCore -lGPU -lCommon -lNative include(Settings.pri) @@ -29,7 +28,6 @@ greaterThan(QT_MAJOR_VERSION,4) { } else:!maemo5:mobile_platform { CONFIG += mobility MOBILITY += sensors - symbian: MOBILITY += systeminfo feedback } # External (platform-dependant) libs @@ -45,7 +43,7 @@ macx|equals(PLATFORM_NAME, "linux") { } } -!symbian:exists( /usr/include/GL/glew.h ) { +exists( /usr/include/GL/glew.h ) { LIBS += -lGLEW } @@ -74,10 +72,6 @@ unix:contains(QT_CONFIG, system-zlib) { # Main SOURCES += $$P/ext/native/base/QtMain.cpp HEADERS += $$P/ext/native/base/QtMain.h -symbian { - SOURCES += $$P/ext/native/base/SymbianMediaKeys.cpp - HEADERS += $$P/ext/native/base/SymbianMediaKeys.h -} # UI SOURCES += $$P/UI/*.cpp \ diff --git a/Qt/Platform/ArchDetection.pri b/Qt/Platform/ArchDetection.pri index 297c6c6626..a7257ce3fb 100644 --- a/Qt/Platform/ArchDetection.pri +++ b/Qt/Platform/ArchDetection.pri @@ -1,8 +1,5 @@ PLATFORM_ARCH="generic" -# Override some bad defaults -symbian: QMAKE_TARGET.arch=armv6 - contains(QT_ARCH, ".*86.*")|contains(QMAKE_TARGET.arch, ".*86.*") { !win32-msvc*: QMAKE_ALLFLAGS += -msse2 else: QMAKE_ALLFLAGS += /arch:SSE2 @@ -21,15 +18,12 @@ contains(QT_ARCH, ".*86.*")|contains(QMAKE_TARGET.arch, ".*86.*") { CONFIG += arm # Will need to see how QT_ARCH and QMAKE_TARGET.arch are populated for various ARM platforms. - symbian: PLATFORM_ARCH="armv6" - else { - PLATFORM_ARCH="armv7" - CONFIG += armv7 - QMAKE_CFLAGS_RELEASE ~= s/-mfpu.*/ - QMAKE_CFLAGS_DEBUG ~= s/-mfpu.*/ - QMAKE_ALLFLAGS_DEBUG += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize - QMAKE_ALLFLAGS_RELEASE += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize - } + PLATFORM_ARCH="armv7" + CONFIG += armv7 + QMAKE_CFLAGS_RELEASE ~= s/-mfpu.*/ + QMAKE_CFLAGS_DEBUG ~= s/-mfpu.*/ + QMAKE_ALLFLAGS_DEBUG += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize + QMAKE_ALLFLAGS_RELEASE += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize # TODO: aarch32/64? } else:contains(QT_ARCH, ".*mips.*") { DEFINES += MIPS diff --git a/Qt/Platform/OSDetection.pri b/Qt/Platform/OSDetection.pri index 10644fbf17..eb26ef7496 100644 --- a/Qt/Platform/OSDetection.pri +++ b/Qt/Platform/OSDetection.pri @@ -11,7 +11,6 @@ unix: PLATFORM_NAME="linux" mac: PLATFORM_NAME="macosx" ios: PLATFORM_NAME="ios" maemo: PLATFORM_NAME="maemo" -symbian: PLATFORM_NAME="symbian" android: PLATFORM_NAME="android" !equals(PLATFORM_NAME, "generic"): include($$PLATFORM_NAME".pri") diff --git a/Qt/Platform/symbian.pri b/Qt/Platform/symbian.pri deleted file mode 100644 index 74be4f8443..0000000000 --- a/Qt/Platform/symbian.pri +++ /dev/null @@ -1,20 +0,0 @@ -DEFINES += "BOOST_COMPILER_CONFIG=\"boost/mpl/aux_/config/gcc.hpp\"" -QMAKE_CXXFLAGS += -marm -Wno-parentheses -Wno-comment -Wno-unused-local-typedefs - -!contains(CONFIG, staticlib) { - # Executable - LIBS += -lremconcoreapi -lremconinterfacebase - - # Packaging - TARGET.UID3 = 0xE0095B1D - DEPLOYMENT.display_name = PPSSPP - vendor_deploy.pkg_prerules = "%{\"Qtness\"}" ":\"Qtness\"" - ICON = $$P/assets/icon.svg - - DEPLOYMENT += vendor_deploy - MMP_RULES += "DEBUGGABLE" - - # 268 MB maximum - TARGET.EPOCHEAPSIZE = 0x40000 0x10000000 - TARGET.EPOCSTACKSIZE = 0x10000 -} diff --git a/Qt/Settings.pri b/Qt/Settings.pri index f543d25da4..f612a9c96a 100644 --- a/Qt/Settings.pri +++ b/Qt/Settings.pri @@ -42,14 +42,9 @@ include(Platform/OSDetection.pri) } # Work out the git version in a way that works on every QMake -symbian { - exists($$P/.git): GIT_VERSION = $$system(git describe --always) - isEmpty(GIT_VERSION): GIT_VERSION = $$VERSION -} else { - # QMake seems to change how it handles quotes with every version. This works for most systems: - exists($$P/.git): GIT_VERSION = '\\"$$system(git describe --always)\\"' - isEmpty(GIT_VERSION): GIT_VERSION = '\\"$$VERSION\\"' -} +# QMake seems to change how it handles quotes with every version. This works for most systems: +exists($$P/.git): GIT_VERSION = '\\"$$system(git describe --always)\\"' +isEmpty(GIT_VERSION): GIT_VERSION = '\\"$$VERSION\\"' DEFINES += PPSSPP_GIT_VERSION=\"$$GIT_VERSION\" # Optimisations @@ -67,11 +62,6 @@ win32-msvc* { QMAKE_ALLFLAGS_RELEASE += -O3 -ffast-math } -symbian { - # Silence a common warning in system headers. - QMAKE_CXXFLAGS += -Wno-address -} - contains(QT_CONFIG, opengles.) { DEFINES += USING_GLES2 # How else do we know if the environment prefers windows? diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 302107dd90..f9fc5a527a 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -41,10 +41,6 @@ #include "Core/Config.h" #include "UI/GameInfoCache.h" -#ifdef __SYMBIAN32__ -#define unique_ptr auto_ptr -#endif - GameInfoCache *g_gameInfoCache; GameInfo::~GameInfo() { diff --git a/UI/GameInfoCache.h b/UI/GameInfoCache.h index 70eba8749a..a741fb02a8 100644 --- a/UI/GameInfoCache.h +++ b/UI/GameInfoCache.h @@ -52,7 +52,7 @@ enum GameInfoWantFlags { GAMEINFO_WANTSND = 0x04, }; -// TODO: Need to fix c++11 still on Symbian and use std::atomic instead. +// TODO: Need to use std::atomic instead. class CompletionFlag { public: CompletionFlag() : pending(1) { diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index ea77ce17ec..f2f53b333f 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -455,9 +455,9 @@ void GameSettingsScreen::CreateViews() { comboKey->OnClick.Handle(this, &GameSettingsScreen::OnCombo_key); comboKey->SetEnabledPtr(&g_Config.bShowTouchControls); - // On systems that aren't Symbian, iOS, and Maemo, offer to let the user see this button. + // On systems that aren't iOS and Maemo, offer to let the user see this button. // Some Windows touch devices don't have a back button or other button to call up the menu. -#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) +#if !defined(IOS) && !defined(MAEMO) CheckBox *enablePauseBtn = controlsSettings->Add(new CheckBox(&g_Config.bShowTouchPause, co->T("Show Touch Pause Menu Button"))); // Don't allow the user to disable it once in-game, so they can't lock themselves out of the menu. diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index 7b355040bd..8a456159f2 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -616,7 +616,7 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause) { const int roundImage = g_Config.iTouchButtonStyle ? I_ROUND_LINE : I_ROUND; // These platforms always need the pause menu button to be shown. -#if defined(__SYMBIAN32__) || defined(IOS) || defined(MAEMO) +#if defined(IOS) || defined(MAEMO) root->Add(new BoolButton(pause, roundImage, I_ARROW, 1.0f, new AnchorLayoutParams(halfW, 20, NONE, NONE, true)))->SetAngle(90); #endif @@ -628,7 +628,7 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause) { const int stickBg = g_Config.iTouchButtonStyle ? I_STICK_BG_LINE : I_STICK_BG; static const int comboKeyImages[5] = { I_1, I_2, I_3, I_4, I_5 }; -#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) +#if !defined(IOS) && !defined(MAEMO) if (g_Config.bShowTouchPause) root->Add(new BoolButton(pause, roundImage, I_ARROW, 1.0f, new AnchorLayoutParams(halfW, 20, NONE, NONE, true)))->SetAngle(90); #endif diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 5e8cc3ef47..823dfd4145 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -95,10 +95,6 @@ #include "Common/KeyMap.h" #endif -#ifdef __SYMBIAN32__ -#define unique_ptr auto_ptr -#endif - // The new UI framework, for initialization static UI::Theme ui_theme; @@ -340,7 +336,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch // most sense. g_Config.memStickDirectory = std::string(external_dir) + "/"; g_Config.flash0Directory = std::string(external_dir) + "/flash0/"; -#elif defined(__SYMBIAN32__) || defined(MAEMO) || defined(IOS) +#elif defined(MAEMO) || defined(IOS) g_Config.memStickDirectory = user_data_path; g_Config.flash0Directory = std::string(external_dir) + "/flash0/"; #elif !defined(_WIN32) @@ -450,7 +446,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch if (g_Config.currentDirectory == "") { #if defined(ANDROID) g_Config.currentDirectory = external_dir; -#elif defined(__SYMBIAN32__) || defined(MAEMO) || defined(IOS) || defined(_WIN32) +#elif defined(MAEMO) || defined(IOS) || defined(_WIN32) g_Config.currentDirectory = savegame_dir; #else if (getenv("HOME") != NULL) diff --git a/UI/TiltEventProcessor.cpp b/UI/TiltEventProcessor.cpp index 0a3a1abd56..8d8a9fb6f5 100644 --- a/UI/TiltEventProcessor.cpp +++ b/UI/TiltEventProcessor.cpp @@ -42,7 +42,7 @@ inline float clamp(float f) { Tilt TiltEventProcessor::NormalizeTilt(const Tilt &tilt){ // Normalise the accelerometer manually per-platform, to 'g' - #if defined(ANDROID) || defined(__SYMBIAN32__) + #if defined(ANDROID) // Values are in metres per second. Divide by 9.8 to get 'g' value float maxX = 9.8f, maxY = 9.8f; #else diff --git a/b.sh b/b.sh index 0267b81534..0c48c2e3d8 100755 --- a/b.sh +++ b/b.sh @@ -1,15 +1,6 @@ #!/bin/bash CMAKE=1 -# Check Symbian NDK -if [ ! -z "$EPOCROOT" ]; then - QMAKE_ARGS="-spec symbian-sbsv2 ${QMAKE_ARGS}" - CMAKE=0 - PACKAGE=1 - MAKE_OPT="release-gcce ${MAKE_OPT}" - TARGET_OS=Symbian -fi - # Check arguments while test $# -gt 0 do @@ -61,10 +52,6 @@ done if [ ! -z "$TARGET_OS" ]; then echo "Building for $TARGET_OS" BUILD_DIR="$(tr [A-Z] [a-z] <<< build-"$TARGET_OS")" - # HACK (doesn't like shadowed dir) - if [ "$TARGET_OS" == "Symbian" ]; then - BUILD_DIR="Qt" - fi else echo "Building for native host." if [ "$CMAKE" == "0" ]; then @@ -89,9 +76,7 @@ fi make -j4 $MAKE_OPT if [ "$PACKAGE" == "1" ]; then - if [ "$TARGET_OS" == "Symbian" ]; then - make sis - elif [ "$TARGET_OS" == "iOS" ]; then + if [ "$TARGET_OS" == "iOS" ]; then xcodebuild -configuration Release fi fi diff --git a/ext/native/base/QtMain.cpp b/ext/native/base/QtMain.cpp index 7878c8707f..6e973edb6e 100644 --- a/ext/native/base/QtMain.cpp +++ b/ext/native/base/QtMain.cpp @@ -3,7 +3,7 @@ * */ // Qt 4.7+ / 5.0+ implementation of the framework. -// Currently supports: Android, Symbian, Maemo/Meego, Linux, Windows, Mac OSX +// Currently supports: Android, Maemo/Meego, Linux, Windows, Mac OSX #include #include @@ -20,11 +20,6 @@ #endif #endif -#ifdef __SYMBIAN32__ -#include -#include -#include "SymbianMediaKeys.h" -#endif #ifdef SDL #include "SDL/SDLJoystick.h" #include "SDL_audio.h" @@ -47,9 +42,7 @@ extern void mixaudio(void *userdata, Uint8 *stream, int len) { std::string System_GetProperty(SystemProperty prop) { switch (prop) { case SYSPROP_NAME: -#ifdef __SYMBIAN32__ - return "Qt:Symbian"; -#elif defined(MAEMO) +#if defined(MAEMO) return "Qt:Maemo"; #elif defined(ANDROID) return "Qt:Android"; @@ -76,9 +69,7 @@ int System_GetPropertyInt(SystemProperty prop) { case SYSPROP_DISPLAY_REFRESH_RATE: return 60000; case SYSPROP_DEVICE_TYPE: -#ifdef __SYMBIAN32__ - return DEVICE_TYPE_MOBILE; -#elif defined(MAEMO) +#if defined(MAEMO) return DEVICE_TYPE_MOBILE; #elif defined(ANDROID) return DEVICE_TYPE_MOBILE; @@ -119,13 +110,6 @@ void Vibrate(int length_ms) { length_ms = 50; else if (length_ms == -2) length_ms = 25; - // Symbian only for now -#if defined(__SYMBIAN32__) - QFeedbackHapticsEffect effect; - effect.setIntensity(0.8); - effect.setDuration(length_ms); - effect.start(); -#endif } void LaunchBrowser(const char *url) @@ -136,9 +120,7 @@ void LaunchBrowser(const char *url) float CalculateDPIScale() { // Sane default rather than check DPI -#ifdef __SYMBIAN32__ - return 1.4f; -#elif defined(USING_GLES2) +#if defined(USING_GLES2) return 1.2f; #else return 1.0f; @@ -154,11 +136,7 @@ static int mainInternal(QApplication &a) #endif EnableFZ(); // Disable screensaver -#ifdef __SYMBIAN32__ - QSystemScreenSaver ssObject(emugl); - ssObject.setScreenSaverInhibit(); - QScopedPointer mediakeys(new SymbianMediaKeys()); -#elif defined(QT_HAS_SYSTEMINFO) +#if defined(QT_HAS_SYSTEMINFO) QScreenSaver ssObject(emugl); ssObject.setScreenSaverEnabled(false); #endif @@ -473,9 +451,6 @@ int main(int argc, char *argv[]) #if QT_VERSION > QT_VERSION_CHECK(5, 0, 0) savegame_dir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation).toStdString(); assets_dir = QStandardPaths::writableLocation(QStandardPaths::DataLocation).toStdString(); -#elif defined(__SYMBIAN32__) - savegame_dir = "E:/PPSSPP"; - assets_dir = "E:/PPSSPP"; #elif defined(MAEMO) savegame_dir = "/home/user/MyDocs/PPSSPP"; assets_dir = "/opt/PPSSPP"; diff --git a/ext/native/base/SymbianMediaKeys.cpp b/ext/native/base/SymbianMediaKeys.cpp deleted file mode 100644 index 8cb132c49f..0000000000 --- a/ext/native/base/SymbianMediaKeys.cpp +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Copyright (c) 2013 Antti Pohjola - * - */ -//Adds mediakey support for Symbian (volume up/down) - -#include -#include "SymbianMediaKeys.h" -#include "input/keycodes.h" -#include "input/input_state.h" -#include "base/NativeApp.h" - -#define KTimeOut 80 - -SymbianMediaKeys::SymbianMediaKeys() - : CActive ( EPriorityNormal ){ - CActiveScheduler::Add( this ); - iInterfaceSelector = CRemConInterfaceSelector::NewL(); - iRemConCore = CRemConCoreApiTarget::NewL(*iInterfaceSelector, *this); - iInterfaceSelector->OpenTargetL(); - - playtimer = new QTimer(this); - connect(playtimer, SIGNAL(timeout()), this, SLOT(playtimerexpired())); - stoptimer = new QTimer(this); - connect(stoptimer, SIGNAL(timeout()), this, SLOT(stoptimerexpired())); - forwardtimer = new QTimer(this); - connect(forwardtimer, SIGNAL(timeout()), this, SLOT(forwardtimerexpired())); - backwardtimer = new QTimer(this); - connect(backwardtimer, SIGNAL(timeout()), this, SLOT(backwardtimerexpired())); - voluptimer = new QTimer(this); - connect(voluptimer, SIGNAL(timeout()), this, SLOT(voluptimerexpired())); - voldowntimer = new QTimer(this); - connect(voldowntimer, SIGNAL(timeout()), this, SLOT(voldowntimerexpired())); -} - -SymbianMediaKeys::~SymbianMediaKeys(){ - delete iInterfaceSelector; - iRemConCore = NULL; //owned by interfaceselector - Cancel(); - iResponseQ.Reset(); - iResponseQ.Close(); -} - -void SymbianMediaKeys::subscribeKeyEvent(QObject* aObject ){ - receiver = aObject; -} - -/* - * it seems that it takes about 600ms to get an update after buttonpress - * */ -void SymbianMediaKeys::MrccatoCommand(TRemConCoreApiOperationId aOperationId,TRemConCoreApiButtonAction aButtonAct){ - TRequestStatus status; - switch( aOperationId ){ - case ERemConCoreApiPausePlayFunction: - { - switch (aButtonAct){ - case ERemConCoreApiButtonPress: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PLAY_PAUSE, KEY_DOWN)); - break; - case ERemConCoreApiButtonRelease: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PLAY_PAUSE, KEY_UP)); - break; - case ERemConCoreApiButtonClick: - playtimer->start(KTimeOut); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PLAY_PAUSE, KEY_DOWN)); - break; - default: - // Play/Pause unknown action - break; - } - break; - } - - case ERemConCoreApiStop: - { - switch (aButtonAct){ - case ERemConCoreApiButtonPress: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_STOP, KEY_DOWN)); - break; - case ERemConCoreApiButtonRelease: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_STOP, KEY_UP)); - break; - case ERemConCoreApiButtonClick: - stoptimer->start(KTimeOut); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_STOP, KEY_DOWN)); - break; - default: - break; - } - break; - } - case ERemConCoreApiRewind: - { - switch (aButtonAct){ - case ERemConCoreApiButtonPress: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PREVIOUS, KEY_DOWN)); - break; - case ERemConCoreApiButtonRelease: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PREVIOUS, KEY_UP)); - break; - case ERemConCoreApiButtonClick: - backwardtimer->start(KTimeOut); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PREVIOUS, KEY_DOWN)); - default: - break; - } - break; - } - case ERemConCoreApiFastForward: - { - switch (aButtonAct){ - case ERemConCoreApiButtonPress: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_NEXT, KEY_DOWN)); - break; - case ERemConCoreApiButtonRelease: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_NEXT, KEY_UP)); - break; - case ERemConCoreApiButtonClick: - forwardtimer->start(KTimeOut); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_NEXT, KEY_DOWN)); - default: - break; - } - break; - } - case ERemConCoreApiVolumeUp: - { - switch (aButtonAct){ - case ERemConCoreApiButtonPress: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_VOLUME_UP, KEY_DOWN)); - break; - case ERemConCoreApiButtonRelease: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_VOLUME_UP, KEY_UP)); - break; - case ERemConCoreApiButtonClick: - voluptimer->start(KTimeOut); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_VOLUME_UP, KEY_DOWN)); - default: - break; - } - break; - } - case ERemConCoreApiVolumeDown: - { - switch (aButtonAct){ - case ERemConCoreApiButtonPress: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_VOLUME_DOWN, KEY_DOWN)); - break; - case ERemConCoreApiButtonRelease: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_VOLUME_DOWN, KEY_UP)); - break; - case ERemConCoreApiButtonClick: - voldowntimer->start(KTimeOut); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_VOLUME_DOWN, KEY_DOWN)); - default: - break; - } - break; - } - case ERemConCoreApiBackward: - { - switch (aButtonAct) - { - case ERemConCoreApiButtonPress: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PREVIOUS, KEY_DOWN)); - break; - case ERemConCoreApiButtonRelease: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PREVIOUS, KEY_UP)); - break; - case ERemConCoreApiButtonClick: - backwardtimer->start(KTimeOut); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PREVIOUS, KEY_DOWN)); - default: - break; - } - break; - } - case ERemConCoreApiForward: - { - switch (aButtonAct) - { - case ERemConCoreApiButtonPress: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_NEXT, KEY_DOWN)); - break; - case ERemConCoreApiButtonRelease: - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_NEXT, KEY_UP)); - break; - case ERemConCoreApiButtonClick: - forwardtimer->start(KTimeOut); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_NEXT, KEY_DOWN)); - default: - break; - } - break; - } - - default: - break; - } - //complete key event - CompleteMediaKeyEvent( aOperationId ); -} - -void SymbianMediaKeys::MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed,TRemConCoreApiButtonAction aButtonAct){ - -} - -void SymbianMediaKeys::MrccatoTuneFunction(TBool aTwoPart, TUint aMajorChannel,TUint aMinorChannel,TRemConCoreApiButtonAction aButtonAct){ - -} - -void SymbianMediaKeys::MrccatoSelectDiskFunction(TUint aDisk, TRemConCoreApiButtonAction aButtonAct){ - -} - -void SymbianMediaKeys::MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber,TRemConCoreApiButtonAction aButtonAct){ - -} - -void SymbianMediaKeys::MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber,TRemConCoreApiButtonAction aButtonAct){ - -} - -void SymbianMediaKeys::CompleteMediaKeyEvent( TRemConCoreApiOperationId aOperationId ){ - if( !IsActive() ){ - switch ( aOperationId ) - { - case ERemConCoreApiVolumeUp: - { - iRemConCore->VolumeUpResponse( iStatus, KErrNone ); - SetActive(); - break; - } - - case ERemConCoreApiVolumeDown: - { - iRemConCore->VolumeDownResponse( iStatus, KErrNone ); - SetActive(); - break; - } - case ERemConCoreApiPlay: - { - iRemConCore-> PlayResponse(iStatus, KErrNone); - SetActive(); - break; - } - case ERemConCoreApiStop: - { - iRemConCore->StopResponse(iStatus, KErrNone); - SetActive(); - break; - } - case ERemConCoreApiPause: - { - iRemConCore->PauseResponse(iStatus, KErrNone); - SetActive(); - break; - } - case ERemConCoreApiRewind: - { - iRemConCore->RewindResponse(iStatus, KErrNone); - SetActive(); - break; - } - case ERemConCoreApiFastForward: - { - iRemConCore->FastForwardResponse(iStatus, KErrNone); - SetActive(); - break; - } - case ERemConCoreApiForward: - { - iRemConCore->ForwardResponse( iStatus, KErrNone ); - SetActive(); - break; - } - case ERemConCoreApiBackward: - { - iRemConCore->BackwardResponse(iStatus, KErrNone ); - SetActive(); - break; - } - default: - break; - } - } - else{ - //active, append to queue - iResponseQ.Append( aOperationId ); - } -} - -void SymbianMediaKeys::RunL(){ - if ( iResponseQ.Count() ){ - CompleteMediaKeyEvent( iResponseQ[0] ); - //remove old response from que - iResponseQ.Remove(0); - iResponseQ.Compress(); - } -} - -void SymbianMediaKeys::DoCancel(){ -} - -void SymbianMediaKeys::playtimerexpired(){ - playtimer->stop(); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PLAY_PAUSE, KEY_UP)); -} - -void SymbianMediaKeys::stoptimerexpired(){ - stoptimer->stop(); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_STOP, KEY_UP)); -} - -void SymbianMediaKeys::forwardtimerexpired(){ - forwardtimer->stop(); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_NEXT, KEY_UP)); -} - -void SymbianMediaKeys::backwardtimerexpired(){ - backwardtimer->stop(); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_MEDIA_PREVIOUS, KEY_UP)); -} - -void SymbianMediaKeys::voluptimerexpired(){ - voluptimer->stop(); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_VOLUME_UP, KEY_UP)); -} - -void SymbianMediaKeys::voldowntimerexpired(){ - voldowntimer->stop(); - NativeKey(KeyInput(DEVICE_ID_KEYBOARD, NKCODE_VOLUME_DOWN, KEY_UP)); -} diff --git a/ext/native/base/SymbianMediaKeys.h b/ext/native/base/SymbianMediaKeys.h deleted file mode 100644 index 415d00ac8c..0000000000 --- a/ext/native/base/SymbianMediaKeys.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2013 Antti Pohjola - * - */ -//Adds mediakey support for Symbian (volume up/down) - -#ifndef SYMBIANMEDIAKEYS_H_ -#define SYMBIANMEDIAKEYS_H_ - -#include -#include -#include - -#include // link against RemConCoreApi.lib -#include // and -#include // RemConInterfaceBase.lib - -class SymbianMediaKeys: public QObject, public CActive, public MRemConCoreApiTargetObserver -{ - Q_OBJECT -public: - SymbianMediaKeys(); - virtual ~SymbianMediaKeys(); - -public: - void subscribeKeyEvent(QObject* aObject ); - -public: //From MRemConCoreApiTargetObserver - void MrccatoCommand(TRemConCoreApiOperationId aOperationId,TRemConCoreApiButtonAction aButtonAct); - - void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed,TRemConCoreApiButtonAction aButtonAct); - - void MrccatoTuneFunction(TBool aTwoPart,TUint aMajorChannel,TUint aMinorChannel,TRemConCoreApiButtonAction aButtonAct); - - void MrccatoSelectDiskFunction(TUint aDisk,TRemConCoreApiButtonAction aButtonAct); - - void MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber,TRemConCoreApiButtonAction aButtonAct); - - void MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber,TRemConCoreApiButtonAction aButtonAct); - -private: - void CompleteMediaKeyEvent( TRemConCoreApiOperationId aOperationId ); - void RunL(); - void DoCancel(); - -public slots: - void playtimerexpired(); - void stoptimerexpired(); - void forwardtimerexpired(); - void backwardtimerexpired(); - void voluptimerexpired(); - void voldowntimerexpired(); -private: - - RArray iResponseQ; //response queue - - CRemConCoreApiTarget* iRemConCore; //the controller - CRemConInterfaceSelector* iInterfaceSelector; - - QObject* receiver; - - QTimer* playtimer; - QTimer* stoptimer; - QTimer* forwardtimer; - QTimer* backwardtimer; - QTimer* voluptimer; - QTimer* voldowntimer; -}; - -#endif /* SYMBIANMEDIAKEYS_H_ */ diff --git a/ext/native/base/functional.h b/ext/native/base/functional.h index d85cfc4d26..b9a85f3f4e 100644 --- a/ext/native/base/functional.h +++ b/ext/native/base/functional.h @@ -6,30 +6,16 @@ #pragma once #include -#ifdef __SYMBIAN32__ -#include -#include -#include -#else #include -#endif #include -#if defined(__SYMBIAN32__) || defined(MACGNUSTD) -#ifndef __SYMBIAN32__ +#if defined(MACGNUSTD) #include #include -#endif namespace std { -#ifdef __SYMBIAN32__ - using boost::bind; - using boost::function; - using boost::shared_ptr; -#else using tr1::bind; using tr1::function; using tr1::shared_ptr; -#endif template inline shared_ptr make_shared() @@ -45,9 +31,5 @@ namespace std { } #endif -#ifdef __SYMBIAN32__ -#define placeholder -#else namespace placeholder = std::placeholders; -#endif diff --git a/ext/native/base/logging.h b/ext/native/base/logging.h index c96a5905a8..8198719013 100644 --- a/ext/native/base/logging.h +++ b/ext/native/base/logging.h @@ -68,18 +68,6 @@ void OutputDebugStringUTF8(const char *p); #define MessageBox(a, b, c, d) __android_log_print(ANDROID_LOG_INFO, APP_NAME, "%s %s", (b), (c)); -#elif defined(__SYMBIAN32__) -#include -#ifdef _DEBUG -#define DLOG(...) { qDebug(__VA_ARGS__);} -#else -#define DLOG(...) -#endif -#define ILOG(...) { qDebug(__VA_ARGS__);} -#define WLOG(...) { qDebug(__VA_ARGS__);} -#define ELOG(...) { qDebug(__VA_ARGS__);} -#define FLOG(...) { qDebug(__VA_ARGS__); Crash();} - #else #ifdef _WIN32 diff --git a/ext/native/ext/libzip/zip.h b/ext/native/ext/libzip/zip.h index 78b8519918..9128d01c4d 100644 --- a/ext/native/ext/libzip/zip.h +++ b/ext/native/ext/libzip/zip.h @@ -59,14 +59,6 @@ extern "C" { #include #include -#ifdef __SYMBIAN32__ -#define _stat stat -#define _wcsdup wcsdup -#define _wfopen wfopen -#define _wremove wremove -#define _wstat wstat -#endif - /* flags for zip_open */ diff --git a/ext/native/file/file_util.cpp b/ext/native/file/file_util.cpp index 36a9cc8d09..b6bea7924b 100644 --- a/ext/native/file/file_util.cpp +++ b/ext/native/file/file_util.cpp @@ -29,23 +29,6 @@ #define stat64 stat #endif -// Hack -#ifdef __SYMBIAN32__ -static inline int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) { - struct dirent *readdir_entry; - - readdir_entry = readdir(dirp); - if (readdir_entry == NULL) { - *result = NULL; - return errno; - } - - *entry = *readdir_entry; - *result = entry; - return 0; -} -#endif - FILE *openCFile(const std::string &filename, const char *mode) { #if defined(_WIN32) && defined(UNICODE) diff --git a/ext/native/file/free.cpp b/ext/native/file/free.cpp index 9522fff346..010cd56865 100644 --- a/ext/native/file/free.cpp +++ b/ext/native/file/free.cpp @@ -10,9 +10,6 @@ #include #include #define statvfs statfs -#elif defined(__SYMBIAN32__) -#include -QTM_USE_NAMESPACE #else #include #endif @@ -31,10 +28,6 @@ bool free_disk_space(const std::string &dir, uint64_t &space) { space = free.QuadPart; return true; } -#elif defined(__SYMBIAN32__) - QSystemStorageInfo storageInfo; - space = (uint64_t)storageInfo.availableDiskSpace("E"); - return true; #else struct statvfs diskstat; int res = statvfs(dir.c_str(), &diskstat); @@ -53,4 +46,4 @@ bool free_disk_space(const std::string &dir, uint64_t &space) { // We can't know how much is free. return false; -} \ No newline at end of file +} diff --git a/ext/native/gfx_es2/glsl_program.cpp b/ext/native/gfx_es2/glsl_program.cpp index cc85acb820..274afa396c 100644 --- a/ext/native/gfx_es2/glsl_program.cpp +++ b/ext/native/gfx_es2/glsl_program.cpp @@ -75,7 +75,7 @@ GLSLProgram *glsl_create_source(const char *vshader_src, const char *fshader_src } // Not wanting to change ReadLocalFile semantics. -// Needs to use delete [], not delete like auto_ptr, and can't use unique_ptr because of Symbian. +// TODO: Use C++11 unique_ptr, remove delete[] struct AutoCharArrayBuf { AutoCharArrayBuf(char *buf = nullptr) : buf_(buf) { } diff --git a/ext/native/math/math_util.cpp b/ext/native/math/math_util.cpp index 399d1d8d24..11eb15b215 100644 --- a/ext/native/math/math_util.cpp +++ b/ext/native/math/math_util.cpp @@ -1,11 +1,8 @@ #include "math/math_util.h" #include -#ifdef __SYMBIAN32__ -#include -#endif // QNX can only use RunFast mode and it is already the default. -#if defined(__ARM_ARCH_7A__) && !defined(__SYMBIAN32__) +#if defined(__ARM_ARCH_7A__) // Enables 'RunFast' VFP mode. void EnableFZ() { int x; @@ -39,10 +36,6 @@ void FPU_SetFastMode() { #else void EnableFZ() { -#ifdef __SYMBIAN32__ - // Set RunFast hardware mode for Symbian VFPv2. - User::SetFloatingPointMode(EFpModeRunFast); -#endif // TODO } diff --git a/ext/native/thread/thread.h b/ext/native/thread/thread.h index 1a1b37615d..2596a0aa16 100644 --- a/ext/native/thread/thread.h +++ b/ext/native/thread/thread.h @@ -5,7 +5,7 @@ #define GCC_VER(x,y,z) ((x) * 10000 + (y) * 100 + (z)) #define GCC_VERSION GCC_VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ && !defined(ANDROID) && !defined(__SYMBIAN32__) +#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__ && !defined(ANDROID) // GCC 4.4 provides #ifndef _GLIBCXX_USE_SCHED_YIELD #define _GLIBCXX_USE_SCHED_YIELD diff --git a/ext/native/ui/view.h b/ext/native/ui/view.h index 7611326405..1345f8db75 100644 --- a/ext/native/ui/view.h +++ b/ext/native/ui/view.h @@ -25,10 +25,6 @@ #undef small -#ifdef __SYMBIAN32__ -#define unique_ptr auto_ptr -#endif - struct KeyInput; struct TouchInput; struct AxisInput; diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 3278c3f856..c36f9052d9 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -358,8 +358,7 @@ int main(int argc, const char* argv[]) InitSysDirectories(); #endif -#if defined(ANDROID) || defined(__SYMBIAN32__) -#elif !defined(_WIN32) +#if !defined(ANDROID) && !defined(_WIN32) g_Config.memStickDirectory = std::string(getenv("HOME")) + "/.ppsspp/"; #endif