ENGINES: Allow specifying a start position for initGraphicsAny()

This commit is contained in:
Cameron Cawley 2023-12-27 21:24:25 +00:00 committed by Filippos Karapetis
parent 2fdd7ce9d0
commit d5863dd513
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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