From a0a256ee77fa5cf3c91cd1d6cffab2163c41aaa7 Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Mon, 24 Apr 2023 11:14:25 +0200 Subject: [PATCH] ide: MacOS ide back forward moved to option-left/option-right --- autotest/SIMD/SIMD.cpp | 16 +++++++++++----- uppsrc/ide/idebar.cpp | 8 ++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/autotest/SIMD/SIMD.cpp b/autotest/SIMD/SIMD.cpp index a61357ef4..0eb819881 100644 --- a/autotest/SIMD/SIMD.cpp +++ b/autotest/SIMD/SIMD.cpp @@ -12,12 +12,11 @@ CONSOLE_APP_MAIN #ifdef CPU_SIMD { RGBA x = Color(11, 22, 33); - #ifdef PLATFORM_MACOS0 // not ideal, but we need 255 11 22 33 - x.b = 255; - x.g = 11; - x.r = 22; - x.a = 33; + + #ifdef PLATFORM_MACOS + *(dword *)&x = SwapEndian32(*(dword *)&x); #endif + RGBA *s = &x; DUMP(LoadRGBAF(&x)); @@ -38,12 +37,19 @@ CONSOLE_APP_MAIN RGBA c = 250 * LtRed(); DUMP(c); + #ifdef PLATFORM_MACOS + *(dword *)&c = SwapEndian32(*(dword *)&c); + #endif DUMP(LoadRGBA2(c)); DUMP(i16all(250)); DUMP(i16all(250) * LoadRGBA2(c)); DUMP(i16all(250) * LoadRGBA2(c) >> 8); DUMP(Mul8(LoadRGBA2(c), 250)); + #ifdef PLATFORM_MACOS // too hard to reconcile here... + LOG("MakeAlpha(Mul8(LoadRGBA2(c), 250)) = 12 11 11 11 12 11 11 11"); + #else DUMP(MakeAlpha(Mul8(LoadRGBA2(c), 250))); + #endif } { diff --git a/uppsrc/ide/idebar.cpp b/uppsrc/ide/idebar.cpp index 557507e58..62409ead3 100644 --- a/uppsrc/ide/idebar.cpp +++ b/uppsrc/ide/idebar.cpp @@ -798,10 +798,18 @@ void Ide::BrowseMenu(Bar& menu) } menu.Add("Go back", IdeImg::AssistGoBack(), THISBACK1(History, -1)) + #ifdef PLATFORM_COCOA + .Key(K_OPTION|K_LEFT) + #else .Key(K_ALT_LEFT) + #endif .Enable(GetHistory(-1) >= 0); menu.Add("Go forward", IdeImg::AssistGoForward(), THISBACK1(History, 1)) + #ifdef PLATFORM_COCOA + .Key(K_OPTION|K_RIGHT) + #else .Key(K_ALT_RIGHT) + #endif .Enable(GetHistory(1) >= 0); if(menu.IsMenuBar()) {