summaryrefslogtreecommitdiff
path: root/src/video/win32_v.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video/win32_v.h')
-rw-r--r--src/video/win32_v.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video/win32_v.h b/src/video/win32_v.h
index cb1658cef..13115e8c9 100644
--- a/src/video/win32_v.h
+++ b/src/video/win32_v.h
@@ -15,6 +15,8 @@
/** Base class for Windows video drivers. */
class VideoDriver_Win32Base : public VideoDriver {
public:
+ VideoDriver_Win32Base() : main_wnd(nullptr) {}
+
void MakeDirty(int left, int top, int width, int height) override;
void MainLoop() override;
@@ -32,6 +34,8 @@ public:
void EditBoxLostFocus() override;
protected:
+ HWND main_wnd; ///< Handle to system window.
+
Dimension GetScreenSize() const override;
float GetDPIScale() override;
void InputLoop() override;
@@ -58,6 +62,8 @@ private:
/** The GDI video driver for windows. */
class VideoDriver_Win32GDI : public VideoDriver_Win32Base {
public:
+ VideoDriver_Win32GDI() : dib_sect(nullptr), gdi_palette(nullptr) {}
+
const char *Start(const StringList &param) override;
void Stop() override;
@@ -67,11 +73,21 @@ public:
const char *GetName() const override { return "win32"; }
protected:
+ HBITMAP dib_sect; ///< System bitmap object referencing our rendering buffer.
+ HPALETTE gdi_palette; ///< Palette object for 8bpp blitter.
+
void Paint() override;
void PaintThread() override;
bool AllocateBackingStore(int w, int h, bool force = false) override;
void PaletteChanged(HWND hWnd) override;
+ void MakePalette();
+ void UpdatePalette(HDC dc, uint start, uint count);
+
+#ifdef _DEBUG
+public:
+ static int RedrawScreenDebug();
+#endif
};
/** The factory for Windows' video driver. */