From ea17e17ebdbe13aa014abc29f42631a216bdca9f Mon Sep 17 00:00:00 2001 From: Sacha Date: Wed, 18 Jun 2014 03:42:31 +1000 Subject: [PATCH] Join both Maemo platforms (Maemo5 + Meego Harmattan/Maemo 6) to MAEMO define. Technically they are very similar and anything that wasn't already defined for both probably needed to be. --- Common/MemArena.cpp | 2 +- Core/Config.cpp | 2 +- Core/Config.h | 2 +- Core/MemMap.h | 2 +- Core/Reporting.cpp | 4 ++-- Qt/Settings.pri | 4 ++-- UI/GameSettingsScreen.cpp | 4 ++-- UI/GamepadEmu.cpp | 2 +- UI/NativeApp.cpp | 4 ++-- ext/xbrz/xbrz.cpp | 8 -------- native | 2 +- 11 files changed, 14 insertions(+), 22 deletions(-) diff --git a/Common/MemArena.cpp b/Common/MemArena.cpp index 262af0736c..1414afe549 100644 --- a/Common/MemArena.cpp +++ b/Common/MemArena.cpp @@ -97,7 +97,7 @@ int ashmem_unpin_region(int fd, size_t offset, size_t len) #ifndef _WIN32 // do not make this "static" -#if defined(MAEMO) || defined(MEEGO_EDITION_HARMATTAN) +#ifdef MAEMO std::string ram_temp_file = "/home/user/gc_mem.tmp"; #else std::string ram_temp_file = "/tmp/gc_mem.tmp"; diff --git a/Core/Config.cpp b/Core/Config.cpp index 40dfc82815..b3422d79d4 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -441,7 +441,7 @@ static ConfigSetting controlSettings[] = { ConfigSetting("ShowAnalogStick", &g_Config.bShowTouchAnalogStick, true), ConfigSetting("ShowTouchDpad", &g_Config.bShowTouchDpad, true), ConfigSetting("ShowTouchUnthrottle", &g_Config.bShowTouchUnthrottle, true), -#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MEEGO_EDITION_HARMATTAN) +#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) ConfigSetting("ShowTouchPause", &g_Config.bShowTouchPause, false), #endif #if defined(USING_WIN_UI) diff --git a/Core/Config.h b/Core/Config.h index 276a77e53f..254b5cac0b 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -239,7 +239,7 @@ public: bool bShowTouchAnalogStick; bool bShowTouchDpad; -#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MEEGO_EDITION_HARMATTAN) +#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) bool bShowTouchPause; #endif diff --git a/Core/MemMap.h b/Core/MemMap.h index c0f76e0817..830a6a77b1 100644 --- a/Core/MemMap.h +++ b/Core/MemMap.h @@ -20,7 +20,7 @@ #include #ifdef __SYMBIAN32__ #include -#elif defined(MEEGO_EDITION_HARMATTAN) +#elif defined(MAEMO) #include #endif diff --git a/Core/Reporting.cpp b/Core/Reporting.cpp index e4fbf11bdb..cd7e25669f 100644 --- a/Core/Reporting.cpp +++ b/Core/Reporting.cpp @@ -200,8 +200,8 @@ namespace Reporting return "Blackberry"; #elif defined(LOONGSON) return "Loongson"; -#elif defined(MEEGO_EDITION_HARMATTAN) - return "Nokia N9/N950"; +#elif defined(MAEMO) + return "Nokia Maemo"; #elif defined(__linux__) return "Linux"; #else diff --git a/Qt/Settings.pri b/Qt/Settings.pri index a3e585d2fc..46787ab4f8 100644 --- a/Qt/Settings.pri +++ b/Qt/Settings.pri @@ -63,8 +63,8 @@ contains(QT_CONFIG, opengles.) { } # Platform specific -contains(MEEGO_EDITION,harmattan): DEFINES += MEEGO_EDITION_HARMATTAN "_SYS_UCONTEXT_H=1" -maemo5: DEFINES += MAEMO +contains(MEEGO_EDITION,harmattan): DEFINES += "_SYS_UCONTEXT_H=1" +maemo: DEFINES += MAEMO macx: INCLUDEPATH += $$P/ffmpeg/macosx/x86_64/include ios: INCLUDEPATH += $$P/ffmpeg/ios/universal/include diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index cb35269078..56b172bbb9 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -315,9 +315,9 @@ void GameSettingsScreen::CreateViews() { layoutEditorChoice_->OnClick.Handle(this, &GameSettingsScreen::OnTouchControlLayout); layoutEditorChoice_->SetEnabledPtr(&g_Config.bShowTouchControls); - // On systems that aren't Symbian, iOS, and Meego Harmattan, offer to let the user see this button. + // On systems that aren't Symbian, 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(MEEGO_EDITION_HARMATTAN) +#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) CheckBox *enablePauseBtn = controlsSettings->Add(new CheckBox(&g_Config.bShowTouchPause, c->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 ad31453948..11dac31c05 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -461,7 +461,7 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause) { int stickImage = g_Config.iTouchButtonStyle ? I_STICK_LINE : I_STICK; int stickBg = g_Config.iTouchButtonStyle ? I_STICK_BG_LINE : I_STICK_BG; -#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MEEGO_EDITION_HARMATTAN) +#if !defined(__SYMBIAN32__) && !defined(IOS) && !defined(MAEMO) if (g_Config.bShowTouchPause) #endif root->Add(new BoolButton(pause, roundImage, I_ARROW, 1.0f, new AnchorLayoutParams(halfW, 20, NONE, NONE, true)))->SetAngle(90); diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index f09e002b41..55df4e4578 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -264,7 +264,7 @@ void NativeInit(int argc, const char *argv[], // most sense. g_Config.memCardDirectory = std::string(external_directory) + "/"; g_Config.flash0Directory = std::string(external_directory) + "/flash0/"; -#elif defined(BLACKBERRY) || defined(__SYMBIAN32__) || defined(MEEGO_EDITION_HARMATTAN) || defined(IOS) +#elif defined(BLACKBERRY) || defined(__SYMBIAN32__) || defined(MAEMO) || defined(IOS) g_Config.memCardDirectory = user_data_path; g_Config.flash0Directory = std::string(external_directory) + "/flash0/"; #elif !defined(_WIN32) @@ -359,7 +359,7 @@ void NativeInit(int argc, const char *argv[], if (g_Config.currentDirectory == "") { #if defined(ANDROID) g_Config.currentDirectory = external_directory; -#elif defined(BLACKBERRY) || defined(__SYMBIAN32__) || defined(MEEGO_EDITION_HARMATTAN) || defined(IOS) || defined(_WIN32) +#elif defined(BLACKBERRY) || defined(__SYMBIAN32__) || defined(MAEMO) || defined(IOS) || defined(_WIN32) g_Config.currentDirectory = savegame_directory; #else g_Config.currentDirectory = getenv("HOME"); diff --git a/ext/xbrz/xbrz.cpp b/ext/xbrz/xbrz.cpp index 48ea561121..111fed66b9 100644 --- a/ext/xbrz/xbrz.cpp +++ b/ext/xbrz/xbrz.cpp @@ -522,11 +522,7 @@ BlendResult preProcessCorners(const Kernel_4x4& ker, const xbrz::ScalerCfg& cfg) ker.g == ker.k)) return result; -#ifdef MEEGO_EDITION_HARMATTAN -#define dist(col1, col2) colorDist(col1, col2, cfg.luminanceWeight_) -#else auto dist = [&](uint32_t col1, uint32_t col2) { return colorDist(col1, col2, cfg.luminanceWeight_); }; -#endif const int weight = 4; double jg = dist(ker.i, ker.f) + dist(ker.f, ker.c) + dist(ker.n, ker.k) + dist(ker.k, ker.h) + weight * dist(ker.j, ker.g); @@ -646,12 +642,8 @@ void scalePixel(const Kernel_3x3& ker, if (getBottomR(blend) >= BLEND_NORMAL) { -#ifdef MEEGO_EDITION_HARMATTAN -#define eq(col1, col2) (colorDist(col1, col2, cfg.luminanceWeight_) < cfg.equalColorTolerance_) -#else auto eq = [&](uint32_t col1, uint32_t col2) { return colorDist(col1, col2, cfg.luminanceWeight_) < cfg.equalColorTolerance_; }; auto dist = [&](uint32_t col1, uint32_t col2) { return colorDist(col1, col2, cfg.luminanceWeight_); }; -#endif bool doLineBlend = true; if (getBottomR(blend) < BLEND_DOMINANT) diff --git a/native b/native index 1509ddd2ba..58020174b1 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 1509ddd2ba714da273576690e08449428549c4e9 +Subproject commit 58020174b12d0361a8457bb3e8691402660e4ee5