Skip to content

Commit 1b4af73

Browse files
committed
Try to fix MSVC compile.
1 parent b666554 commit 1b4af73

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

dll/3rdparty/libpng/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ list(APPEND SOURCE
2727
pngwutil.c
2828
pngpriv.h)
2929

30-
add_library(libpng SHARED ${SOURCE})
30+
add_library(libpng STATIC ${SOURCE})
3131
set_module_type(libpng win32dll)
3232
target_link_libraries(libpng zlib)
3333
add_importlibs(libpng msvcrt kernel32 ntdll)

win32ss/user/user32/misc/exticon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static UINT ICO_ExtractIconExW(
423423

424424
/* NE exe/dll */
425425
#ifdef __REACTOS__
426-
if (sig==IMAGE_OS2_SIGNATURE || sig==1) /* .ICO file */
426+
if (sig==IMAGE_OS2_SIGNATURE || sig==1) /* .ICO file */
427427
#else
428428
if (sig==IMAGE_OS2_SIGNATURE)
429429
#endif

win32ss/user/user32/windows/cursoricon.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ void PNGtoBMP(_In_ LPBYTE pngbits, _In_ DWORD filesize, _Out_ LPBYTE outbits)
177177
FILE * fp;
178178
CHAR lpTempPathBuffer[MAX_PATH + 1];
179179
MEMORY_READER_STATE memory_reader_state;
180+
png_bytep mem_read_ptr = (png_bytep)&memory_reader_state;
180181
png_uint_32 width, height, channels;
181182
int bit_depth, color_type, interlace_type;
182183
png_bytep* row_pointers;
@@ -222,7 +223,7 @@ void PNGtoBMP(_In_ LPBYTE pngbits, _In_ DWORD filesize, _Out_ LPBYTE outbits)
222223
memory_reader_state.current_pos = PNG_BYTES_TO_CHECK;
223224

224225
// set our own read_function
225-
png_set_read_fn(png_ptr, &memory_reader_state, read_data_memory);
226+
png_set_read_fn(png_ptr, mem_read_ptr, read_data_memory);
226227
png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK);
227228

228229
// Read png info

0 commit comments

Comments
 (0)