(svn r1523) -Fix: somehow mousewheel was disabled on windows using SDL; reenabled again

-Fix: added missing CDECL to ellipsis functions and changed VS6 project file to use _cdecl calling conventions (thx tamlin)
This commit is contained in:
darkvater 2005-01-15 15:48:05 +00:00
parent 0c01db5255
commit 1d127765c3
6 changed files with 10 additions and 11 deletions

2
sdl.c
View File

@ -478,14 +478,12 @@ static int PollEvent(void)
_right_button_down = true;
_right_button_clicked = true;
break;
#if !defined(WIN32)
case SDL_BUTTON_WHEELUP:
_cursor.wheel--;
break;
case SDL_BUTTON_WHEELDOWN:
_cursor.wheel++;
break;
#endif
default:
break;
}

View File

@ -105,8 +105,8 @@
# define inline _inline
# define CDECL _cdecl
# define NOT_REACHED() _assume(0)
int snprintf(char *str, size_t size, const char *format, ...);
int vsnprintf(char *str, size_t size, const char *format, va_list ap);
int CDECL snprintf(char *str, size_t size, const char *format, ...);
int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap);
# undef TTD_ALIGNMENT_4
# undef TTD_ALIGNMENT_2
# define GCC_PACK

View File

@ -46,7 +46,7 @@ static byte _textmessage_backup[150*400]; // (y * max_width)
extern void memcpy_pitch(void *d, void *s, int w, int h, int spitch, int dpitch);
// Duration is in game-days
void AddTextMessage(uint16 color, uint8 duration, const char *message, ...)
void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...)
{
int i;
char buf[1024];

View File

@ -44,7 +44,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /Gr /Zp4 /W3 /Zi /Ox /Oa /Ow /Og /Oi /Os /Gf /Gy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32_EXCEPTION_TRACKER" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /FAcs /FR /Yu"stdafx.h" /J /FD /c
# ADD CPP /nologo /Gd /Zp4 /W3 /Zi /Ox /Oa /Ow /Og /Oi /Os /Gf /Gy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32_EXCEPTION_TRACKER" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /FAcs /FR /Yu"stdafx.h" /J /FD /c
# SUBTRACT CPP /WX /Ot
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"
@ -98,7 +98,7 @@ LINK32=link.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WITH_SDL" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /YX"stdafx.h" /FD /GZ /c
# SUBTRACT BASE CPP /WX /Fr
# ADD CPP /nologo /Gr /Zp4 /ML /W3 /Gm /Zi /Ox /Oa /Ow /Og /Oi /Os /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WITH_SDL" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /YX"stdafx.h" /FD /c
# ADD CPP /nologo /Gd /Zp4 /ML /W3 /Gm /Zi /Ox /Oa /Ow /Og /Oi /Os /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WITH_SDL" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /YX"stdafx.h" /FD /c
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe
@ -124,9 +124,9 @@ LINK32=link.exe
# PROP Intermediate_Dir "ReleasePNG"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Gr /Zp4 /W3 /Zi /Ox /Oa /Ow /Og /Oi /Os /Gf /Gy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32_EXCEPTION_TRACKER" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /FAcs /FR /Yu"stdafx.h" /J /FD /c
# ADD BASE CPP /nologo /Gd /Zp4 /W3 /Zi /Ox /Oa /Ow /Og /Oi /Os /Gf /Gy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32_EXCEPTION_TRACKER" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /FAcs /FR /Yu"stdafx.h" /J /FD /c
# SUBTRACT BASE CPP /WX /Ot
# ADD CPP /nologo /Gr /Zp4 /W3 /Zi /Ox /Oa /Ow /Og /Oi /Os /Gf /Gy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32_EXCEPTION_TRACKER" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /D "WITH_PNG" /D "WITH_ZLIB" /FAcs /FR /Yu"stdafx.h" /J /FD /c
# ADD CPP /nologo /Gd /Zp4 /W3 /Zi /Ox /Oa /Ow /Og /Oi /Os /Gf /Gy /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32_EXCEPTION_TRACKER" /D "WIN32_ENABLE_DIRECTMUSIC_SUPPORT" /D "WITH_PNG" /D "WITH_ZLIB" /FAcs /FR /Yu"stdafx.h" /J /FD /c
# SUBTRACT CPP /WX /Ot
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG"

View File

@ -189,6 +189,7 @@
WarnAsError="TRUE"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CallingConvention="0"
CompileAs="1"/>
<Tool
Name="VCCustomBuildTool"/>

View File

@ -2074,7 +2074,7 @@ void DeterminePaths()
CreateDirectory(_path.scenario_dir, NULL);
}
int snprintf(char *str, size_t size, const char *format, ...)
int CDECL snprintf(char *str, size_t size, const char *format, ...)
{
va_list ap;
int ret;
@ -2085,7 +2085,7 @@ int snprintf(char *str, size_t size, const char *format, ...)
return ret;
}
int vsnprintf(char *str, size_t size, const char *format, va_list ap)
int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap)
{
int ret;
ret = _vsnprintf(str, size, format, ap);