mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(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:
parent
559317f9d0
commit
ef3b9161f8
2
sdl.c
2
sdl.c
@ -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;
|
||||||
}
|
}
|
||||||
|
4
stdafx.h
4
stdafx.h
@ -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
|
||||||
|
@ -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];
|
||||||
|
8
ttd.dsp
8
ttd.dsp
@ -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"
|
||||||
|
@ -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"/>
|
||||||
|
4
win32.c
4
win32.c
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user