summaryrefslogtreecommitdiff
path: root/src/video/cocoa/cocoa_v.mm
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-10-04 21:35:40 +0000
committermichi_cc <michi_cc@openttd.org>2011-10-04 21:35:40 +0000
commit6dbb050a32122209497d9b41c373b3b759602883 (patch)
treed4a463d465885f4eb4f376ac548f71d68b09995b /src/video/cocoa/cocoa_v.mm
parent12e28de8187808b166541ee8fa339e38037538fd (diff)
downloadopenttd-6dbb050a32122209497d9b41c373b3b759602883.tar.xz
(svn r22999) -Codechange: Allow changing the blitter during the running game.
Diffstat (limited to 'src/video/cocoa/cocoa_v.mm')
-rw-r--r--src/video/cocoa/cocoa_v.mm12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index 6e5988c91..3b85f9e8b 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -400,7 +400,7 @@ bool VideoDriver_Cocoa::ChangeResolution(int w, int h)
{
assert(_cocoa_subdriver != NULL);
- bool ret = _cocoa_subdriver->ChangeResolution(w, h);
+ bool ret = _cocoa_subdriver->ChangeResolution(w, h, BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth());
QZ_GameSizeChanged();
QZ_UpdateVideoModes();
@@ -444,6 +444,16 @@ bool VideoDriver_Cocoa::ToggleFullscreen(bool full_screen)
}
/**
+ * Callback invoked after the blitter was changed.
+ *
+ * @return True if no error.
+ */
+bool VideoDriver_Cocoa::AfterBlitterChange()
+{
+ return this->ChangeResolution(_screen.width, _screen.height);
+}
+
+/**
* Catch asserts prior to initialization of the videodriver.
*
* @param title Window title.