mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
Merge branch 'maint'
This commit is contained in:
commit
e126c3ec2f
4 changed files with 8 additions and 8 deletions
|
@ -1126,10 +1126,11 @@ if( NOT WIN32 )
|
|||
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make
|
||||
COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make )
|
||||
endif( NOT WIN32 )
|
||||
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
|
||||
# GCC misoptimizes this file
|
||||
set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" )
|
||||
|
||||
endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
|
||||
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||
# Need to enable intrinsics for this file.
|
||||
if( SSE_MATTERS )
|
||||
set_source_files_properties( x86.cpp PROPERTIES COMPILE_FLAGS "-msse2 -mmmx" )
|
||||
|
|
|
@ -775,7 +775,7 @@ void G_AddViewPitch (int look)
|
|||
else if (look > 0)
|
||||
{
|
||||
// Avoid overflowing
|
||||
if (LocalViewPitch + look <= LocalViewPitch)
|
||||
if (LocalViewPitch > INT_MAX - look)
|
||||
{
|
||||
LocalViewPitch = 0x78000000;
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ void G_AddViewPitch (int look)
|
|||
else if (look < 0)
|
||||
{
|
||||
// Avoid overflowing
|
||||
if (LocalViewPitch + look >= LocalViewPitch)
|
||||
if (LocalViewPitch < INT_MIN - look)
|
||||
{
|
||||
LocalViewPitch = -0x78000000;
|
||||
}
|
||||
|
|
|
@ -608,7 +608,7 @@ void R_InterpolateView (player_t *player, fixed_t frac, InterpolationViewer *ivi
|
|||
if (delta > 0)
|
||||
{
|
||||
// Avoid overflowing viewpitch (can happen when a netgame is stalled)
|
||||
if (viewpitch + delta <= viewpitch)
|
||||
if (viewpitch > INT_MAX - delta)
|
||||
{
|
||||
viewpitch = player->MaxPitch;
|
||||
}
|
||||
|
@ -620,7 +620,7 @@ void R_InterpolateView (player_t *player, fixed_t frac, InterpolationViewer *ivi
|
|||
else if (delta < 0)
|
||||
{
|
||||
// Avoid overflowing viewpitch (can happen when a netgame is stalled)
|
||||
if (viewpitch + delta >= viewpitch)
|
||||
if (viewpitch < INT_MIN - delta)
|
||||
{
|
||||
viewpitch = player->MinPitch;
|
||||
}
|
||||
|
|
|
@ -704,8 +704,7 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
|||
printf ("%d. %s (%s)\n", i+1, wads[i].Name.GetChars(), filepart);
|
||||
}
|
||||
printf ("Which one? ");
|
||||
scanf ("%d", &i);
|
||||
if (i > numwads)
|
||||
if (scanf ("%d", &i) != 1 || i > numwads)
|
||||
return -1;
|
||||
return i-1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue