summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2010-12-18 21:54:09 +0000
committerplanetmaker <planetmaker@openttd.org>2010-12-18 21:54:09 +0000
commit3448853b55445c32ecd3c0b0db1bab9baad86df3 (patch)
treee1508eb6b51400fd7d0b20e34d6d0186872f95f4 /src/video
parent7ff64ba3fa7d30ab23b422671f98a179f5d8bfc6 (diff)
downloadopenttd-3448853b55445c32ecd3c0b0db1bab9baad86df3.tar.xz
(svn r21537) -Cleanup: Add a few sprinkles of coding style
Diffstat (limited to 'src/video')
-rw-r--r--src/video/cocoa/wnd_quartz.mm4
-rw-r--r--src/video/cocoa/wnd_quickdraw.mm8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm
index c7ec15c0e..949575b77 100644
--- a/src/video/cocoa/wnd_quartz.mm
+++ b/src/video/cocoa/wnd_quartz.mm
@@ -470,7 +470,7 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height)
/* We already have a window, just change its size */
[ this->window setContentSize:contentRect.size ];
- // Ensure frame height - title bar height >= view height
+ /* Ensure frame height - title bar height >= view height */
contentRect.size.height = Clamp(height, 0, [ this->window frame ].size.height - 22 /* 22 is the height of title bar of window*/);
if (this->qzview != nil) {
@@ -593,8 +593,6 @@ void WindowQuartzSubdriver::Draw(bool force_update)
if (force_update) [ this->qzview displayIfNeeded ];
}
- //DrawResizeIcon();
-
this->num_dirty_rects = 0;
}
diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm
index 5d7ce0099..370ff3d00 100644
--- a/src/video/cocoa/wnd_quickdraw.mm
+++ b/src/video/cocoa/wnd_quickdraw.mm
@@ -166,7 +166,6 @@ public:
virtual bool IsActive() { return active; }
-
void SetPortAlphaOpaque();
bool WindowResized();
};
@@ -397,13 +396,14 @@ bool WindowQuickdrawSubdriver::SetVideoMode(int width, int height)
} else {
/* We already have a window, just change its size */
[ this->window setContentSize:contentRect.size ];
- /* Ensure frame height - title bar height >= view height */
- contentRect.size.height = Clamp(height, 0, [ this->window frame ].size.height - 22); // 22 is the height of title bar of window
+ /* Ensure frame height - title bar height >= view height
+ * The height of title bar of the window is 22 pixels */
+ contentRect.size.height = Clamp(height, 0, [ this->window frame ].size.height - 22);
height = contentRect.size.height;
[ this->qdview setFrameSize:contentRect.size ];
}
- // Update again
+ /* Update again */
this->window_width = width;
this->window_height = height;