aboutsummaryrefslogtreecommitdiff
path: root/graphics/mode.h
diff options
context:
space:
mode:
authorColin Snover2017-10-01 16:23:22 -0500
committerColin Snover2017-10-07 12:30:29 -0500
commit6e157429b7a5a64af6265d075c88595df2d6fd79 (patch)
tree6e16e359d2f427ff0aa17ae229780509595ee1b1 /graphics/mode.h
parent24f5d456195df3b65ed2876cbca2e2981f3d1a07 (diff)
downloadscummvm-rg350-6e157429b7a5a64af6265d075c88595df2d6fd79.tar.gz
scummvm-rg350-6e157429b7a5a64af6265d075c88595df2d6fd79.tar.bz2
scummvm-rg350-6e157429b7a5a64af6265d075c88595df2d6fd79.zip
BACKENDS: Fix window sizing of games that switch between multiple resolutions
Diffstat (limited to 'graphics/mode.h')
-rw-r--r--graphics/mode.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/graphics/mode.h b/graphics/mode.h
new file mode 100644
index 0000000000..bd8eb25e00
--- /dev/null
+++ b/graphics/mode.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef GRAPHICS_MODE_H
+#define GRAPHICS_MODE_H
+
+#include "common/array.h"
+
+namespace Graphics {
+
+/**
+ * Represents a hardware video mode.
+ */
+struct Mode {
+ int16 width; ///< The width in pixels
+ int16 height; ///< The height in pixels
+
+ Mode(const int16 w, const int16 h) :
+ width(w),
+ height(h) {}
+
+ bool operator<(const Mode &other) const {
+ return width < other.width && height < other.height;
+ }
+};
+
+typedef Common::Array<Mode> ModeList;
+
+}
+
+#endif