mirror of https://github.com/OpenTTD/OpenTTD
Doc: some comments for the win32 video driver (#8409)
Co-authored-by: Niels Martin Hansen <nielsm@indvikleren.dk>pull/8411/head
parent
0c3ddc5436
commit
34051c10df
|
@ -44,18 +44,18 @@ typedef BOOL (WINAPI *PFNTRACKMOUSEEVENT)(LPTRACKMOUSEEVENT lpEventTrack);
|
||||||
static PFNTRACKMOUSEEVENT _pTrackMouseEvent = nullptr;
|
static PFNTRACKMOUSEEVENT _pTrackMouseEvent = nullptr;
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
HWND main_wnd;
|
HWND main_wnd; ///< Handle to system window.
|
||||||
HBITMAP dib_sect;
|
HBITMAP dib_sect; ///< System bitmap object referencing our rendering buffer.
|
||||||
void *buffer_bits;
|
void *buffer_bits; ///< Internal rendering buffer.
|
||||||
HPALETTE gdi_palette;
|
HPALETTE gdi_palette; ///< Palette object for 8bpp blitter.
|
||||||
RECT update_rect;
|
RECT update_rect; ///< Current dirty rect.
|
||||||
int width;
|
int width; ///< Width in pixels of our display surface.
|
||||||
int height;
|
int height; ///< Height in pixels of our display surface.
|
||||||
int width_org;
|
int width_org; ///< Original monitor resolution width, before we changed it.
|
||||||
int height_org;
|
int height_org; ///< Original monitor resolution height, before we changed it.
|
||||||
bool fullscreen;
|
bool fullscreen; ///< Whether to use (true) fullscreen mode.
|
||||||
bool has_focus;
|
bool has_focus; ///< Does our window have system focus?
|
||||||
bool running;
|
bool running; ///< Is the main loop running?
|
||||||
} _wnd;
|
} _wnd;
|
||||||
|
|
||||||
bool _force_full_redraw;
|
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)
|
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;
|
_fullscreen = full_screen;
|
||||||
|
|
||||||
/* recreate window? */
|
/* recreate window? */
|
||||||
|
|
Loading…
Reference in New Issue