mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Merge pull request #3595 from Sonicadvance1/Android_headless
[Android] Headless support
This commit is contained in:
@ -6,10 +6,10 @@ set(SRCS AudioCommon.cpp
|
||||
|
||||
set(LIBS "")
|
||||
|
||||
if(ANDROID)
|
||||
if(OPENSLES_FOUND)
|
||||
set(SRCS ${SRCS} OpenSLESStream.cpp)
|
||||
set(LIBS ${LIBS} OpenSLES)
|
||||
endif(ANDROID)
|
||||
set(LIBS ${LIBS} ${OPENSLES_LIBRARIES})
|
||||
endif(OPENSLES_FOUND)
|
||||
|
||||
if(ALSA_FOUND)
|
||||
set(SRCS ${SRCS} AlsaSoundStream.cpp)
|
||||
|
@ -42,7 +42,7 @@ else()
|
||||
Logging/ConsoleListenerNix.cpp)
|
||||
endif()
|
||||
|
||||
set(LIBS enet)
|
||||
list(APPEND LIBS enet)
|
||||
if(_M_ARM_64)
|
||||
set(SRCS ${SRCS}
|
||||
Arm64Emitter.cpp
|
||||
@ -60,13 +60,10 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(LIBS "${CMAKE_THREAD_LIBS_INIT}" ${VTUNE_LIBRARIES})
|
||||
if(NOT APPLE AND NOT ANDROID)
|
||||
set(LIBS ${LIBS} rt)
|
||||
endif()
|
||||
list(APPEND LIBS "${CMAKE_THREAD_LIBS_INIT}" ${VTUNE_LIBRARIES})
|
||||
|
||||
# OpenGL Interface
|
||||
set(SRCS ${SRCS}
|
||||
set(SRCS ${SRCS}
|
||||
GL/GLUtil.cpp
|
||||
GL/GLExtensions/GLExtensions.cpp
|
||||
GL/GLInterface/GLInterface.cpp)
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include <array>
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/GL/GLInterface/EGL.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
@ -6,9 +6,7 @@
|
||||
|
||||
#include "Common/GL/GLInterfaceBase.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#include "Common/GL/GLInterface/EGLAndroid.h"
|
||||
#elif defined(__APPLE__)
|
||||
#if defined(__APPLE__)
|
||||
#include "Common/GL/GLInterface/AGL.h"
|
||||
#elif defined(_WIN32)
|
||||
#include "Common/GL/GLInterface/WGL.h"
|
||||
@ -20,15 +18,15 @@
|
||||
#endif
|
||||
#elif defined(USE_EGL) && USE_EGL && defined(USE_HEADLESS)
|
||||
#include "Common/GL/GLInterface/EGL.h"
|
||||
#elif ANDROID
|
||||
#include "Common/GL/GLInterface/EGLAndroid.h"
|
||||
#else
|
||||
#error Platform doesnt have a GLInterface
|
||||
#endif
|
||||
|
||||
std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()
|
||||
{
|
||||
#ifdef ANDROID
|
||||
return std::make_unique<cInterfaceEGLAndroid>();
|
||||
#elif defined(__APPLE__)
|
||||
#if defined(__APPLE__)
|
||||
return std::make_unique<cInterfaceAGL>();
|
||||
#elif defined(_WIN32)
|
||||
return std::make_unique<cInterfaceWGL>();
|
||||
@ -40,6 +38,8 @@ std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()
|
||||
#else
|
||||
return std::make_unique<cInterfaceGLX>();
|
||||
#endif
|
||||
#elif ANDROID
|
||||
return std::make_unique<cInterfaceEGLAndroid>();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Arm64Emitter.h"
|
||||
|
@ -31,6 +31,7 @@ elseif(X11_FOUND)
|
||||
endif()
|
||||
set(LIBS ${LIBS} ${X11_LIBRARIES} ${XINPUT2_LIBRARIES})
|
||||
elseif(ANDROID)
|
||||
add_definitions(-DCIFACE_USE_ANDROID)
|
||||
set(SRCS ${SRCS}
|
||||
ControllerInterface/Android/Android.cpp)
|
||||
endif()
|
||||
|
@ -29,9 +29,6 @@
|
||||
#if defined(__APPLE__)
|
||||
#define CIFACE_USE_OSX
|
||||
#endif
|
||||
#ifdef ANDROID
|
||||
#define CIFACE_USE_ANDROID
|
||||
#endif
|
||||
#if defined(HAVE_SDL) && HAVE_SDL
|
||||
#define CIFACE_USE_SDL
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user