Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dolphin-emu/dolphin into …
Browse files Browse the repository at this point in the history
…VR-Hydra

Untested. Some features may be broken.

# Conflicts:
#	Data/Sys/GameSettings/G3B.ini
#	Data/Sys/GameSettings/G9S.ini
#	Data/Sys/GameSettings/GBS.ini
#	Data/Sys/GameSettings/GST.ini
#	Data/Sys/GameSettings/GZL.ini
#	Data/Sys/GameSettings/SOU.ini
#	Readme.md
#	Source/Core/Common/x64Emitter.h
#	Source/Core/Core/Boot/Boot.cpp
#	Source/Core/Core/BootManager.cpp
#	Source/Core/Core/ConfigManager.cpp
#	Source/Core/Core/ConfigManager.h
#	Source/Core/Core/Core.cpp
#	Source/Core/Core/Core.vcxproj
#	Source/Core/Core/Core.vcxproj.filters
#	Source/Core/Core/HW/EXI_DeviceIPL.cpp
#	Source/Core/Core/HW/SystemTimers.cpp
#	Source/Core/Core/HW/VideoInterface.cpp
#	Source/Core/Core/HotkeyManager.cpp
#	Source/Core/Core/NetPlayClient.cpp
#	Source/Core/Core/PowerPC/MMU.cpp
#	Source/Core/Core/PowerPC/PPCSymbolDB.cpp
#	Source/Core/DolphinQt2/DolphinQt2.vcxproj
#	Source/Core/DolphinWX/ARCodeAddEdit.cpp
#	Source/Core/DolphinWX/ARCodeAddEdit.h
#	Source/Core/DolphinWX/Config/GeneralConfigPane.cpp
#	Source/Core/DolphinWX/Config/GeneralConfigPane.h
#	Source/Core/DolphinWX/DolphinWX.vcxproj
#	Source/Core/DolphinWX/DolphinWX.vcxproj.filters
#	Source/Core/DolphinWX/FifoPlayerDlg.cpp
#	Source/Core/DolphinWX/Frame.cpp
#	Source/Core/DolphinWX/Frame.h
#	Source/Core/DolphinWX/FrameTools.cpp
#	Source/Core/DolphinWX/GameListCtrl.cpp
#	Source/Core/DolphinWX/ISOFile.cpp
#	Source/Core/DolphinWX/ISOProperties.cpp
#	Source/Core/DolphinWX/ISOProperties.h
#	Source/Core/DolphinWX/InputConfigDiag.cpp
#	Source/Core/DolphinWX/Main.cpp
#	Source/Core/DolphinWX/VideoConfigDiag.cpp
#	Source/Core/DolphinWX/VideoConfigDiag.h
#	Source/Core/InputCommon/InputCommon.vcxproj
#	Source/Core/VideoBackends/D3D/D3DBase.cpp
#	Source/Core/VideoBackends/D3D/D3DState.cpp
#	Source/Core/VideoBackends/D3D/Render.cpp
#	Source/Core/VideoBackends/D3D/VertexManager.cpp
#	Source/Core/VideoBackends/D3D12/Render.cpp
#	Source/Core/VideoBackends/D3D12/Render.h
#	Source/Core/VideoBackends/OGL/Render.cpp
#	Source/Core/VideoCommon/Fifo.cpp
#	Source/Core/VideoCommon/OpcodeDecoding.cpp
#	Source/Core/VideoCommon/RenderBase.cpp
#	Source/Core/VideoCommon/RenderBase.h
#	Source/Core/VideoCommon/VertexLoaderManager.cpp
#	Source/Core/VideoCommon/VertexManagerBase.cpp
#	Source/Core/VideoCommon/VertexManagerBase.h
#	Source/Core/VideoCommon/VertexShaderManager.cpp
#	Source/Core/VideoCommon/VideoBackendBase.cpp
#	Source/Core/VideoCommon/VideoConfig.cpp
#	Source/Core/VideoCommon/XFStructs.cpp
#	Source/UnitTests/UnitTests.vcxproj
#	Source/dolphin-emu.sln
  • Loading branch information
