[Scummvm-git-logs] scummvm master -> f11a469d39664abd6afd5a1474707f8b668a586f
grisenti
noreply at scummvm.org
Wed Jan 25 08:16:09 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f11a469d39 HPL1: remove vsync setting
Commit: f11a469d39664abd6afd5a1474707f8b668a586f
https://github.com/scummvm/scummvm/commit/f11a469d39664abd6afd5a1474707f8b668a586f
Author: grisenti (emanuele at grisenti.net)
Date: 2023-01-25T09:15:51+01:00
Commit Message:
HPL1: remove vsync setting
Changed paths:
engines/hpl1/engine/graphics/LowLevelGraphics.h
engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
engines/hpl1/engine/impl/LowLevelGraphicsSDL.h
engines/hpl1/engine/impl/low_level_graphics_tgl.cpp
engines/hpl1/engine/impl/low_level_graphics_tgl.h
engines/hpl1/penumbra-overture/Init.cpp
engines/hpl1/penumbra-overture/MainMenu.cpp
diff --git a/engines/hpl1/engine/graphics/LowLevelGraphics.h b/engines/hpl1/engine/graphics/LowLevelGraphics.h
index 6933bbfc624..f843452b785 100644
--- a/engines/hpl1/engine/graphics/LowLevelGraphics.h
+++ b/engines/hpl1/engine/graphics/LowLevelGraphics.h
@@ -237,12 +237,6 @@ public:
*/
virtual void SetVirtualSize(cVector2f avSize) = 0;
- /**
- * Set if vsync should eb active
- * \param abX
- */
- virtual void SetVsyncActive(bool abX) = 0;
-
virtual void SetMultisamplingActive(bool abX) = 0;
virtual void SetGammaCorrection(float afX) = 0;
diff --git a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
index e9d3306cc6b..7ac3b7c6ce9 100644
--- a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
+++ b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
@@ -276,16 +276,6 @@ void cLowLevelGraphicsSDL::ShowCursor(bool toggle) {
//-----------------------------------------------------------------------
-void cLowLevelGraphicsSDL::SetVsyncActive(bool toggle) {
- if (g_system->hasFeature(OSystem::kFeatureVSync)) {
- g_system->beginGFXTransaction();
- g_system->setFeatureState(OSystem::kFeatureVSync, toggle);
- g_system->endGFXTransaction();
- }
-}
-
-//-----------------------------------------------------------------------
-
void cLowLevelGraphicsSDL::SetMultisamplingActive(bool toggle) {
if (!GetCaps(eGraphicCaps_Multisampling) || mlMultisampling <= 0)
return;
diff --git a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.h b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.h
index 1a9f34a5dd6..6210dcd6e5c 100644
--- a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.h
+++ b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.h
@@ -59,8 +59,6 @@ public:
void ShowCursor(bool abX);
- void SetVsyncActive(bool abX);
-
void SetMultisamplingActive(bool abX);
void SetGammaCorrection(float afX);
diff --git a/engines/hpl1/engine/impl/low_level_graphics_tgl.cpp b/engines/hpl1/engine/impl/low_level_graphics_tgl.cpp
index 31125b6422d..e2a9a226973 100644
--- a/engines/hpl1/engine/impl/low_level_graphics_tgl.cpp
+++ b/engines/hpl1/engine/impl/low_level_graphics_tgl.cpp
@@ -487,16 +487,6 @@ void LowLevelGraphicsTGL::ShowCursor(bool toggle) {
//-----------------------------------------------------------------------
-void LowLevelGraphicsTGL::SetVsyncActive(bool toggle) {
- if (g_system->hasFeature(OSystem::kFeatureVSync)) {
- g_system->beginGFXTransaction();
- g_system->setFeatureState(OSystem::kFeatureVSync, toggle);
- g_system->endGFXTransaction();
- }
-}
-
-//-----------------------------------------------------------------------
-
void LowLevelGraphicsTGL::SetMultisamplingActive(bool toggle) {
return;
}
diff --git a/engines/hpl1/engine/impl/low_level_graphics_tgl.h b/engines/hpl1/engine/impl/low_level_graphics_tgl.h
index 95f87737362..99923ab6789 100644
--- a/engines/hpl1/engine/impl/low_level_graphics_tgl.h
+++ b/engines/hpl1/engine/impl/low_level_graphics_tgl.h
@@ -53,8 +53,6 @@ public:
void ShowCursor(bool abX);
- void SetVsyncActive(bool abX);
-
void SetMultisamplingActive(bool abX);
void SetGammaCorrection(float afX);
diff --git a/engines/hpl1/penumbra-overture/Init.cpp b/engines/hpl1/penumbra-overture/Init.cpp
index b7c49bfcf92..f77deda7437 100644
--- a/engines/hpl1/penumbra-overture/Init.cpp
+++ b/engines/hpl1/penumbra-overture/Init.cpp
@@ -165,7 +165,6 @@ bool cInit::Init(tString saveToLoad) {
mvScreenSize.x = getIntConfig("screen-width", 800);
mvScreenSize.y = getIntConfig("screen-height", 600);
mbFullScreen = ConfMan.getBool("fullscreen");
- mbVsync = ConfMan.getBool("vsync");
mbLogResources = false;
mbDebugInteraction = false;
@@ -255,8 +254,6 @@ bool cInit::Init(tString saveToLoad) {
// Make sure hardware is really used.
mbUseSoundHardware = mpGame->GetSound()->GetLowLevel()->IsHardwareAccelerated();
- mpGame->GetGraphics()->GetLowLevel()->SetVsyncActive(mbVsync);
-
mbShowPreMenu = getBoolConfig("show_pre_menu", true);
mbShowIntro = getBoolConfig("show_intro", true);
mbShowMenu = getBoolConfig("show_menu", true);
diff --git a/engines/hpl1/penumbra-overture/MainMenu.cpp b/engines/hpl1/penumbra-overture/MainMenu.cpp
index 11f8942def3..fbd67beedde 100644
--- a/engines/hpl1/penumbra-overture/MainMenu.cpp
+++ b/engines/hpl1/penumbra-overture/MainMenu.cpp
@@ -1152,7 +1152,6 @@ cMainMenuWidget_Text *gpResolutionText = NULL;
cMainMenuWidget_Text *gpPostEffectsText = NULL;
cMainMenuWidget_Text *gpBloomText = NULL;
cMainMenuWidget_Text *gpMotionBlurText = NULL;
-cMainMenuWidget_Text *gpVSyncText = NULL;
cMainMenuWidget_Text *gpTextureQualityText = NULL;
cMainMenuWidget_Text *gpShaderQualityText = NULL;
cMainMenuWidget_Text *gpShadowsText = NULL;
@@ -1552,23 +1551,6 @@ public:
//------------------------------------------------------------
-class cMainMenuWidget_VSync : public cMainMenuWidget_Button {
-public:
- cMainMenuWidget_VSync(cInit *apInit, const cVector3f &avPos, const tWString &asText, cVector2f avFontSize, eFontAlign aAlignment)
- : cMainMenuWidget_Button(apInit, avPos, asText, eMainMenuState_LastEnum, avFontSize, aAlignment) {
- msTip = kTranslate("MainMenu", "TipGraphicsVSync");
- }
-
- void OnMouseDown(eMButton aButton) {
- mpInit->mbVsync = !mpInit->mbVsync;
- mpInit->mpGame->GetGraphics()->GetLowLevel()->SetVsyncActive(mpInit->mbVsync);
-
- gpVSyncText->msText = mpInit->mbVsync ? kTranslate("MainMenu", "On") : kTranslate("MainMenu", "Off");
- }
-};
-
-//------------------------------------------------------------
-
class cMainMenuWidget_GfxBack : public cMainMenuWidget_Button {
public:
cMainMenuWidget_GfxBack(cInit *apInit, const cVector3f &avPos, const tWString &asText, cVector2f avFontSize, eFontAlign aAlignment)
@@ -3027,9 +3009,6 @@ void cMainMenu::CreateWidgets() {
cMainMenuWidget *pMotionBlurButton = hplNew(cMainMenuWidget_MotionBlur, (mpInit, vPos, kTranslate("MainMenu", "Motion Blur:"), 20, eFontAlign_Right));
AddWidgetToState(eMainMenuState_OptionsGraphicsAdvanced, pMotionBlurButton);
vPos.y += 29;
- cMainMenuWidget *pVSyncButton = hplNew(cMainMenuWidget_VSync, (mpInit, vPos, kTranslate("MainMenu", "VSync:"), 20, eFontAlign_Right));
- AddWidgetToState(eMainMenuState_OptionsGraphicsAdvanced, pVSyncButton);
- vPos.y += 29;
cMainMenuWidget *pTextureFilterButton = hplNew(cMainMenuWidget_TextureFilter, (mpInit, vPos, kTranslate("MainMenu", "Texture Filter:"), 20, eFontAlign_Right));
AddWidgetToState(eMainMenuState_OptionsGraphicsAdvanced, pTextureFilterButton);
vPos.y += 29;
@@ -3070,12 +3049,6 @@ void cMainMenu::CreateWidgets() {
AddWidgetToState(eMainMenuState_OptionsGraphicsAdvanced, gpMotionBlurText);
gpMotionBlurText->SetExtraWidget(pMotionBlurButton);
- vPos.y += 29;
- sText = mpInit->mbVsync ? kTranslate("MainMenu", "On") : kTranslate("MainMenu", "Off");
- gpVSyncText = hplNew(cMainMenuWidget_Text, (mpInit, vPos, sText, 20, eFontAlign_Left));
- AddWidgetToState(eMainMenuState_OptionsGraphicsAdvanced, gpVSyncText);
- gpVSyncText->SetExtraWidget(pVSyncButton);
-
vPos.y += 29;
sText = kTranslate("MainMenu", gvTextureFilter[mpInit->mpGame->GetResources()->GetMaterialManager()->GetTextureFilter()]);
gpTextureFilterText = hplNew(cMainMenuWidget_Text, (mpInit, vPos, sText, 20, eFontAlign_Left));
More information about the Scummvm-git-logs
mailing list