Add simple header to wrap SDL headers and ignore any compiler warnings

This commit is contained in:
Simon Fels 2017-06-20 07:26:58 +02:00
commit fa2c5f2088
7 changed files with 34 additions and 13 deletions

View file

@ -168,6 +168,7 @@ set(SOURCES
anbox/platform/null/platform.cpp
anbox/platform/sdl/sdl_wrapper.h
anbox/platform/sdl/window.cpp
anbox/platform/sdl/keycode_converter.cpp
anbox/platform/sdl/platform.cpp

View file

@ -20,8 +20,7 @@
#include "anbox/audio/sink.h"
#include "anbox/graphics/buffer_queue.h"
#include <SDL2/SDL_audio.h>
#include "anbox/platform/sdl/sdl_wrapper.h"
#include <thread>

View file

@ -18,7 +18,7 @@
#ifndef ANBOX_PLATFORM_SDL_KEYCODE_CONVERTER_H_
#define ANBOX_PLATFORM_SDL_KEYCODE_CONVERTER_H_
#include <SDL_scancode.h>
#include "anbox/platform/sdl/sdl_wrapper.h"
#include <cstdint>

View file

@ -19,15 +19,13 @@
#define ANBOX_PLATFORM_SDL_PLATFORM_H_
#include "anbox/platform/sdl/window.h"
#include "anbox/platform/sdl/sdl_wrapper.h"
#include "anbox/platform/base_platform.h"
#include "anbox/graphics/emugl/DisplayManager.h"
#include <map>
#include <thread>
#include <SDL.h>
class Renderer;
namespace anbox {

View file

@ -0,0 +1,29 @@
/*
* Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranties of
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ANBOX_PLATFORM_SDL_WRAPPER_H_
#define ANBOX_PLATFORM_SDL_WRAPPER_H_
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#include <SDL2/SDL.h>
#include <SDL2/SDL_audio.h>
#include <SDL2/SDL_syswm.h>
#include <SDL2/SDL_scancode.h>
#pragma GCC diagnostic pop
#endif

View file

@ -15,8 +15,6 @@
*
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#include "anbox/platform/sdl/window.h"
#include "anbox/logger.h"
#include "anbox/wm/window_state.h"
@ -27,9 +25,6 @@
#include <mir_toolkit/mir_client_library.h>
#endif
#include <SDL_syswm.h>
#pragma GCC diagnostic pop
namespace anbox {
namespace platform {
namespace sdl {

View file

@ -19,14 +19,13 @@
#define ANBOX_PLATFORM_SDL_WINDOW_H_
#include "anbox/wm/window.h"
#include "anbox/platform/sdl/sdl_wrapper.h"
#include <EGL/egl.h>
#include <memory>
#include <vector>
#include <SDL.h>
class Renderer;
namespace anbox {