diff options
author | darkvater <darkvater@openttd.org> | 2005-01-15 15:48:05 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2005-01-15 15:48:05 +0000 |
commit | ef3b9161f8f106a7cf6b02766fac06d92523816a (patch) | |
tree | 174b12956255bea6bb6661e6e5a30597c730575c | |
parent | 559317f9d0ed7d32cff54939a3296922e3fae066 (diff) | |
download | openttd-ef3b9161f8f106a7cf6b02766fac06d92523816a.tar.xz |
(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)
-rw-r--r-- | sdl.c | 2 | ||||
-rw-r--r-- | stdafx.h | 4 | ||||
-rw-r--r-- | texteff.c | 2 | ||||
-rw-r--r-- | ttd.dsp | 8 | ||||
-rw-r--r-- | ttd.vcproj | 1 | ||||
-rw-r--r-- | win32.c | 4 |
6 files changed, 10 insertions, 11 deletions
@@ -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; } @@ -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 @@ -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]; @@ -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"
diff --git a/ttd.vcproj b/ttd.vcproj index 2dad3071b..1a8b0b5ef 100644 --- a/ttd.vcproj +++ b/ttd.vcproj @@ -189,6 +189,7 @@ WarnAsError="TRUE"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
+ CallingConvention="0"
CompileAs="1"/>
<Tool
Name="VCCustomBuildTool"/>
@@ -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); |