Skip to content

Commit

Permalink
native/windows: Added stock black color for miniquad window backgroun…
Browse files Browse the repository at this point in the history
…d on Windows

Added stock black color for window background, in case we lag with rendering
  • Loading branch information
Shelim authored Aug 9, 2024
1 parent 8f967a7 commit b4b7b84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/native/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use winapi::{
hidusage::{HID_USAGE_GENERIC_MOUSE, HID_USAGE_PAGE_GENERIC},
minwindef::{DWORD, HIWORD, LOWORD, LPARAM, LRESULT, UINT, WPARAM},
ntdef::NULL,
windef::{HCURSOR, HDC, HICON, HWND, POINT, RECT},
windef::{HBRUSH, HCURSOR, HDC, HICON, HWND, POINT, RECT},
windowsx::{GET_X_LPARAM, GET_Y_LPARAM},
},
um::{
Expand Down Expand Up @@ -617,6 +617,7 @@ unsafe fn create_window(
wndclassw.hInstance = GetModuleHandleW(NULL as _);
wndclassw.hCursor = LoadCursorW(NULL as _, IDC_ARROW);
wndclassw.hIcon = LoadIconW(NULL as _, IDI_WINLOGO);
wndclassw.hbrBackground = GetStockObject(BLACK_BRUSH as i32) as HBRUSH;
let class_name = "MINIQUADAPP\0".encode_utf16().collect::<Vec<u16>>();
wndclassw.lpszClassName = class_name.as_ptr() as _;
wndclassw.cbWndExtra = std::mem::size_of::<*mut std::ffi::c_void>() as i32;
Expand Down

0 comments on commit b4b7b84

Please sign in to comment.