[Scummvm-git-logs] scummvm master -> d5863dd51377d172e157b2e6db013445c3b2284f
bluegr
noreply at scummvm.org
Thu Dec 28 18:41:25 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:
d5863dd513 ENGINES: Allow specifying a start position for initGraphicsAny()
Commit: d5863dd51377d172e157b2e6db013445c3b2284f
https://github.com/scummvm/scummvm/commit/d5863dd51377d172e157b2e6db013445c3b2284f
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2023-12-28T20:41:22+02:00
Commit Message:
ENGINES: Allow specifying a start position for initGraphicsAny()
Changed paths:
engines/engine.cpp
engines/util.h
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 58223e8d41a..4e649f57b08 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -324,12 +324,12 @@ void initGraphicsModes(const Graphics::ModeList &modes) {
* Inits any of the modes in "modes". "modes" is in the order of preference.
* Return value is index in modes of resulting mode.
*/
-int initGraphicsAny(const Graphics::ModeWithFormatList &modes) {
+int initGraphicsAny(const Graphics::ModeWithFormatList &modes, int start) {
int candidate = -1;
OSystem::TransactionError gfxError = OSystem::kTransactionSizeChangeFailed;
int last_width = 0, last_height = 0;
- for (candidate = 0; candidate < (int)modes.size(); candidate++) {
+ for (candidate = start; candidate < (int)modes.size(); candidate++) {
g_system->beginGFXTransaction();
initCommonGFX();
#ifdef USE_RGB_COLOR
diff --git a/engines/util.h b/engines/util.h
index 1310f451e57..37c00f689f0 100644
--- a/engines/util.h
+++ b/engines/util.h
@@ -84,6 +84,6 @@ void initGraphics3d(int width, int height);
* Inits any of the modes in "modes". "modes" is in the order of preference.
* Return value is index in modes of resulting mode.
*/
-int initGraphicsAny(const Graphics::ModeWithFormatList &modes);
+int initGraphicsAny(const Graphics::ModeWithFormatList &modes, int start = 0);
/** @} */
#endif
More information about the Scummvm-git-logs
mailing list