CarlKenner committed Nov 19, 2016
2 parents e9cc9d4 + 6c16f1b commit bbb4708
Show file tree
Hide file tree
Showing 1,210 changed files with 261,066 additions and 66,979 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -30,8 +30,6 @@ CMakeLists.txt.user
# Ignore emacs temp files
\#*\#
.\#*
# Ignore transifex configuration directory
.tx
# Ignore kdevelop files/dirs
*.kdev4
# Ignore IDEA/Clion files/dirs
Expand Down
8 changes: 8 additions & 0 deletions .tx/config
@@ -0,0 +1,8 @@
[main]
host = https://www.transifex.com

[dolphin-emu.emulator]
file_filter = Languages/po/<lang>.po
source_file = Languages/po/dolphin-emu.pot
source_lang = en-US
type = PO
28 changes: 5 additions & 23 deletions AndroidSetup.md
Expand Up @@ -4,17 +4,10 @@ If you'd like to contribute to the Android project, but do not currently have a

## Prerequisites

* A Linux VM or host, or a Mac.
* JDK 7 for your platform.
* CMake
* [Android NDK](https://developer.android.com/tools/sdk/ndk/index.html)
* [Android Studio](http://developer.android.com/tools/studio/index.html) **OR**
* [Android SDK Tools](http://developer.android.com/sdk/index.html#Other) (for command-line usage)
* [Android Studio](http://developer.android.com/tools/studio/index.html)

If you downloaded Android Studio, extract it and then see [Setting up Android Studio](#setting-up-android-studio).

If you instead chose to download the commoand-line SDK tools, see [Setting up the SDK Tools](#setting-up-the-sdk-tools).

## Setting up Android Studio

1. Launch Android Studio, which will start a first-launch wizard.
Expand All @@ -26,12 +19,6 @@ If you instead chose to download the commoand-line SDK tools, see [Setting up th
7. Use the SDK Manager to get necessary dependencies, as described in [Getting Dependencies](#getting-dependencies).
8. When done, follow the steps in [Readme.md](Readme.md#installation-on-android) to compile and deploy the application.

## Setting up the SDK Tools

1. In `Source/Android`, create a file called `local.properties`.
2. Add a single line: `sdk.dir=<sdk-path>`, where `<sdk-path>` is the path where you extracted the SDK Tools package.
3. Follow the steps in [Readme.md](Readme.md#installation-on-android) to compile and deploy the application.

## Executing Gradle Tasks

In Android Studio, you can find a list of possible Gradle tasks in a tray at the top right of the screen:
Expand All @@ -50,19 +37,14 @@ For command-line users, any task may be executed with `Source/Android/gradlew <t

Most dependencies for the Android project are supplied by Gradle automatically. However, Android platform libraries (and a few Google-supplied supplementary libraries) must be downloaded through the Android package manager.

1. Launch the Android SDK Manager from the commandline by executing `<sdk-path>/tools/android`, or by clicking on its icon in Android Studio's main toolbar:
1. Launch the Android SDK Manager by clicking on its icon in Android Studio's main toolbar:
![Android Studio Package Icon][package-icon]
2. At the bottom of the window, click "Deselect All", and then "Updates".
3. Install or update the following packages:

* SDK Platform, under "Android 5.0.1 (API 21)". This will allow compiling apps that target Lollipop.
* Android Support Repository
* Android Support Library
* Google Repository
2. Install or update the SDK Platform. Choose the API level selected as [compileSdkVersion](Source/Android/app/build.gradle#L5).
3. Install or update the SDK Tools. CMake, LLDB and NDK. If you don't use android-studio, please check out https://github.com/Commit451/android-cmake-installer.

In the future, if the project targets a newer version of Android, or use newer versions of the tools/build-tools packages, it will be necessary to use this tool to download updates.

[components]: http://i.imgur.com/Oo1Fs93.png
[package-icon]: http://i.imgur.com/NUpkAH8.png
[gradle]: http://i.imgur.com/dXIH6o3.png
[shortcut]: http://i.imgur.com/eCWP4Yy.png
[shortcut]: http://i.imgur.com/eCWP4Yy.png
171 changes: 104 additions & 67 deletions CMakeLists.txt
Expand Up @@ -188,36 +188,38 @@ else()
add_definitions(-D_ARCH_32=1)
endif()

if(NOT ENABLE_GENERIC)
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR
${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86" OR
${CMAKE_SYSTEM_PROCESSOR} MATCHES "amd64" OR
APPLE)
if(_ARCH_64)
set(_M_X86 1)
set(_M_X86_64 1)
add_definitions(-D_M_X86=1 -D_M_X86_64=1 -msse2)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-pie")
else()
message(FATAL_ERROR "x86_32 is an unsupported platform. Enable generic build if you really want a JIT-less binary.")
endif()
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
message(FATAL_ERROR "ARMv7 is an unsupported platform. Enable generic build if you really want a JIT-less binary.")
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
# This option only applies to 64bit ARM
set(_M_ARM 1)
set(_M_ARM_64 1)
add_definitions(-D_M_ARM=1 -D_M_ARM_64=1)
add_definitions(-march=armv8-a+crc)
else()
set(ENABLE_GENERIC 1)
endif()
endif()

include(CheckCCompilerFlag)
if(ENABLE_GENERIC)
message("Warning! Building generic build!")
set(_M_GENERIC 1)
add_definitions(-D_M_GENERIC=1)
elseif(_ARCH_64 AND (
${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR
${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86" OR
${CMAKE_SYSTEM_PROCESSOR} MATCHES "amd64" OR
APPLE
))
set(_M_X86 1)
set(_M_X86_64 1)
add_definitions(-D_M_X86=1 -D_M_X86_64=1 -msse2)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fno-pie")
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
CHECK_C_COMPILER_FLAG("-no-pie" NO_PIE_UPSTREAM)
if(NO_PIE_UPSTREAM)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
endif()
CHECK_C_COMPILER_FLAG("-nopie" NO_PIE_PATCHED)
if(NO_PIE_PATCHED)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nopie")
endif()
endif()
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
set(_M_ARM 1)
set(_M_ARM_64 1)
add_definitions(-D_M_ARM=1 -D_M_ARM_64=1)
add_definitions(-march=armv8-a+crc)
else()
message(FATAL_ERROR "You're building on an unsupported platform. Enable generic build if you really want a JIT-less binary.")
endif()

include(CheckCXXCompilerFlag)
Expand Down Expand Up @@ -273,10 +275,9 @@ if(APPLE)
# increase the chance of not depending on a bunch of copies of them
# installed by MacPorts, Fink, Homebrew, etc, and ending up copying
# them into the bundle. Since we optionally depend on libraries which
# are not part of OS X (ffmpeg, libusb, etc.), however, don't remove
# the default path entirely as was done in a previous version of this
# file. This is still kinda evil, since it defeats the user's path
# settings...
# are not part of OS X (ffmpeg, etc.), however, don't remove the default
# path entirely as was done in a previous version of this file. This is
# still kinda evil, since it defeats the user's path settings...
# See http://www.cmake.org/cmake/help/v3.0/command/find_program.html
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/usr")
endif()
Expand Down Expand Up @@ -424,6 +425,8 @@ if(ANDROID)
# We are cross compiling, search only the toolchain for libraries and includes
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
elseif(NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES OpenBSD)
list(APPEND LIBS rt)
endif()
Expand Down Expand Up @@ -541,12 +544,7 @@ if(USE_X11)
add_definitions(-DHAVE_XRANDR=0)
endif(XRANDR_FOUND)

pkg_check_modules(XINPUT2 xi>=1.5.0)
if(XINPUT2_FOUND)
add_definitions(-DHAVE_X11_XINPUT2=1)
else()
add_definitions(-DHAVE_X11_XINPUT2=0)
endif(XINPUT2_FOUND)
pkg_check_modules(XINPUT2 REQUIRED xi>=1.5.0)
endif()
if(ENCODE_FRAMEDUMPS)
check_libav()
Expand All @@ -556,22 +554,28 @@ if(ENCODE_FRAMEDUMPS)

endif()

set(CMAKE_REQUIRED_LIBRARIES portaudio)
CHECK_CXX_SOURCE_RUNS(
"#include <portaudio.h>
int main(int argc, char **argv)
{ if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
PORTAUDIO)
unset(CMAKE_REQUIRED_LIBRARIES)
if(PORTAUDIO)
message("PortAudio found, enabling mic support")
add_definitions(-DHAVE_PORTAUDIO=1)
if(NOT ANDROID)
set(PORTAUDIO_FOUND TRUE)
else()
message("PortAudio not found, disabling mic support")
add_definitions(-DHAVE_PORTAUDIO=0)
set(PORTAUDIO_FOUND FALSE)
endif(PORTAUDIO)
add_definitions(-DHAVE_PORTAUDIO=1)

if(NOT APPLE)
set(CMAKE_REQUIRED_LIBRARIES portaudio)
CHECK_CXX_SOURCE_RUNS(
"#include <portaudio.h>
int main(int argc, char **argv)
{ if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
SYSTEM_PORTAUDIO)
unset(CMAKE_REQUIRED_LIBRARIES)
endif()
if(SYSTEM_PORTAUDIO AND NOT APPLE)
message("Using shared PortAudio for mic support")
set(PORTAUDIO_LIBRARIES portaudio)
else()
message("Using static PortAudio from Externals for mic support")
add_subdirectory(Externals/portaudio)
set(PORTAUDIO_LIBRARIES portaudio_static)
endif()
endif()

if(OPROFILING)
include(FindOProfile)
Expand Down Expand Up @@ -635,6 +639,8 @@ endif()
add_subdirectory(Externals/Bochs_disasm)
include_directories(Externals/Bochs_disasm)

add_subdirectory(Externals/glslang)

if(USE_SHARED_ENET)
check_lib(ENET libenet enet enet/enet.h QUIET)
include(CheckSymbolExists)
Expand Down Expand Up @@ -750,12 +756,21 @@ if(ENABLE_SDL)
endif(SDL2_FOUND)
endif()

include(FindLibUSB OPTIONAL)
if(LIBUSB_FOUND)
message("Using shared LibUSB")
add_definitions(-D__LIBUSB__)
include_directories(${LIBUSB_INCLUDE_DIR})
endif(LIBUSB_FOUND)
if(NOT ANDROID)
add_definitions(-D__LIBUSB__)
if(NOT APPLE)
find_package(LibUSB)
endif()
if(LIBUSB_FOUND AND NOT APPLE)
message("Using shared LibUSB")
include_directories(${LIBUSB_INCLUDE_DIR})
else()
message("Using static LibUSB from Externals")
add_subdirectory(Externals/libusb)
set(LIBUSB_LIBRARIES usb)
endif()
set(LIBUSB_FOUND true)
endif()

set(SFML_REQD_VERSION 2.1)
if(NOT APPLE)
Expand Down Expand Up @@ -835,6 +850,33 @@ else()
endif()
list(APPEND LIBS ${ICONV_LIBRARIES})

if(NOT ANDROID)
include(FindHIDAPI OPTIONAL)
find_package(HIDAPI)
if(HIDAPI_FOUND)
message("Using shared ${HIDAPI_LIBRARIES} ${HIDAPI_VERSION}")
include_directories(${HIDAPI_INCLUDE_DIRS})
list(APPEND LIBS ${HIDAPI_LIBRARIES})
else()
include_directories(Externals/hidapi/hidapi)
if(APPLE)
message("Using static hidapi from Externals")
add_subdirectory(Externals/hidapi/mac)
list(APPEND LIBS hidapi)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
message("Using static hidapi-hidraw from Externals")
add_subdirectory(Externals/hidapi/linux)
list(APPEND LIBS hidapi-hidraw udev)
else()
message("Using static hidapi-libusb from Externals")
add_subdirectory(Externals/hidapi/libusb)
list(APPEND LIBS hidapi-libusb)
endif()
endif()
set(HIDAPI_FOUND 1)
add_definitions(-DHAVE_HIDAPI=1)
endif()

find_library(OPENSLES_LIBRARIES NAMES OpenSLES)
find_path(OPENSLES_INCLUDE_DIR NAMES SLES/OpenSLES.h)

Expand All @@ -854,6 +896,10 @@ if(NOT DISABLE_WX)
include(FindwxWidgets OPTIONAL)
FIND_PACKAGE(wxWidgets COMPONENTS core aui adv)

if(_ARCH_32)
add_definitions(-DwxSIZE_T_IS_UINT)
endif()

if(wxWidgets_FOUND)
EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
Expand Down Expand Up @@ -991,15 +1037,6 @@ add_definitions(-std=c++1y)
# but some dependencies require them (LLVM, libav).
add_definitions(-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS)

# Do this at the last minute because try_compile ignores linker flags. Yay...
if(APPLE)
# Some of our code contains Objective C constructs.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c -stdlib=libc++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++ -stdlib=libc++")
# Avoid mistaking an object file for a source file on the link command line.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none")
endif()

add_subdirectory(Source)


Expand Down Expand Up @@ -1034,7 +1071,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR ${DOLPHIN_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${DOLPHIN_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${DOLPHIN_VERSION_PATCH})
set(CPACK_PACKAGE_DESCRIPTION_FILE ${PROJECT_SOURCE_DIR}/Data/cpack_package_description.txt)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A GameCube, Wii and Triforce emulator")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A GameCube and Wii emulator")

set(CPACK_RPM_PACKAGE_GROUP System/Emulators/Other)
set(CPACK_RPM_PACKAGE_LICENSE GPL-2.0)
Expand Down
9 changes: 9 additions & 0 deletions CMakeTests/FindHIDAPI.cmake
@@ -0,0 +1,9 @@
find_path(HIDAPI_INCLUDE_DIR NAMES hidapi.h PATH_SUFFIXES hidapi)
find_library(HIDAPI_LIBRARY NAMES hidapi hidapi-hidraw hidapi-libusb)
set(HIDAPI_LIBRARIES ${HIDAPI_LIBRARY})
set(HIDAPI_INCLUDE_DIRS ${HIDAPI_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HIDAPI DEFAULT_MSG HIDAPI_LIBRARY HIDAPI_INCLUDE_DIR)

mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
5 changes: 3 additions & 2 deletions Data/51-usb-device.rules
@@ -1,5 +1,6 @@
#GameCube Controller Adapter
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", TAG+="uaccess"

#Mayflash DolphinBar
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", TAG+="uaccess"
#Wiimotes or DolphinBar
SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", TAG+="uaccess"
SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0330", TAG+="uaccess"
4 changes: 1 addition & 3 deletions Data/Sys/GameSettings/G3B.ini
Expand Up @@ -5,8 +5,7 @@

[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationStateId = 4
EmulationIssues = Needs EFB to Ram for transition scenes.
EmulationStateId = 5

[OnLoad]
# Add memory patches to be loaded once on boot here.
Expand All @@ -18,5 +17,4 @@ EmulationIssues = Needs EFB to Ram for transition scenes.
# Add action replay cheats here.

[Video_Hacks]
EFBToTextureEnable = False
EFBCopyEnable = True
2 changes: 2 additions & 0 deletions Data/Sys/GameSettings/G9S.ini
Expand Up @@ -20,6 +20,8 @@ EmulationIssues = Use directx11 backend with efb scale set at 1x to deal with bl
[Video_Settings]
SafeTextureCacheColorSamples = 0
EFBScale = 2
MSAA = 0
MaxAnisotropy = 0

[VR]
UnitsPerMetre = 6.727502
Expand Down
3 changes: 0 additions & 3 deletions Data/Sys/GameSettings/GBS.ini
Expand Up @@ -18,9 +18,6 @@ EmulationIssues =
[ActionReplay]
# Add action replay cheats here.

[Video_Settings]
FastDepthCalc = False

[Video_Settings_VR]
UseXFB = False
UseRealXFB = False
Expand Down
3 changes: 1 addition & 2 deletions Data/Sys/GameSettings/GM3.ini
Expand Up @@ -5,7 +5,7 @@

[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.
EmulationIssues = Needs real xfb for the videos to display. Shadow issues with fastdepth (D3D).
EmulationIssues = Needs real xfb for the videos to display.
EmulationStateId = 4

[OnLoad]
Expand All @@ -20,4 +20,3 @@ EmulationStateId = 4
[Video_Settings]
UseXFB = True
UseRealXFB = True
FastDepthCalc = False

0 comments on commit bbb4708

Please sign in to comment.