(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 559317f9d0
commit ef3b9161f8
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_down = true;
_right_button_clicked = true; _right_button_clicked = true;
break; break;
#if !defined(WIN32)
case SDL_BUTTON_WHEELUP: case SDL_BUTTON_WHEELUP:
_cursor.wheel--; _cursor.wheel--;
break; break;
case SDL_BUTTON_WHEELDOWN: case SDL_BUTTON_WHEELDOWN:
_cursor.wheel++; _cursor.wheel++;
break; break;
#endif
default: default:
break; break;
} }

View File

@ -105,8 +105,8 @@
# define inline _inline # define inline _inline
# define CDECL _cdecl # define CDECL _cdecl
# define NOT_REACHED() _assume(0) # define NOT_REACHED() _assume(0)
int snprintf(char *str, size_t size, const char *format, ...); int CDECL snprintf(char *str, size_t size, const char *format, ...);
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);
# undef TTD_ALIGNMENT_4 # undef TTD_ALIGNMENT_4
# undef TTD_ALIGNMENT_2 # undef TTD_ALIGNMENT_2
# define GCC_PACK # 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); extern void memcpy_pitch(void *d, void *s, int w, int h, int spitch, int dpitch);
// Duration is in game-days // 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; int i;
char buf[1024]; char buf[1024];

View File

@ -44,7 +44,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c # 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 # SUBTRACT CPP /WX /Ot
# ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"
@ -98,7 +98,7 @@ LINK32=link.exe
# PROP Target_Dir "" # 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 # 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 # 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 BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@ -124,9 +124,9 @@ LINK32=link.exe
# PROP Intermediate_Dir "ReleasePNG" # PROP Intermediate_Dir "ReleasePNG"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # 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 # 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 # SUBTRACT CPP /WX /Ot
# ADD BASE RSC /l 0x809 /d "NDEBUG" # ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /d "NDEBUG" # ADD RSC /l 0x809 /d "NDEBUG"

View File

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

View File

@ -2074,7 +2074,7 @@ void DeterminePaths()
CreateDirectory(_path.scenario_dir, NULL); 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; va_list ap;
int ret; int ret;
@ -2085,7 +2085,7 @@ int snprintf(char *str, size_t size, const char *format, ...)
return ret; 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; int ret;
ret = _vsnprintf(str, size, format, ap); ret = _vsnprintf(str, size, format, ap);