mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Merge branch 'master' into mac
# Conflicts: # AerofoilSDL/GpDisplayDriver_SDL_GL2.cpp # PortabilityLayer/MenuManager.cpp
This commit is contained in:
@@ -233,11 +233,12 @@ void DoAboutOpenSource(void)
|
||||
static const int kOpenSansLicenseButton = 8;
|
||||
static const int kRobotoMonoLicenseButton = 10;
|
||||
static const int kGochiHandLicenseButton = 12;
|
||||
static const int kLibIConvLicenseButton = 14;
|
||||
static const int kRapidJSONLicenseButton = 16;
|
||||
static const int kZLibLicenseButton = 18;
|
||||
static const int kFreeTypeLicenseButton = 20;
|
||||
static const int kSDLLicenseButton = 22;
|
||||
static const int kInterLicenseButton = 14;
|
||||
static const int kLibIConvLicenseButton = 16;
|
||||
static const int kRapidJSONLicenseButton = 18;
|
||||
static const int kZLibLicenseButton = 20;
|
||||
static const int kFreeTypeLicenseButton = 22;
|
||||
static const int kSDLLicenseButton = 24;
|
||||
|
||||
static const int kLicenseResourceApache = 1000;
|
||||
static const int kLicenseResourceGPLv2 = 1001;
|
||||
@@ -249,7 +250,7 @@ void DoAboutOpenSource(void)
|
||||
|
||||
static const int kAboutOpenSourceDialogTemplateID = 2005;
|
||||
|
||||
const Rect windowRect = Rect::Create(0, 0, 324, 512);
|
||||
const Rect windowRect = Rect::Create(0, 0, 348, 512);
|
||||
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(windowRect, PortabilityLayer::WindowStyleFlags::kAlert, true, 0, 0, PSTR(""));
|
||||
|
||||
@@ -281,6 +282,7 @@ void DoAboutOpenSource(void)
|
||||
DoLicenseReader(kLicenseResourceApache);
|
||||
break;
|
||||
case kGochiHandLicenseButton:
|
||||
case kInterLicenseButton:
|
||||
DoLicenseReader(kLicenseResourceOFL);
|
||||
break;
|
||||
case kLibIConvLicenseButton:
|
||||
|
||||
@@ -145,7 +145,7 @@ void HandleKeyEvent (const KeyDownStates &keyStates, const GpKeyboardInputEvent
|
||||
{
|
||||
const intptr_t theChar = PackVOSKeyCode(theEvent);
|
||||
const bool shiftDown = keyStates.IsSet(PL_KEY_EITHER_SPECIAL(kShift));
|
||||
const bool commandDown = keyStates.IsSet(PL_KEY_EITHER_SPECIAL(kControl));
|
||||
const bool commandDown = keyStates.IsSet(PL_KEY_SHORTCUT);
|
||||
const bool optionDown = keyStates.IsSet(PL_KEY_EITHER_SPECIAL(kAlt));
|
||||
|
||||
if ((commandDown) && (!optionDown))
|
||||
@@ -424,7 +424,7 @@ void HandleEvent (void)
|
||||
bool itHappened = true;
|
||||
|
||||
const KeyDownStates *eventKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
if ((eventKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl))) &&
|
||||
if ((eventKeys->IsSet(PL_KEY_SHORTCUT)) &&
|
||||
(eventKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))))
|
||||
{
|
||||
HiliteAllObjects();
|
||||
|
||||
@@ -228,7 +228,7 @@ void DoGameOverStarAnimation (void)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if ((theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift))))
|
||||
if ((theKeys->IsSet(PL_KEY_SHORTCUT)) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift))))
|
||||
noInteruption = false;
|
||||
|
||||
if (PortabilityLayer::EventQueue::GetInstance()->Dequeue(&theEvent))
|
||||
@@ -475,7 +475,7 @@ void DoDiedGameOver (void)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if ((theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl))) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift))))
|
||||
if ((theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))) || (theKeys->IsSet(PL_KEY_SHORTCUT)) || (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift))))
|
||||
{
|
||||
pagesStuck = 8;
|
||||
userAborted = true;
|
||||
|
||||
@@ -370,7 +370,7 @@ void DoPause (void)
|
||||
if ((isEscPauseKey && theKeys->IsSet(PL_KEY_SPECIAL(kEscape))) ||
|
||||
(!isEscPauseKey && theKeys->IsSet(PL_KEY_SPECIAL(kTab))))
|
||||
paused = false;
|
||||
else if (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)))
|
||||
else if (theKeys->IsSet(PL_KEY_SHORTCUT))
|
||||
DoCommandKey();
|
||||
|
||||
Delay(1, nullptr);
|
||||
@@ -480,7 +480,7 @@ void DoHeliumEngaged (gliderPtr thisGlider)
|
||||
|
||||
#else
|
||||
|
||||
if (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)))
|
||||
if (theKeys->IsSet(PL_KEY_SHORTCUT))
|
||||
DoCommandKey();
|
||||
|
||||
// Cheesy - Use touchscreen menu as quit
|
||||
@@ -568,7 +568,7 @@ void GetInput (gliderPtr thisGlider)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)))
|
||||
if (theKeys->IsSet(PL_KEY_SHORTCUT))
|
||||
DoCommandKey();
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#define kPrefsVersion 0x0039
|
||||
#define kPrefsVersion 0x003a
|
||||
|
||||
|
||||
void ReadInPrefs (void);
|
||||
@@ -537,9 +537,6 @@ int AppStartup()
|
||||
ToolBoxInit();
|
||||
CheckOurEnvirons();
|
||||
|
||||
if (thisMac.isTouchscreen)
|
||||
PortabilityLayer::MenuManager::GetInstance()->SetMenuTouchScreenStyle(true);
|
||||
|
||||
if (!thisMac.hasColor)
|
||||
RedAlert(kErrNeedColorQD);
|
||||
if (!thisMac.hasSystem7)
|
||||
@@ -686,4 +683,4 @@ int gpAppMain()
|
||||
HandleEvent();
|
||||
|
||||
return AppShutdown();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2664,7 +2664,7 @@ void HiliteAllObjects (void)
|
||||
{
|
||||
Delay(1, nullptr);
|
||||
}
|
||||
while ((theseKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl))) &&
|
||||
while ((theseKeys->IsSet(PL_KEY_SHORTCUT)) &&
|
||||
(theseKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt))));
|
||||
|
||||
for (i = 0; i < kMaxRoomObs; i++)
|
||||
|
||||
@@ -470,7 +470,7 @@ Boolean WaitForInputEvent (short seconds)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if (theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)) || theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt)) || theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift)))
|
||||
if (theKeys->IsSet(PL_KEY_SHORTCUT) || theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kAlt)) || theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kShift)))
|
||||
waiting = false;
|
||||
|
||||
if (PortabilityLayer::EventQueue::GetInstance()->Dequeue(&theEvent))
|
||||
@@ -501,7 +501,7 @@ void WaitCommandQReleased (void)
|
||||
{
|
||||
const KeyDownStates *theKeys = PortabilityLayer::InputManager::GetInstance()->GetKeys();
|
||||
|
||||
if (!theKeys->IsSet(PL_KEY_EITHER_SPECIAL(kControl)) || !theKeys->IsSet(PL_KEY_ASCII('Q')))
|
||||
if (!theKeys->IsSet(PL_KEY_SHORTCUT) || !theKeys->IsSet(PL_KEY_ASCII('Q')))
|
||||
waiting = false;
|
||||
|
||||
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||
@@ -554,6 +554,8 @@ static const char *gs_specialKeyNames[GpKeySpecials::kCount] =
|
||||
"rt ctrl",
|
||||
"lf alt",
|
||||
"rt alt",
|
||||
"lf cmd",
|
||||
"rt cmd",
|
||||
"num lock",
|
||||
"lf arrow",
|
||||
"up arrow",
|
||||
|
||||
Reference in New Issue
Block a user