Skip to content

Commit

Permalink
Tidy up SDL includes
Browse files Browse the repository at this point in the history
Move some from header to cpp, and use sdl_wrappers.h where appropriate
rather than having more #ifdefs.
  • Loading branch information
jbytheway committed Jan 17, 2019
1 parent 4a514b3 commit 595a7e9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@
#include "path_info.h"
#include "rng.h"
#include "translations.h"

#ifdef TILES
# if defined(_MSC_VER) && defined(USE_VCPKG)
# include <SDL2/SDL_version.h>
# else
# include <SDL_version.h>
# endif
#include "sdl_wrappers.h"
#endif

#ifdef __ANDROID__
Expand Down
7 changes: 7 additions & 0 deletions src/sdlsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@
#include <unordered_map>
#include <vector>

#if defined(_MSC_VER) && defined(USE_VCPKG)
# include <SDL2/SDL_mixer.h>
#else
# include <SDL_mixer.h>
#endif

#include "debug.h"
#include "init.h"
#include "json.h"
#include "loading_ui.h"
#include "options.h"
#include "path_info.h"
#include "rng.h"
#include "sdl_wrappers.h"

#define dbg(x) DebugLog((DebugLevel)(x),D_SDL) << __FILE__ << ":" << __LINE__ << ": "

Expand Down
5 changes: 0 additions & 5 deletions src/sdlsound.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
#define SDL_SOUND_H

#ifdef SDL_SOUND
# if defined(_MSC_VER) && defined(USE_VCPKG)
# include <SDL2/SDL_mixer.h>
# else
# include <SDL_mixer.h>
# endif
# include "sounds.h"

/**
Expand Down

0 comments on commit 595a7e9

Please sign in to comment.