Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #860 from Tropby/master
Browse files Browse the repository at this point in the history
Minor fixes to compile GDI with mingw 32bit
  • Loading branch information
dumblob authored Jun 15, 2019
2 parents 8f5c1be + 386386f commit bb327b9
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 bb327b9

Please sign in to comment.