mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 02:01:50 +08:00
tune code for 64 bitts
This commit is contained in:
10
configure.ac
10
configure.ac
@@ -1727,6 +1727,7 @@ if test "x$devel_mode" = "xyes"; then
|
||||
|
||||
build_ctrl_bidisledit="yes"
|
||||
build_ctrl_textedit="yes"
|
||||
build_ctrl_scrollview="yes"
|
||||
build_ctrl_monthcal="yes"
|
||||
build_ctrl_treeview="yes"
|
||||
build_ctrl_treeview_rdr="yes"
|
||||
@@ -1746,6 +1747,15 @@ if test "x$devel_mode" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
fi
|
||||
|
||||
dnl Depedencies
|
||||
if test "x$build_ctrl_treeview" = "xyes"; then
|
||||
build_ctrl_scrollview="yes"
|
||||
fi
|
||||
|
||||
if test "x$build_ctrl_treeview_rdr" = "xyes"; then
|
||||
build_ctrl_scrollview="yes"
|
||||
fi
|
||||
|
||||
if test "x$use_debug" = "xyes"; then
|
||||
AC_DEFINE(_DEBUG, 1,
|
||||
[Define if build with debugging messages])
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2012 FMSoft.
|
||||
Copyright (C) 2002-2018 FMSoft.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by FMSoft (http://www.fmsoft.cn).
|
||||
@@ -238,7 +238,7 @@ MGUI_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
|
||||
*
|
||||
* to write endianness independent code.
|
||||
*/
|
||||
#if defined(__i386__) || defined(__ia64__) || defined(__x86_64__) || defined(__amd64) || \
|
||||
#if defined(__i386__) || defined(__ia64__) || defined(__x86_64__) || defined(__amd64) || \
|
||||
(defined(__alpha__) || defined(__alpha)) || \
|
||||
defined(__arm__) || \
|
||||
(defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \
|
||||
|
||||
@@ -70,7 +70,7 @@ extern "C" {
|
||||
/** Default container window procedure
|
||||
* \sa DefaultDialogProc
|
||||
*/
|
||||
MG_EXPORT int GUIAPI DefaultContainerProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
MG_EXPORT LRESULT GUIAPI DefaultContainerProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
/** Scrollview item object, use this handle to access a scrollview item */
|
||||
typedef GHANDLE HSVITEM;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2012 FMSoft.
|
||||
Copyright (C) 2002-2018 FMSoft.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by FMSoft (http://www.fmsoft.cn).
|
||||
@@ -8891,20 +8891,20 @@ MG_EXPORT void GUIAPI BIDIGetVisualEmbeddLevels (LOGFONT* log_font,
|
||||
*
|
||||
*/
|
||||
typedef struct _COMP_CTXT {
|
||||
/** the step of current pixel operations. */
|
||||
int step;
|
||||
|
||||
/** the pointer to the destination */
|
||||
gal_uint8* cur_dst;
|
||||
|
||||
/** The user context passed to SetUserCompositionOps */
|
||||
void* user_comp_ctxt;
|
||||
|
||||
/** the pixel value shoulb be skipped (the color key) */
|
||||
gal_pixel skip_pixel;
|
||||
|
||||
/** the current pixel value for setpixel and setpixels operation */
|
||||
gal_pixel cur_pixel;
|
||||
|
||||
/** The user context passed to SetUserCompositionOps */
|
||||
void* user_comp_ctxt;
|
||||
/** the step of current pixel operations. */
|
||||
int step;
|
||||
} COMP_CTXT;
|
||||
|
||||
/*
|
||||
|
||||
@@ -4118,7 +4118,7 @@ typedef struct _WINDOWINFO
|
||||
*/
|
||||
static inline const WINDOWINFO* GUIAPI GetWindowInfo (HWND hWnd)
|
||||
{
|
||||
return (WINDOWINFO*)((unsigned char*)hWnd + 2*sizeof (short));
|
||||
return (WINDOWINFO*)hWnd;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -409,27 +409,27 @@ int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
||||
return 0;
|
||||
|
||||
case SVM_SETITEMDRAW:
|
||||
return (int)mglist_set_itemdraw (mglst, (SVITEM_DRAWFUNC)lParam);
|
||||
return (LRESULT)mglist_set_itemdraw (mglst, (SVITEM_DRAWFUNC)lParam);
|
||||
|
||||
case SVM_SETITEMINIT:
|
||||
{
|
||||
SVITEM_INITFUNC old_pfn;
|
||||
old_pfn = mglst->iop.initItem;
|
||||
mglst->iop.initItem = (SVITEM_INITFUNC)lParam;
|
||||
return (int)old_pfn;
|
||||
return (LRESULT)old_pfn;
|
||||
}
|
||||
case SVM_SETITEMDESTROY:
|
||||
{
|
||||
SVITEM_DESTROYFUNC old_pfn;
|
||||
old_pfn = mglst->iop.destroyItem;
|
||||
mglst->iop.destroyItem = (SVITEM_DESTROYFUNC)lParam;
|
||||
return (int)old_pfn;
|
||||
return (LRESULT)old_pfn;
|
||||
}
|
||||
|
||||
case SVM_GETITEMADDDATA:
|
||||
{
|
||||
if (lParam)
|
||||
return mglist_get_item_adddata(lParam);
|
||||
return mglist_get_item_adddata((HITEM)lParam);
|
||||
else {
|
||||
HITEM hitem = (HITEM)mglist_getitem_byindex(mglst, wParam);
|
||||
return mglist_get_item_adddata(hitem);
|
||||
@@ -523,7 +523,7 @@ int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
||||
{
|
||||
SVITEM_CMP oldcmp = mglst->itemCmp;
|
||||
mglst->itemCmp = (SVITEM_CMP)lParam;
|
||||
return (int)oldcmp;
|
||||
return (LRESULT)oldcmp;
|
||||
}
|
||||
|
||||
case SVM_SORTITEMS:
|
||||
|
||||
@@ -430,7 +430,7 @@ void scrollview_destroy (PSVDATA psvdata)
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------- */
|
||||
static LRESULT ScrollViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT ScrollViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PSVDATA psvdata = NULL;
|
||||
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
**
|
||||
** scrollview.h: header file of ScrollView control.
|
||||
**
|
||||
** Copyright (C) 2004 ~ 2007 Feynman Software.
|
||||
** Copyright (C) 2004 ~ 2018 FMSoft
|
||||
*/
|
||||
|
||||
#ifndef _SCROLLVIEW_IMPL_H_
|
||||
#define _SCROLLVIEW_IMPL_H_
|
||||
|
||||
|
||||
#include "listmodel.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
@@ -81,7 +79,8 @@ typedef SVDATA *PSVDATA;
|
||||
|
||||
/* ------------------------- external api -------------------------- */
|
||||
|
||||
MG_EXPORT int ScrollViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
MG_EXPORT LRESULT ScrollViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
MG_EXPORT int scrollview_init (HWND hWnd, PSVDATA psv);
|
||||
MG_EXPORT void scrollview_destroy (PSVDATA psvdata);
|
||||
MG_EXPORT HSVITEM scrollview_add_item (HWND hWnd, PSVDATA psvdata, HSVITEM hsvi, PSVITEMINFO pii, int *idx);
|
||||
|
||||
@@ -220,7 +220,7 @@ static LRESULT ScrollWndCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM
|
||||
}
|
||||
|
||||
case SVM_GETCTRL:
|
||||
return GetDlgItem (pswdata->hContainer, wParam);
|
||||
return (LRESULT)GetDlgItem (pswdata->hContainer, wParam);
|
||||
|
||||
case SVM_RESETCONTENT:
|
||||
scrollwnd_reset_content (hWnd, pswdata);
|
||||
@@ -231,7 +231,7 @@ static LRESULT ScrollWndCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM
|
||||
return 0;
|
||||
|
||||
case SVM_GETFOCUSCHILD:
|
||||
return (int)GetFocus (pswdata->hContainer);
|
||||
return (LRESULT)GetFocus (pswdata->hContainer);
|
||||
|
||||
}/* end switch */
|
||||
|
||||
@@ -285,8 +285,8 @@ static void container_destroy (HWND hWnd, PCONTDATA pcontdata)
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
||||
int GUIAPI
|
||||
DefaultContainerProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT GUIAPI
|
||||
DefaultContainerProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PCONTDATA pcontdata = NULL;
|
||||
|
||||
|
||||
@@ -50,8 +50,6 @@ typedef struct _swdata
|
||||
} SWDATA;
|
||||
typedef SWDATA *PSWDATA;
|
||||
|
||||
|
||||
int ScrollWndCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
int scrollwnd_init (HWND hWnd, PSWDATA psv);
|
||||
void scrollwnd_destroy (PSWDATA pswdata);
|
||||
void scrollwnd_hscroll (HWND hWnd, PSWDATA pswdata, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
@@ -374,7 +374,6 @@ static int init (PWERENDERER renderer)
|
||||
|
||||
renderer->private_info = NULL;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -822,10 +822,11 @@ BOOL mg_InitLFManager (void)
|
||||
|
||||
/** be sure to success initializing default renderer */
|
||||
rdr = wnd_lf_info[0].wnd_rdr;
|
||||
if (NULL == rdr) return FALSE;
|
||||
if (NULL == rdr)
|
||||
return FALSE;
|
||||
|
||||
if (rdr->init && 0 != rdr->init (rdr)) {
|
||||
_MG_PRINTF ("GUI>InitLFM: fail to initialize default renderer's private info.\n");
|
||||
_MG_PRINTF ("GUI>InitLFM: failed to initialize default renderer's private info.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -4747,20 +4747,17 @@ static BOOL _wndInvalidateRect(HWND hWnd, const RECT* prc, BOOL bEraseBkgnd, int
|
||||
#ifdef _MGRM_THREADS
|
||||
pthread_mutex_lock(&pInvRgn->lock);
|
||||
#endif
|
||||
if (bEraseBkgnd)
|
||||
{
|
||||
if (bEraseBkgnd) {
|
||||
pCtrl->Flags |= WF_ERASEBKGND;
|
||||
}
|
||||
|
||||
if(prc)
|
||||
{
|
||||
if(prc) {
|
||||
rcInv = *prc;
|
||||
NormalizeRect(&rcInv);
|
||||
if(IntersectRect(&rcInv, &rcInv, &rcClient))
|
||||
AddClipRect(&pInvRgn->rgn, &rcInv);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
rcInv = rcClient;
|
||||
SetClipRgn(&pInvRgn->rgn, &rcInv);
|
||||
}
|
||||
@@ -4769,7 +4766,7 @@ static BOOL _wndInvalidateRect(HWND hWnd, const RECT* prc, BOOL bEraseBkgnd, int
|
||||
OffsetRect(&rcTemp, pCtrl->cl, pCtrl->ct);
|
||||
|
||||
//subtract from next sibling controls
|
||||
if(pCtrl->WinType==TYPE_CONTROL /*&& ( mark & WIRM_NEXT_SIBLING)*/)
|
||||
if(pCtrl->WinType == TYPE_CONTROL /*&& ( mark & WIRM_NEXT_SIBLING)*/)
|
||||
{
|
||||
for(pNext = pCtrl->next; pNext; pNext = pNext->next)
|
||||
{
|
||||
|
||||
@@ -42,10 +42,6 @@ typedef struct tagCONTROL
|
||||
/*
|
||||
* These fields are similiar with MAINWIN struct.
|
||||
*/
|
||||
unsigned char DataType; // the data type
|
||||
unsigned char WinType; // the window type
|
||||
unsigned short Flags; // speical runtime flags, such EraseBkGnd flags
|
||||
|
||||
int left, top; // the position of control in main window's
|
||||
int right, bottom; // client area.
|
||||
|
||||
@@ -110,6 +106,14 @@ typedef struct tagCONTROL
|
||||
*/
|
||||
struct _wnd_element_data* wed;
|
||||
|
||||
/*
|
||||
* some internal fields
|
||||
* VM[2018-01-18]: Move these fields from header to here to compatible with WINDOWINFO
|
||||
*/
|
||||
unsigned char DataType; // the data type
|
||||
unsigned char WinType; // the window type
|
||||
unsigned short Flags; // speical runtime flags, such EraseBkGnd flags
|
||||
|
||||
/*
|
||||
* The following members are only implemented for control.
|
||||
*/
|
||||
|
||||
@@ -186,11 +186,12 @@ struct tagDC
|
||||
|
||||
/* === context information. ============================================= */
|
||||
/* DK[01/22/10]:This segment is binary compatible with _COMP_CTXT struct */
|
||||
int step;
|
||||
gal_uint8* cur_dst;
|
||||
gal_pixel skip_pixel;
|
||||
gal_pixel cur_pixel;
|
||||
void * user_comp_ctxt;
|
||||
/* VW[01/18/18]:Adjust the fields sequence for 64-bit to ensure 8-byte alignment */
|
||||
gal_uint8* cur_dst;
|
||||
void* user_comp_ctxt;
|
||||
gal_pixel skip_pixel;
|
||||
gal_pixel cur_pixel;
|
||||
int step;
|
||||
/* ====================================================================== */
|
||||
|
||||
CLIPRECT* cur_ban;
|
||||
@@ -212,7 +213,7 @@ struct tagDC
|
||||
CB_BITMAP_SCALER_FUNC bitmap_scaler;
|
||||
};
|
||||
|
||||
#define PDC_TO_COMP_CTXT(pdc) ((COMP_CTXT* )(&pdc->step))
|
||||
#define PDC_TO_COMP_CTXT(pdc) ((COMP_CTXT* )(&pdc->cur_dst))
|
||||
|
||||
extern DC __mg_screen_dc;
|
||||
extern DC __mg_screen_sys_dc;
|
||||
|
||||
@@ -293,10 +293,6 @@ typedef struct _MAINWIN
|
||||
/*
|
||||
* These fields are similiar with CONTROL struct.
|
||||
*/
|
||||
unsigned char DataType; // the data type.
|
||||
unsigned char WinType; // the window type.
|
||||
unsigned short Flags; // special runtime flags, such EraseBkGnd flags
|
||||
|
||||
int left, top; // the position and size of main window.
|
||||
int right, bottom;
|
||||
|
||||
@@ -363,9 +359,17 @@ typedef struct _MAINWIN
|
||||
*/
|
||||
struct _wnd_element_data* wed;
|
||||
|
||||
/*
|
||||
* some internal fields
|
||||
* VM[2018-01-18]: Move these fields from header to here to compatible with WINDOWINFO
|
||||
*/
|
||||
unsigned char DataType; // the data type.
|
||||
unsigned char WinType; // the window type.
|
||||
unsigned short Flags; // special runtime flags, such EraseBkGnd flags
|
||||
|
||||
/*
|
||||
* Main Window hosting.
|
||||
* The following members are only implemented for main window.
|
||||
* Main Window hosting.
|
||||
*/
|
||||
struct _MAINWIN* pHosting;
|
||||
// the hosting main window.
|
||||
|
||||
@@ -63,7 +63,8 @@ typedef struct GAL_Surface {
|
||||
GAL_PixelFormat *format; /* Read-only */
|
||||
void *video; /* Read-only */
|
||||
int w, h; /* Read-only */
|
||||
Uint32 pitch; /* Read-only */
|
||||
/* VW[2018-01-18]: For 64b, use signed int instead of Uint32 for pitch. */
|
||||
int pitch; /* Read-only */
|
||||
void *pixels; /* Read-write */
|
||||
int offset; /* Private */
|
||||
|
||||
|
||||
@@ -102,13 +102,17 @@ HCURSOR GUIAPI LoadCursorFromFile(const char* filename)
|
||||
BYTE* image;
|
||||
HCURSOR csr = 0;
|
||||
|
||||
if( !(fp = fopen(filename, "rb")) ) return 0;
|
||||
if (!(fp = fopen(filename, "rb")))
|
||||
return 0;
|
||||
|
||||
fseek(fp, sizeof(WORD16), SEEK_SET);
|
||||
|
||||
/* the cbType of struct CURSORDIR. */
|
||||
wTemp = MGUI_ReadLE16FP (fp);
|
||||
if(wTemp != 2) goto error;
|
||||
if(wTemp != 2) {
|
||||
_MG_PRINTF ("LoadCursorFromFile: bad file type: %d\n", wTemp);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* skip the cdCount of struct CURSORDIR, we always use the first cursor. */
|
||||
fseek(fp, sizeof(WORD16), SEEK_CUR);
|
||||
@@ -116,7 +120,11 @@ HCURSOR GUIAPI LoadCursorFromFile(const char* filename)
|
||||
/* cursor info, read the members of struct CURSORDIRENTRY. */
|
||||
w = fgetc (fp); /* the width of first cursor. */
|
||||
h = fgetc (fp); /* the height of first cursor. */
|
||||
if(w != CURSORWIDTH || h != CURSORHEIGHT) goto error;
|
||||
if (w != CURSORWIDTH || h != CURSORHEIGHT) {
|
||||
_MG_PRINTF ("LoadCursorFromFile: bad first cursor width (%d) and height (%d)\n", w, h);
|
||||
goto error;
|
||||
}
|
||||
|
||||
fseek(fp, sizeof(BYTE)*2, SEEK_CUR); /* skip bColorCount and bReserved. */
|
||||
wTemp = MGUI_ReadLE16FP (fp);
|
||||
xhot = wTemp;
|
||||
@@ -134,16 +142,25 @@ HCURSOR GUIAPI LoadCursorFromFile(const char* filename)
|
||||
fseek(fp, sizeof(DWORD32), SEEK_CUR); /* skip the biSize member. */
|
||||
imagew = MGUI_ReadLE32FP (fp);
|
||||
imageh = MGUI_ReadLE32FP (fp);
|
||||
if (imagew > 32 || imageh > 32) {
|
||||
if (imagew != CURSORWIDTH || imageh != (CURSORHEIGHT*2)) {
|
||||
_MG_PRINTF ("LoadCursorFromFile: bad cursor image width (%d) and height (%d)\n", imagew, imageh);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* check the biPlanes member; */
|
||||
wTemp = MGUI_ReadLE16FP (fp);
|
||||
if(wTemp != 1) goto error;
|
||||
if (wTemp != 1) {
|
||||
_MG_PRINTF ("LoadCursorFromFile: bad planes (%d)\n", wTemp);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* check the biBitCount member; */
|
||||
wTemp = MGUI_ReadLE16FP (fp);
|
||||
if(wTemp > 4) goto error;
|
||||
if (wTemp > 4) {
|
||||
_MG_PRINTF ("LoadCursorFromFile: bad bit count (%d)\n", wTemp);
|
||||
goto error;
|
||||
}
|
||||
|
||||
colornum = (int)wTemp;
|
||||
fseek(fp, sizeof(DWORD32), SEEK_CUR); /* skip the biCompression members. */
|
||||
imagesize = MGUI_ReadLE32FP (fp);
|
||||
@@ -153,20 +170,25 @@ HCURSOR GUIAPI LoadCursorFromFile(const char* filename)
|
||||
|
||||
/* allocate memory for image. */
|
||||
if ((image = (BYTE*)ALLOCATE_LOCAL (imagesize)) == NULL) {
|
||||
_MG_PRINTF ("LoadCursorFromFile: error when allocating memory for image (%d)\n", imagesize);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* read image */
|
||||
if (fread (image, imagesize, 1, fp) < imagesize) {
|
||||
if (fread (image, 1, imagesize, fp) < imagesize) {
|
||||
_MG_PRINTF ("LoadCursorFromFile: error when reading data from file\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
csr = CreateCursor(xhot, yhot, w, h,
|
||||
csr = CreateCursor (xhot, yhot, w, h,
|
||||
image + (imagesize - MONOSIZE), image, colornum);
|
||||
|
||||
DEALLOCATE_LOCAL (image);
|
||||
fclose (fp);
|
||||
return csr;
|
||||
|
||||
error:
|
||||
_MG_PRINTF ("LoadCursorFromFile: failed when loading cursor from %s\n", filename);
|
||||
fclose (fp);
|
||||
return csr;
|
||||
}
|
||||
@@ -237,6 +259,7 @@ HCURSOR GUIAPI LoadCursorFromMem (const void* area)
|
||||
p + (imagesize - MONOSIZE), p, colornum);
|
||||
|
||||
error:
|
||||
_MG_PRINTF ("LoadCursorFromMem: failed when loading cursor from %p\n", area);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ Uint16 MGUI_ReadLE16FP (FILE *src)
|
||||
size_t size;
|
||||
|
||||
size = fread (&value, (sizeof value), 1, src);
|
||||
if (size < sizeof (value))
|
||||
if (size < 1)
|
||||
return -1;
|
||||
|
||||
return (ArchSwapLE16(value));
|
||||
@@ -123,7 +123,7 @@ Uint32 MGUI_ReadLE32FP (FILE *src)
|
||||
size_t size;
|
||||
|
||||
size = fread(&value, (sizeof value), 1, src);
|
||||
if (size < sizeof (value))
|
||||
if (size < 1)
|
||||
return -1;
|
||||
|
||||
return (ArchSwapLE32(value));
|
||||
|
||||
@@ -591,7 +591,6 @@ static void _dc_draw_pixel_span_set_1 (COMP_CTXT* comp_ctxt, int w)
|
||||
static void _dc_draw_pixel_span_set_2 (COMP_CTXT* comp_ctxt, int w)
|
||||
{
|
||||
int step = comp_ctxt->step;
|
||||
// printf("w=%d, %X\t", w, comp_ctxt->cur_pixel);
|
||||
if (comp_ctxt->cur_pixel != 0 || comp_ctxt->step != 1) {
|
||||
Uint16 * dest16 = (Uint16 *)comp_ctxt->cur_dst;
|
||||
if (w < 5 || step != 1)
|
||||
|
||||
@@ -206,7 +206,7 @@ HICON GUIAPI LoadIconFromFile (HDC hdc, const char* filename, int which)
|
||||
goto error;
|
||||
|
||||
/* read image*/
|
||||
if (fread (image, imagesize, 1, fp) < imagesize) {
|
||||
if (fread (image, 1, imagesize, fp) < imagesize) {
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user