mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c95be907de | ||
|
3fd7fabb98 | ||
|
53ecdabb43 | ||
|
7bf6147fa1 | ||
|
a77e1d868f | ||
|
c14d904ca7 |
@@ -74,7 +74,7 @@
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "Adjust resolution to fit window",
|
||||
"name" : "Scale to fit window",
|
||||
"itemType" : "CheckBox",
|
||||
"pos" : [ 8, 105 ],
|
||||
"size" : [ 256, 18 ],
|
||||
@@ -97,6 +97,14 @@
|
||||
"id" : 0,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "Full screen mode",
|
||||
"itemType" : "CheckBox",
|
||||
"pos" : [ 8, 172 ],
|
||||
"size" : [ 256, 18 ],
|
||||
"id" : 0,
|
||||
"enabled" : true
|
||||
},
|
||||
{
|
||||
"name" : "",
|
||||
"itemType" : "UserItem",
|
||||
|
@@ -166,7 +166,7 @@ void BringUpBanner (void)
|
||||
DrawBanner(&topLeft);
|
||||
DrawBannerMessage(topLeft);
|
||||
|
||||
DumpScreenOn(&justRoomsRect);
|
||||
DumpScreenOn(&justRoomsRect, false);
|
||||
|
||||
// if (quickerTransitions)
|
||||
// DissBitsChunky(&justRoomsRect); // was workSrcRect
|
||||
|
@@ -498,7 +498,7 @@ void FollowTheLeader (void);
|
||||
|
||||
void PourScreenOn (Rect *); // --- Transitions.c
|
||||
void WipeScreenOn (SInt16, Rect *);
|
||||
void DumpScreenOn (Rect *);
|
||||
void DumpScreenOn (Rect *, Boolean);
|
||||
//void DissBits (Rect *);
|
||||
//void DissBitsChunky (Rect *);
|
||||
//void FillColorNoise (Rect *);
|
||||
|
@@ -82,13 +82,13 @@ void DoHighScores (void)
|
||||
// else
|
||||
// DissBits(&workSrcRect);
|
||||
|
||||
DumpScreenOn(&workSrcRect);
|
||||
DumpScreenOn(&workSrcRect, false);
|
||||
|
||||
SpinCursor(3);
|
||||
|
||||
DrawHighScores(workSrcMap);
|
||||
|
||||
DumpScreenOn(&workSrcRect);
|
||||
DumpScreenOn(&workSrcRect, false);
|
||||
|
||||
SpinCursor(3);
|
||||
// if (quickerTransitions)
|
||||
|
@@ -10,6 +10,8 @@
|
||||
#include "PLKeyEncoding.h"
|
||||
#include "Externs.h"
|
||||
#include "Environ.h"
|
||||
#include "HostDisplayDriver.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "IOStream.h"
|
||||
#include "House.h"
|
||||
#include "WindowManager.h"
|
||||
@@ -215,6 +217,10 @@ void ReadInPrefs (void)
|
||||
doPrettyMap = false;
|
||||
doBitchDialogs = true;
|
||||
|
||||
IGpDisplayDriver *displayDriver = PortabilityLayer::HostDisplayDriver::GetInstance();
|
||||
if (!displayDriver->IsFullScreen())
|
||||
displayDriver->RequestToggleFullScreen(0);
|
||||
|
||||
modulePrefs.Dispose();
|
||||
}
|
||||
|
||||
|
@@ -168,16 +168,16 @@ void NewGame (short mode)
|
||||
if (mode == kNewGameMode)
|
||||
{
|
||||
BringUpBanner();
|
||||
DumpScreenOn(&justRoomsRect);
|
||||
DumpScreenOn(&justRoomsRect, false);
|
||||
}
|
||||
else if (mode == kResumeGameMode)
|
||||
{
|
||||
DisplayStarsRemaining();
|
||||
DumpScreenOn(&justRoomsRect);
|
||||
DumpScreenOn(&justRoomsRect, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
DumpScreenOn(&justRoomsRect);
|
||||
DumpScreenOn(&justRoomsRect, false);
|
||||
}
|
||||
|
||||
InitGarbageRects();
|
||||
@@ -381,7 +381,7 @@ void HandleGameResolutionChange(void)
|
||||
ResetLocale(true);
|
||||
InitScoreboardMap();
|
||||
RefreshScoreboard(wasScoreboardTitleMode);
|
||||
DumpScreenOn(&justRoomsRect);
|
||||
DumpScreenOn(&justRoomsRect, true);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- PlayGame
|
||||
|
@@ -41,9 +41,10 @@
|
||||
#define kScaleResolutionItem 10
|
||||
#define kUseICCProfileItem 11
|
||||
#define kDoColorFadeItem 12
|
||||
#define kBorder2Item 13
|
||||
#define kBorder3Item 14
|
||||
#define kDispDefault 15
|
||||
#define kFullScreenItem 13
|
||||
#define kBorder2Item 14
|
||||
#define kBorder3Item 15
|
||||
#define kDispDefault 16
|
||||
|
||||
// Sound dialog
|
||||
#define kSofterItem 4
|
||||
@@ -106,7 +107,7 @@ Str15 tempLeftStr, tempRightStr, tempBattStr, tempBandStr;
|
||||
long tempLeftMap, tempRightMap, tempBattMap, tempBandMap;
|
||||
short whichCtrl, wasDepthPref;
|
||||
Boolean wasFade, wasIdle, wasPlay, wasTransit, wasZooms, wasBackground;
|
||||
Boolean wasEscPauseKey, wasDemos, wasAutoScale, wasUseICCProfile, nextRestartChange, wasErrorCheck, needResolutionReset;
|
||||
Boolean wasEscPauseKey, wasDemos, wasAutoScale, wasUseICCProfile, nextRestartChange, wasErrorCheck, wasFullscreenPref, needResolutionReset;
|
||||
Boolean wasPrettyMap, wasBitchDialogs;
|
||||
|
||||
extern short numNeighbors, isDepthPref, maxFiles, willMaxFiles;
|
||||
@@ -917,6 +918,7 @@ void DisplayUpdate (Dialog *theDialog)
|
||||
SetDialogItemValue(theDialog, k32BitColorItem, wasDepthPref == 32);
|
||||
SetDialogItemValue(theDialog, kScaleResolutionItem, (short)isAutoScale);
|
||||
SetDialogItemValue(theDialog, kUseICCProfileItem, (short)isUseICCProfile);
|
||||
SetDialogItemValue(theDialog, kFullScreenItem, wasFullscreenPref);
|
||||
|
||||
FrameDisplayIcon(theDialog, StdColors::Red());
|
||||
FrameDialogItemC(theDialog, kBorder1Item, kRedOrangeColor8);
|
||||
@@ -1089,6 +1091,11 @@ void DoDisplayPrefs (void)
|
||||
wasUseICCProfile = !wasUseICCProfile;
|
||||
SetDialogItemValue(prefDlg, kUseICCProfileItem, (short)wasUseICCProfile);
|
||||
break;
|
||||
|
||||
case kFullScreenItem:
|
||||
wasFullscreenPref = !wasFullscreenPref;
|
||||
SetDialogItemValue(prefDlg, kFullScreenItem, (short)wasFullscreenPref);
|
||||
break;
|
||||
|
||||
case kDispDefault:
|
||||
FrameDisplayIcon(prefDlg, StdColors::White());
|
||||
@@ -1277,6 +1284,8 @@ void DoSettingsMain (void)
|
||||
leaving = false;
|
||||
nextRestartChange = false;
|
||||
|
||||
wasFullscreenPref = PortabilityLayer::HostDisplayDriver::GetInstance()->IsFullScreen();
|
||||
|
||||
Window* exclWindow = prefDlg->GetWindow();
|
||||
|
||||
PortabilityLayer::WindowManager::GetInstance()->SwapExclusiveWindow(exclWindow); // Push exclusive window
|
||||
@@ -1334,6 +1343,14 @@ void DoSettingsMain (void)
|
||||
nextRestartChange = false;
|
||||
}
|
||||
|
||||
IGpDisplayDriver *displayDriver = PortabilityLayer::HostDisplayDriver::GetInstance();
|
||||
|
||||
if (displayDriver->IsFullScreen() != (wasFullscreenPref != 0))
|
||||
{
|
||||
displayDriver->RequestToggleFullScreen(0);
|
||||
needResolutionReset = false;
|
||||
}
|
||||
|
||||
if (needResolutionReset)
|
||||
{
|
||||
PortabilityLayer::HostDisplayDriver::GetInstance()->RequestResetVirtualResolution();
|
||||
|
@@ -122,28 +122,28 @@ void WipeScreenOn (short direction, Rect *theRect)
|
||||
wipeRect.bottom = wipeRect.top + wipeRectThick;
|
||||
hOffset = 0;
|
||||
vOffset = wipeRectThick;
|
||||
count = ((theRect->bottom - theRect->top) / wipeRectThick) + 1;
|
||||
count = (theRect->bottom - theRect->top + wipeRectThick - 1) / wipeRectThick;
|
||||
break;
|
||||
|
||||
case kToRight:
|
||||
wipeRect.left = wipeRect.right - wipeRectThick;
|
||||
hOffset = -wipeRectThick;
|
||||
vOffset = 0;
|
||||
count = workSrcRect.right / wipeRectThick;
|
||||
count = (workSrcRect.right + wipeRectThick - 1) / wipeRectThick;
|
||||
break;
|
||||
|
||||
case kBelow:
|
||||
wipeRect.top = wipeRect.bottom - wipeRectThick;
|
||||
hOffset = 0;
|
||||
vOffset = -wipeRectThick;
|
||||
count = ((theRect->bottom - theRect->top) / wipeRectThick) + 1;
|
||||
count = (theRect->bottom - theRect->top + wipeRectThick - 1) / wipeRectThick;
|
||||
break;
|
||||
|
||||
case kToLeft:
|
||||
wipeRect.right = wipeRect.left + wipeRectThick;
|
||||
hOffset = wipeRectThick;
|
||||
vOffset = 0;
|
||||
count = workSrcRect.right / wipeRectThick;
|
||||
count = (workSrcRect.right + wipeRectThick - 1) / wipeRectThick;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ void WipeScreenOn (short direction, Rect *theRect)
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- DumpScreenOn
|
||||
//-------------------------------------------------------------- DissolveScreenOn
|
||||
|
||||
void DissolveScreenOn(Rect *theRect)
|
||||
{
|
||||
@@ -239,9 +239,9 @@ void DissolveScreenOn(Rect *theRect)
|
||||
|
||||
//-------------------------------------------------------------- DumpScreenOn
|
||||
|
||||
void DumpScreenOn(Rect *theRect)
|
||||
void DumpScreenOn(Rect *theRect, Boolean fast)
|
||||
{
|
||||
if (quickerTransitions)
|
||||
if (quickerTransitions || fast)
|
||||
{
|
||||
DrawSurface *graf = mainWindow->GetDrawSurface();
|
||||
|
||||
|
@@ -2,8 +2,8 @@
|
||||
|
||||
#define GP_BUILD_VERSION_MAJOR 1
|
||||
#define GP_BUILD_VERSION_MINOR 0
|
||||
#define GP_BUILD_VERSION_UPDATE 5
|
||||
#define GP_BUILD_VERSION_UPDATE 7
|
||||
|
||||
#define GP_APPLICATION_VERSION_STRING "1.0.5"
|
||||
#define GP_APPLICATION_VERSION_STRING "1.0.7"
|
||||
#define GP_APPLICATION_COPYRIGHT_STRING "2019-2020 Eric Lasota"
|
||||
#define GP_APPLICATION_WEBSITE_STRING "https://github.com/elasota/Aerofoil"
|
||||
|
@@ -47,6 +47,8 @@ public:
|
||||
virtual void RequestToggleFullScreen(uint32_t timestamp) = 0;
|
||||
virtual void RequestResetVirtualResolution() = 0;
|
||||
|
||||
virtual bool IsFullScreen() const = 0;
|
||||
|
||||
virtual const GpDisplayDriverProperties &GetProperties() const = 0;
|
||||
virtual IGpPrefsHandler *GetPrefsHandler() const = 0;
|
||||
};
|
||||
|
@@ -1458,7 +1458,7 @@ void GpDisplayDriverD3D11::SetUseICCProfile(bool useICCProfile)
|
||||
void GpDisplayDriverD3D11::RequestToggleFullScreen(uint32_t timestamp)
|
||||
{
|
||||
// Alt-Enter gets re-sent after a full-screen toggle, so we ignore toggle requests until half a second has elapsed
|
||||
if (timestamp > m_lastFullScreenToggleTimeStamp + 30)
|
||||
if (timestamp == 0 || timestamp > m_lastFullScreenToggleTimeStamp + 30)
|
||||
{
|
||||
m_isFullScreenDesired = !m_isFullScreenDesired;
|
||||
m_lastFullScreenToggleTimeStamp = timestamp;
|
||||
@@ -1470,6 +1470,11 @@ void GpDisplayDriverD3D11::RequestResetVirtualResolution()
|
||||
m_isResolutionResetDesired = true;
|
||||
}
|
||||
|
||||
bool GpDisplayDriverD3D11::IsFullScreen() const
|
||||
{
|
||||
return m_isFullScreenDesired;
|
||||
}
|
||||
|
||||
const GpDisplayDriverProperties &GpDisplayDriverD3D11::GetProperties() const
|
||||
{
|
||||
return m_properties;
|
||||
|
@@ -58,6 +58,8 @@ public:
|
||||
void RequestToggleFullScreen(uint32_t timestamp) override;
|
||||
void RequestResetVirtualResolution() override;
|
||||
|
||||
bool IsFullScreen() const override;
|
||||
|
||||
const GpDisplayDriverProperties &GetProperties() const override;
|
||||
IGpPrefsHandler *GetPrefsHandler() const override;
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
move ReleasePkg\en-us\Aerofoil-installpkg.msi ReleasePkg\Aerofoil-installpkg.msi
|
||||
Tools\7z.exe a -bd -r -mx=9 ReleasePkg\Aerofoil.zip ReleasePkg\Aerofoil
|
||||
Tools\7z.exe a -bd -r -mx=9 ReleasePkg\Aerofoil-PDBs.7z ReleasePkg\PDBs
|
||||
cd ReleasePkg
|
||||
..\Tools\7z.exe a -bd -r -mx=9 Aerofoil.zip Aerofoil
|
||||
..\Tools\7z.exe a -bd -r -mx=9 Aerofoil-PDBs.7z PDBs
|
||||
cd ..
|
||||
rmdir /S /Q ReleasePkg\Aerofoil
|
||||
rmdir /S /Q ReleasePkg\en-us
|
||||
rmdir /S /Q ReleasePkg\PDBs
|
||||
|
Reference in New Issue
Block a user