summaryrefslogtreecommitdiff
path: root/src/video/win32_v.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2020-12-21 22:28:56 +0100
committerGitHub <noreply@github.com>2020-12-21 22:28:56 +0100
commit34051c10df373da8f85675d2a02043c3c92c4eed (patch)
treefb4ab744360903ac24a0b3ef3f3153af8e360c4f /src/video/win32_v.cpp
parent0c3ddc5436a28051aab41b100fa9cacfa1b3907c (diff)
downloadopenttd-34051c10df373da8f85675d2a02043c3c92c4eed.tar.xz
Doc: some comments for the win32 video driver (#8409)
Co-authored-by: Niels Martin Hansen <nielsm@indvikleren.dk>
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r--src/video/win32_v.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 341187320..fa780dd3d 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -44,18 +44,18 @@ typedef BOOL (WINAPI *PFNTRACKMOUSEEVENT)(LPTRACKMOUSEEVENT lpEventTrack);
static PFNTRACKMOUSEEVENT _pTrackMouseEvent = nullptr;
static struct {
- HWND main_wnd;
- HBITMAP dib_sect;
- void *buffer_bits;
- HPALETTE gdi_palette;
- RECT update_rect;
- int width;
- int height;
- int width_org;
- int height_org;
- bool fullscreen;
- bool has_focus;
- bool running;
+ HWND main_wnd; ///< Handle to system window.
+ HBITMAP dib_sect; ///< System bitmap object referencing our rendering buffer.
+ void *buffer_bits; ///< Internal rendering buffer.
+ HPALETTE gdi_palette; ///< Palette object for 8bpp blitter.
+ RECT update_rect; ///< Current dirty rect.
+ int width; ///< Width in pixels of our display surface.
+ int height; ///< Height in pixels of our display surface.
+ int width_org; ///< Original monitor resolution width, before we changed it.
+ int height_org; ///< Original monitor resolution height, before we changed it.
+ bool fullscreen; ///< Whether to use (true) fullscreen mode.
+ bool has_focus; ///< Does our window have system focus?
+ bool running; ///< Is the main loop running?
} _wnd;
bool _force_full_redraw;
@@ -262,6 +262,8 @@ static void CALLBACK TrackMouseTimerProc(HWND hwnd, UINT msg, UINT_PTR event, DW
*/
bool VideoDriver_Win32::MakeWindow(bool full_screen)
{
+ /* full_screen is whether the new window should be fullscreen,
+ * _wnd.fullscreen is whether the current window is. */
_fullscreen = full_screen;
/* recreate window? */