From 137011aed4d11feb6a7e74797d2051f058a835a1 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 7 Mar 2006 20:39:58 +0000 Subject: [PATCH] some win64 fixes from Willis git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6080 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 2 +- snd_mem.c | 4 ++-- vid_sdl.c | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cl_screen.c b/cl_screen.c index afcf2f7c..74cfdc69 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -514,7 +514,7 @@ void R_TimeReport(char *desc) t = (int) ((r_timereport_current - r_timereport_temp) * 1000000.0); dpsnprintf(tempbuf, sizeof(tempbuf), "%8i %-11s", t, desc); - length = strlen(tempbuf); + length = (int)strlen(tempbuf); if (speedstringcount + length > (vid_conwidth.integer / 8)) { strlcat(r_speeds_string, "\n", sizeof(r_speeds_string)); diff --git a/snd_mem.c b/snd_mem.c index 20d9c6b7..16b6e176 100644 --- a/snd_mem.c +++ b/snd_mem.c @@ -82,8 +82,8 @@ size_t ResampleSfx (const unsigned char *in_data, size_t in_length, const snd_fo // also to be able to handle very long sounds. while (total_out < outcount) { - size_t tmpcount, i, j; - unsigned int interpolation_limit, srcsample; + size_t tmpcount, interpolation_limit, i, j; + unsigned int srcsample; samplefrac = 0; diff --git a/vid_sdl.c b/vid_sdl.c index 258bd8e5..6f59ad30 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -346,11 +346,13 @@ static void VID_SetCaption() return; icon = LoadIcon( GetModuleHandle( NULL ), MAKEINTRESOURCE( IDI_ICON1 ) ); -#ifndef WIN64 - SetClassLong( info.window, GCL_HICON, (LONG) icon ); -#else - SetClassLongPtr( info.window, GCLP_HICON, (LONG_PTR)icon ); +#ifndef SetClassLongPtr +#define SetClassLongPtr SetClassLong #endif +#ifndef GCLP_HICON +#define GCLP_HICON GCL_HICON +#endif + SetClassLongPtr( info.window, GCLP_HICON, (LONG_PTR)icon ); } #else static void VID_SetCaption() -- 2.39.2