Skip to content

Commit

Permalink
OSXPPC: Display warning when changing fullscreen resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
jorio committed Dec 8, 2022
1 parent adf2712 commit b14f230
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions src/Screens/SettingsScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ static const char* GenerateMSAASubtitle(void);
#endif

#if OSXPPC
static const char* GenerateFullscreenModeSubtitle(void);
static const char* GeneratePPCFullscreenModeSubtitle(void);
static const char* GeneratePPCDisplayModeSubtitle(void);
#endif

/****************************/
Expand Down Expand Up @@ -137,7 +138,7 @@ static SettingEntry gVideoMenu[] =
.nChoices = 2,
.choices = {"No", "Yes"},
#if OSXPPC
.subtitle = GenerateFullscreenModeSubtitle,
.subtitle = GeneratePPCFullscreenModeSubtitle,
#endif
},

Expand All @@ -148,6 +149,7 @@ static SettingEntry gVideoMenu[] =
.label = "Fullscreen mode",
.nChoices = 1,
.choices = {"0x0"},
.subtitle = GeneratePPCDisplayModeSubtitle,
},
#endif

Expand Down Expand Up @@ -242,12 +244,33 @@ static const char* GenerateMSAASubtitle(void)
#endif

#if OSXPPC
static const char* GenerateFullscreenModeSubtitle(void)
static const char* GeneratePPCFullscreenModeSubtitle(void)
{
return gGamePrefs.fullscreen != gFullscreenModeAppliedOnBoot
? "Will apply when you restart the game"
: NULL;
}

static const char* GeneratePPCDisplayModeSubtitle(void)
{
static bool initialized = false;
static Byte currentDisplayMode = 0;

if (!initialized)
{
initialized = true;
currentDisplayMode = gGamePrefs.curatedDisplayModeID;
}

if (gGamePrefs.curatedDisplayModeID != currentDisplayMode)
{
return "Will apply when you restart the game";
}
else
{
return NULL;
}
}
#endif

/****************** SETUP SETTINGS SCREEN **************************/
Expand Down

0 comments on commit b14f230

Please sign in to comment.