1
0
Fork 0

Doc: some comments for the win32 video driver (#8409)

Co-authored-by: Niels Martin Hansen <nielsm@indvikleren.dk>
pull/8411/head
Patric Stout 2020-12-21 22:28:56 +01:00 committed by GitHub
parent 0c3ddc5436
commit 34051c10df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 12 deletions

View File

@ -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? */