@@ -76,17 +76,17 @@ nk_create_image(struct nk_image * image, const char * frame_buffer, const int wi
7676 image -> region [1 ] = 0 ;
7777 image -> region [2 ] = width ;
7878 image -> region [3 ] = height ;
79-
79+
8080 bi .bmiHeader .biSize = sizeof (BITMAPINFOHEADER );
8181 bi .bmiHeader .biWidth = width ;
8282 bi .bmiHeader .biHeight = height ;
8383 bi .bmiHeader .biPlanes = 1 ;
8484 bi .bmiHeader .biBitCount = 24 ;
8585 bi .bmiHeader .biCompression = BI_RGB ;
8686 bi .bmiHeader .biSizeImage = row * height ;
87-
87+
8888 hbm = CreateDIBSection (NULL , & bi , DIB_RGB_COLORS , (void * * )& lpBuf , NULL , 0 );
89-
89+
9090 pb = lpBuf + row * height ;
9191 for (v = 0 ; v < height ; v ++ )
9292 {
@@ -98,7 +98,7 @@ nk_create_image(struct nk_image * image, const char * frame_buffer, const int wi
9898 pb [i + 2 ] = src [2 ];
9999 src += 3 ;
100100 }
101- }
101+ }
102102 SetDIBits (NULL , hbm , 0 , height , lpBuf , & bi , DIB_RGB_COLORS );
103103 image -> handle .ptr = hbm ;
104104 }
@@ -122,10 +122,10 @@ nk_gdi_draw_image(short x, short y, unsigned short w, unsigned short h,
122122 HBITMAP hbm = (HBITMAP )img .handle .ptr ;
123123 HDC hDCBits ;
124124 BITMAP bitmap ;
125-
125+
126126 if (!gdi .memory_dc || !hbm )
127127 return ;
128-
128+
129129 hDCBits = CreateCompatibleDC (gdi .memory_dc );
130130 GetObject (hbm , sizeof (BITMAP ), (LPSTR )& bitmap );
131131 SelectObject (hDCBits , hbm );
@@ -192,7 +192,7 @@ nk_gdi_stroke_rect(HDC dc, short x, short y, unsigned short w,
192192 }
193193 SelectObject (dc , br );
194194
195- if (pen ) {
195+ if (pen ) {
196196 SelectObject (dc , GetStockObject (DC_PEN ));
197197 DeleteObject (pen );
198198 }
@@ -470,7 +470,7 @@ nk_gdi_stroke_circle(HDC dc, short x, short y, unsigned short w,
470470 pen = CreatePen (PS_SOLID , line_thickness , color );
471471 SelectObject (dc , pen );
472472 }
473-
473+
474474 HGDIOBJ br = SelectObject (dc , GetStockObject (NULL_BRUSH ));
475475 SetDCBrushColor (dc , OPAQUE );
476476 Ellipse (dc , x , y , x + w , y + h );
@@ -524,7 +524,7 @@ nk_gdi_draw_text(HDC dc, short x, short y, unsigned short w, unsigned short h,
524524 wsize = MultiByteToWideChar (CP_UTF8 , 0 , text , len , NULL , 0 );
525525 wstr = (WCHAR * )_alloca (wsize * sizeof (wchar_t ));
526526 MultiByteToWideChar (CP_UTF8 , 0 , text , len , wstr , wsize );
527-
527+
528528 SetBkMode (dc , TRANSPARENT ); /* Transparent Text Background */
529529 SetBkColor (dc , convert_color (cbg ));
530530 SetTextColor (dc , convert_color (cfg ));
@@ -599,14 +599,14 @@ nk_gdi_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
599599 (void )usr ;
600600 if (IsClipboardFormatAvailable (CF_UNICODETEXT ) && OpenClipboard (NULL ))
601601 {
602- HGLOBAL mem = GetClipboardData (CF_UNICODETEXT );
602+ HGLOBAL mem = GetClipboardData (CF_UNICODETEXT );
603603 if (mem )
604604 {
605605 SIZE_T size = GlobalSize (mem ) - 1 ;
606606 if (size )
607607 {
608608 LPCWSTR wstr = (LPCWSTR )GlobalLock (mem );
609- if (wstr )
609+ if (wstr )
610610 {
611611 int utf8size = WideCharToMultiByte (CP_UTF8 , 0 , wstr , (int )(size / sizeof (wchar_t )), NULL , 0 , NULL , NULL );
612612 if (utf8size )
@@ -619,7 +619,7 @@ nk_gdi_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
619619 free (utf8 );
620620 }
621621 }
622- GlobalUnlock (mem );
622+ GlobalUnlock (mem );
623623 }
624624 }
625625 }
@@ -643,9 +643,9 @@ nk_gdi_clipboard_copy(nk_handle usr, const char *text, int len)
643643 {
644644 MultiByteToWideChar (CP_UTF8 , 0 , text , len , wstr , wsize );
645645 wstr [wsize ] = 0 ;
646- GlobalUnlock (mem );
646+ GlobalUnlock (mem );
647647
648- SetClipboardData (CF_UNICODETEXT , mem );
648+ SetClipboardData (CF_UNICODETEXT , mem );
649649 }
650650 }
651651 }
@@ -734,6 +734,7 @@ nk_gdi_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
734734 return 1 ;
735735
736736 case VK_RETURN :
737+ case VK_SEPARATOR :
737738 nk_input_key (& gdi .ctx , NK_KEY_ENTER , down );
738739 return 1 ;
739740
@@ -776,7 +777,7 @@ nk_gdi_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
776777 case VK_PRIOR :
777778 nk_input_key (& gdi .ctx , NK_KEY_SCROLL_UP , down );
778779 return 1 ;
779-
780+
780781 case 'A' :
781782 if (ctrl ) {
782783 nk_input_key (& gdi .ctx , NK_KEY_TEXT_SELECT_ALL , down );
0 commit comments