diff --git a/client/CVideoHandler.h b/client/CVideoHandler.h index 30d2e0d4d..d7f67394c 100644 --- a/client/CVideoHandler.h +++ b/client/CVideoHandler.h @@ -47,9 +47,6 @@ public: #include #include -#if SDL_VERSION_ATLEAST(1,3,0) && !SDL_VERSION_ATLEAST(2,0,0) -#include -#endif extern "C" { #include diff --git a/client/gui/CGuiHandler.cpp b/client/gui/CGuiHandler.cpp index b1b59e833..1dfb60b09 100644 --- a/client/gui/CGuiHandler.cpp +++ b/client/gui/CGuiHandler.cpp @@ -398,13 +398,10 @@ void CGuiHandler::renderFrame() // draw the mouse cursor and update the screen CCS->curh->render(); - #ifndef VCMI_SDL1 if(0 != SDL_RenderCopy(mainRenderer, screenTexture, nullptr, nullptr)) logGlobal->errorStream() << __FUNCTION__ << " SDL_RenderCopy " << SDL_GetError(); SDL_RenderPresent(mainRenderer); - #endif - }; if(curInt) diff --git a/client/gui/SDL_Compat.h b/client/gui/SDL_Compat.h index ccda77c5d..99dc31f48 100644 --- a/client/gui/SDL_Compat.h +++ b/client/gui/SDL_Compat.h @@ -13,7 +13,6 @@ #include #if (SDL_MAJOR_VERSION == 2) -#define VCMI_SDL2 #include typedef int SDLX_Coord; @@ -25,11 +24,6 @@ typedef SDL_Keycode SDLKey; #define SDL_FULLSCREEN SDL_WINDOW_FULLSCREEN -#elif (SDL_MAJOR_VERSION == 1) -#define VCMI_SDL1 -//SDL 1.x -typedef Sint16 SDLX_Coord; -typedef Uint16 SDLX_Size; #else #error "unknown or unsupported SDL version" #endif diff --git a/client/gui/SDL_Extensions.cpp b/client/gui/SDL_Extensions.cpp index d78c64afc..4a283c9c4 100644 --- a/client/gui/SDL_Extensions.cpp +++ b/client/gui/SDL_Extensions.cpp @@ -14,7 +14,6 @@ const SDL_Color Colors::METALLIC_GOLD = { 173, 142, 66, 0 }; const SDL_Color Colors::GREEN = { 0, 255, 0, 0 }; const SDL_Color Colors::DEFAULT_KEY_COLOR = {0, 255, 255, 0}; -#if (SDL_MAJOR_VERSION == 2) void SDL_UpdateRect(SDL_Surface *surface, int x, int y, int w, int h) { Rect rect(x,y,w,h); @@ -27,7 +26,6 @@ void SDL_UpdateRect(SDL_Surface *surface, int x, int y, int w, int h) SDL_RenderPresent(mainRenderer); } -#endif // VCMI_SDL1 SDL_Surface * CSDL_Ext::newSurface(int w, int h, SDL_Surface * mod) //creates new surface, with flags/format same as in surface given { diff --git a/client/gui/SDL_Extensions.h b/client/gui/SDL_Extensions.h index 1e9f06edd..6ca762818 100644 --- a/client/gui/SDL_Extensions.h +++ b/client/gui/SDL_Extensions.h @@ -27,13 +27,6 @@ #define STRONG_INLINE inline #endif -#if SDL_VERSION_ATLEAST(1,3,0) -#define SDL_GetKeyState SDL_GetKeyboardState -#endif - -//SDL2 support -#if (SDL_MAJOR_VERSION == 2) - extern SDL_Window * mainWindow; extern SDL_Renderer * mainRenderer; extern SDL_Texture * screenTexture; @@ -49,7 +42,6 @@ inline void SDL_WarpMouse(int x, int y) } void SDL_UpdateRect(SDL_Surface *surface, int x, int y, int w, int h); -#endif inline bool isCtrlKeyDown() {