Add simple header to wrap SDL headers and ignore any compiler warnings
This commit is contained in:
parent
66688167df
commit
fa2c5f2088
7 changed files with 34 additions and 13 deletions
|
|
@ -168,6 +168,7 @@ set(SOURCES
|
||||||
|
|
||||||
anbox/platform/null/platform.cpp
|
anbox/platform/null/platform.cpp
|
||||||
|
|
||||||
|
anbox/platform/sdl/sdl_wrapper.h
|
||||||
anbox/platform/sdl/window.cpp
|
anbox/platform/sdl/window.cpp
|
||||||
anbox/platform/sdl/keycode_converter.cpp
|
anbox/platform/sdl/keycode_converter.cpp
|
||||||
anbox/platform/sdl/platform.cpp
|
anbox/platform/sdl/platform.cpp
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,7 @@
|
||||||
|
|
||||||
#include "anbox/audio/sink.h"
|
#include "anbox/audio/sink.h"
|
||||||
#include "anbox/graphics/buffer_queue.h"
|
#include "anbox/graphics/buffer_queue.h"
|
||||||
|
#include "anbox/platform/sdl/sdl_wrapper.h"
|
||||||
#include <SDL2/SDL_audio.h>
|
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef ANBOX_PLATFORM_SDL_KEYCODE_CONVERTER_H_
|
#ifndef ANBOX_PLATFORM_SDL_KEYCODE_CONVERTER_H_
|
||||||
#define 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>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,13 @@
|
||||||
#define ANBOX_PLATFORM_SDL_PLATFORM_H_
|
#define ANBOX_PLATFORM_SDL_PLATFORM_H_
|
||||||
|
|
||||||
#include "anbox/platform/sdl/window.h"
|
#include "anbox/platform/sdl/window.h"
|
||||||
|
#include "anbox/platform/sdl/sdl_wrapper.h"
|
||||||
#include "anbox/platform/base_platform.h"
|
#include "anbox/platform/base_platform.h"
|
||||||
|
|
||||||
#include "anbox/graphics/emugl/DisplayManager.h"
|
#include "anbox/graphics/emugl/DisplayManager.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
class Renderer;
|
class Renderer;
|
||||||
|
|
||||||
namespace anbox {
|
namespace anbox {
|
||||||
|
|
|
||||||
29
src/anbox/platform/sdl/sdl_wrapper.h
Normal file
29
src/anbox/platform/sdl/sdl_wrapper.h
Normal 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
|
||||||
|
|
@ -15,8 +15,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wswitch-default"
|
|
||||||
#include "anbox/platform/sdl/window.h"
|
#include "anbox/platform/sdl/window.h"
|
||||||
#include "anbox/logger.h"
|
#include "anbox/logger.h"
|
||||||
#include "anbox/wm/window_state.h"
|
#include "anbox/wm/window_state.h"
|
||||||
|
|
@ -27,9 +25,6 @@
|
||||||
#include <mir_toolkit/mir_client_library.h>
|
#include <mir_toolkit/mir_client_library.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <SDL_syswm.h>
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
|
|
||||||
namespace anbox {
|
namespace anbox {
|
||||||
namespace platform {
|
namespace platform {
|
||||||
namespace sdl {
|
namespace sdl {
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,13 @@
|
||||||
#define ANBOX_PLATFORM_SDL_WINDOW_H_
|
#define ANBOX_PLATFORM_SDL_WINDOW_H_
|
||||||
|
|
||||||
#include "anbox/wm/window.h"
|
#include "anbox/wm/window.h"
|
||||||
|
#include "anbox/platform/sdl/sdl_wrapper.h"
|
||||||
|
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
class Renderer;
|
class Renderer;
|
||||||
|
|
||||||
namespace anbox {
|
namespace anbox {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue