ref: 5ddb558a635208d9c08210be8283c83a8d45278f
parent: 95a7160ca80c21057ecfe72fdba4a2dd977223e3
parent: fa3dc6f58921ec8299b1ec49913b75fda1659e74
author: Simon Howard <fraggle@gmail.com>
date: Sat Apr 11 22:22:06 EDT 2015
Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doom
--- a/opl/examples/droplay.c
+++ b/opl/examples/droplay.c
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "SDL.h"
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -16,6 +16,7 @@
// MN_menu.c
+#include <stdlib.h>
#include <ctype.h>
#include "deh_str.h"
--- a/src/heretic/p_saveg.c
+++ b/src/heretic/p_saveg.c
@@ -16,6 +16,8 @@
// P_tick.c
+#include <stdlib.h>
+
#include "doomdef.h"
#include "i_swap.h"
#include "i_system.h"
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -20,6 +20,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
+
#include "SDL.h"
#include "SDL_mixer.h"
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -479,9 +479,7 @@
case SDLK_PAUSE: return KEY_PAUSE;
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
case SDLK_EQUALS: return KEY_EQUALS;
-#endif
case SDLK_MINUS: return KEY_MINUS;
@@ -495,10 +493,8 @@
case SDLK_LALT:
case SDLK_RALT:
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
case SDLK_LMETA:
case SDLK_RMETA:
-#endif
return KEY_RALT;
case SDLK_CAPSLOCK: return KEY_CAPSLOCK;
@@ -829,11 +825,7 @@
// Clear any relative movement caused by warping
SDL_PumpEvents();
-#if SDL_VERSION_ATLEAST(1, 3, 0)
- SDL_GetRelativeMouseState(0, NULL, NULL);
-#else
SDL_GetRelativeMouseState(NULL, NULL);
-#endif
}
//
@@ -847,11 +839,7 @@
int x, y;
event_t ev;
-#if SDL_VERSION_ATLEAST(1, 3, 0)
- SDL_GetRelativeMouseState(0, &x, &y);
-#else
SDL_GetRelativeMouseState(&x, &y);
-#endif
if (x != 0 || y != 0)
{
@@ -2023,9 +2011,7 @@
// has to be done before the call to SDL_SetVideoMode.
I_InitWindowTitle();
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
I_InitWindowIcon();
-#endif
// Warning to OS X users... though they might never see it :(
#ifdef __MACOSX__
--- a/src/setup/execute.c
+++ b/src/setup/execute.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#include <sys/types.h>
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "doomtype.h"
#include "i_joystick.h"
--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@ -412,11 +412,7 @@
void TXT_GetMousePosition(int *x, int *y)
{
-#if SDL_VERSION_ATLEAST(1, 3, 0)
- SDL_GetMouseState(0, x, y);
-#else
SDL_GetMouseState(x, y);
-#endif
*x /= font->w;
*y /= font->h;
@@ -466,10 +462,8 @@
case SDLK_LALT:
case SDLK_RALT:
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
case SDLK_LMETA:
case SDLK_RMETA:
-#endif
return KEY_RALT;
case SDLK_CAPSLOCK: return KEY_CAPSLOCK;
@@ -604,10 +598,8 @@
case SDLK_LALT:
case SDLK_RALT:
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
case SDLK_LMETA:
case SDLK_RMETA:
-#endif
mod = TXT_MOD_ALT;
break;
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -12,6 +12,7 @@
// GNU General Public License for more details.
//
+#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
--- a/textscreen/txt_window_action.c
+++ b/textscreen/txt_window_action.c
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#include "doomkeys.h"