Commit f3765743 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

Duke3d: limit framerate to refresh rate in menus and bonus screens

This is intended to address complaints of GPU coil whine. While these are obviously actually just complaints about the user's own hardware, we don't really need hundreds of frames per second in the menus, do we?
parent 14408414
......@@ -782,7 +782,7 @@ nextdemo_nomenu:
if (Demo_IsProfiling())
totalclock += TICSPERFRAME;
if (engineFPSLimit())
if (engineFPSLimit((g_player[myconnectindex].ps->gm & MODE_MENU) == MODE_MENU))
{
if (foundemo == 0)
{
......
......@@ -7143,7 +7143,7 @@ MAIN_LOOP_RESTART:
{
idle();
}
else if (engineFPSLimit() || g_saveRequested)
else if (engineFPSLimit((myplayer.gm & MODE_MENU) == MODE_MENU) || g_saveRequested)
{
if (!g_saveRequested)
{
......
......@@ -1298,7 +1298,7 @@ void Screen_Play(void)
ototalclock = totalclock + 1; // pause game like ANMs
m_mouselastactivity = (int)totalclock;
if (!engineFPSLimit())
if (!engineFPSLimit(true))
continue;
videoClearScreen(0);
......
......@@ -4681,7 +4681,7 @@ void Net_WaitForServer(void)
if (quitevent || keystatus[1])
G_GameExit("");
if (engineFPSLimit())
if (engineFPSLimit(true))
{
display_betascreen();
gametext_center_shade(170, "Waiting for server", 14);
......
......@@ -1567,7 +1567,7 @@ void gameDisplay3DRScreen()
while (totalclock < (120 * 7) && !I_GeneralTrigger())
{
if (engineFPSLimit())
if (engineFPSLimit(true))
{
videoClearScreen(0);
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, DREALMS, 0, 0, 2 + 8 + 64 + BGSTRETCH);
......@@ -1608,7 +1608,7 @@ void gameDisplayTitleScreen(void)
#endif
!I_GeneralTrigger())
{
if (engineFPSLimit())
if (engineFPSLimit(true))
{
videoClearScreen(0);
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, BETASCREEN, 0, 0, 2 + 8 + 64 + BGSTRETCH);
......@@ -1837,7 +1837,7 @@ static void G_BonusCutscenes(void)
do
{
if (engineFPSLimit())
if (engineFPSLimit(true))
{
videoClearScreen(0L);
rotatesprite_fs(0, 50<<16, 65536L, 0, VICTORY1, 0, 0, 2+8+16+64+128+BGSTRETCH);
......@@ -2133,7 +2133,7 @@ static void G_BonusCutscenes(void)
do
{
if (engineFPSLimit())
if (engineFPSLimit(true))
{
totalclocklock = totalclock;
......@@ -2351,7 +2351,7 @@ void G_BonusScreen(int32_t bonusonly)
gameHandleEvents();
MUSIC_Update();
if (engineFPSLimit())
if (engineFPSLimit(true))
{
videoClearScreen(0);
G_DisplayMPResultsScreen();
......@@ -2402,7 +2402,7 @@ void G_BonusScreen(int32_t bonusonly)
gameHandleEvents();
MUSIC_Update();
if (engineFPSLimit())
if (engineFPSLimit(true))
{
if (g_player[myconnectindex].ps->gm&MODE_EOL)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment