Skip to content

Commit

Permalink
added casts to HBITMAP (needed to compile with mingw 32bit)
Browse files Browse the repository at this point in the history
added "A" to CreateFont (needed to compile with mingw 32bit)
  • Loading branch information
Tropby authored and Tropby committed Jun 15, 2019
1 parent 8f5c1be commit 386386f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/gdi/nuklear_gdi.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ nk_delete_image(struct nk_image * image)
{
if (image && image->handle.id != 0)
{
HBITMAP hbm = image->handle.ptr;
HBITMAP hbm = (HBITMAP)image->handle.ptr;
DeleteObject(hbm);
memset(image, 0, sizeof(struct nk_image));
}
Expand All @@ -115,7 +115,7 @@ static void
nk_gdi_draw_image(short x, short y, unsigned short w, unsigned short h,
struct nk_image img, struct nk_color col)
{
HBITMAP hbm = img.handle.ptr;
HBITMAP hbm = (HBITMAP)img.handle.ptr;
HDC hDCBits;
BITMAP bitmap;

Expand Down Expand Up @@ -483,7 +483,7 @@ nk_gdifont_create(const char *name, int size)
if (!font)
return NULL;
font->dc = CreateCompatibleDC(0);
font->handle = CreateFont(size, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, DEFAULT_PITCH | FF_DONTCARE, name);
font->handle = CreateFontA(size, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, DEFAULT_PITCH | FF_DONTCARE, name);
SelectObject(font->dc, font->handle);
GetTextMetricsW(font->dc, &metric);
font->height = metric.tmHeight;
Expand Down

0 comments on commit 386386f

Please sign in to comment.