Skip to content

Commit 7abc946

Browse files
committed
Upstream 2512 merge
1 parent d25cebb commit 7abc946

File tree

1,173 files changed

+194098
-297375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,173 files changed

+194098
-297375
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ insert_final_newline = false
2525
indent_size = 4
2626
indent_style = space
2727
insert_final_newline = true
28+
29+
[*.{kt,kts}]
30+
indent_style = space
31+
indent_size = 4
32+
insert_final_newline = true
33+
max_line_length = 100

.gitmodules

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,28 @@
104104
[submodule "Externals/miniupnpc/miniupnp"]
105105
path = Externals/miniupnpc/miniupnp
106106
url = https://github.com/miniupnp/miniupnp.git
107+
shallow = true
108+
[submodule "Externals/glslang/glslang"]
109+
path = Externals/glslang/glslang
110+
url = https://github.com/KhronosGroup/glslang.git
111+
shallow = true
112+
[submodule "Externals/pugixml/pugixml"]
113+
path = Externals/pugixml/pugixml
114+
url = https://github.com/zeux/pugixml.git
115+
shallow = true
116+
[submodule "Externals/cpp-ipc/cpp-ipc"]
117+
path = Externals/cpp-ipc/cpp-ipc
118+
url = https://github.com/mutouyun/cpp-ipc.git
119+
shallow = true
120+
[submodule "Externals/cpp-optparse/cpp-optparse"]
121+
path = Externals/cpp-optparse/cpp-optparse
122+
url = https://github.com/weisslj/cpp-optparse.git
123+
shallow = true
124+
[submodule "Externals/bzip2/bzip2"]
125+
path = Externals/bzip2/bzip2
126+
url = https://gitlab.com/bzip2/bzip2.git
127+
shallow = true
128+
[submodule "Externals/imgui/imgui"]
129+
path = Externals/imgui/imgui
130+
url = https://github.com/ocornut/imgui.git
131+
shallow = true

AndroidSetup.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,29 @@ If you'd like to contribute to the Android project, but do not currently have a
66

77
* [Android Studio](https://developer.android.com/studio/)
88

9-
If you downloaded Android Studio, install it with the default options and open the project located in `dolphin/Source/Android`
9+
Install Android Studio with the default options if you do not already have it.
1010

1111
## Setting Up Android Studio
1212

13-
1. Wait for background tasks to complete on the bottom of the window.
14-
2. Launch the Android SDK Manager by clicking on its icon in Android Studio's main toolbar:
15-
![Android Studio Package Icon][package-icon]
16-
3. Install or update the SDK Platform. Choose the API level as defined in the app module's [build.gradle](Source/Android/app/build.gradle#L7) file.
17-
4. Install a CMake version as defined in the app module's [build.gradle](Source/Android/app/build.gradle#L99) file. The option won't appear until you select `Show Package Details`.
18-
5. Select `Build Variants` on the left side of the window to choose the build variant and ABI you would like to compile for the `:app` module.
19-
6. Select the green hammer icon in the main toolbar to build and create the apk in `Source/Android/app/build/outputs/apk`
13+
1. Open the `Source/Android` project in Android Studio, let any background tasks finish, and Android Studio will automatically download the required SDK components and tooling.
14+
2. Use the hammer icon or **Build > Assemble 'app' Run Configuration** to compile the `:app` module, then choose **Build > Generate App Bundles or APKs > Generate APKs** to produce the APK in `Source/Android/app/build/outputs/apk`.
15+
16+
## Import the Dolphin code style
17+
18+
The project maintains a custom IntelliJ/Android Studio style file to keep Java and Kotlin formatting consistent.
19+
20+
* Go to **File > Settings > Editor > Code Style** (or **Android Studio > Settings > Editor > Code Style** on macOS).
21+
* Click the gear icon and choose **Import Scheme**.
22+
* Select `Source/Android/code-style-java.xml` from the repository.
23+
* Ensure that Dolphin-Java is selected.
24+
25+
## Format code before opening a pull request
26+
27+
Before committing or submitting a pull request, reformat any Java or Kotlin files you modified:
28+
29+
* Use **Code > Reformat Code** (or press `Ctrl+Alt+L`/`⌥⌘L` on macOS) with the Dolphin code style selected.
30+
* Re-run formatting after edits to keep spacing, imports, and wrapping consistent with the rest of the project.
2031

2132
## Compiling from the Command-Line
2233

2334
For command-line users, any task may be executed with `cd Source/Android` followed by `gradlew <task-name>`. In particular, `gradlew assemble` builds debug and release versions of the application (which are placed in `Source/Android/app/build/outputs/apk`).
24-
25-
[package-icon]: https://i.imgur.com/hgmMlsM.png
26-
[code-style]: https://i.imgur.com/3b3UBhb.png

CMake/DolphinLibraryTools.cmake

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,42 @@ function(dolphin_find_optional_system_library library bundled_path)
5454
dolphin_optional_system_library(use_system ${library})
5555
string(TOUPPER ${library} upperlib)
5656
if(use_system)
57-
find_package(${library} ${ARGN})
57+
# Try a list of versions
58+
# Will be obsoleted if cmake ever fixes https://gitlab.kitware.com/cmake/cmake/-/issues/26477
59+
if("DOLPHIN_TRY_VERSIONS" IN_LIST ARGN)
60+
list(FIND ARGN DOLPHIN_TRY_VERSIONS versions_idx)
61+
list(REMOVE_AT ARGN ${versions_idx})
62+
# Extract list of version-like elements from ARGN into version_list
63+
set(version_list)
64+
while(TRUE)
65+
list(LENGTH ARGN len)
66+
if(len EQUAL versions_idx)
67+
break()
68+
endif()
69+
LIST(GET ARGN ${versions_idx} ver)
70+
if(ver MATCHES "^[0-9]+(\\.[0-9]+)*$")
71+
list(APPEND version_list "${ver}")
72+
list(REMOVE_AT ARGN ${versions_idx})
73+
else()
74+
break()
75+
endif()
76+
endwhile()
77+
# Quietly check all the listed versions
78+
foreach(version IN LISTS version_list)
79+
find_package(${library} ${version} ${ARGN} QUIET)
80+
if(${library}_FOUND)
81+
break()
82+
endif()
83+
endforeach()
84+
# If none were found, find_package one version loudly so the user sees
85+
if(NOT ${library}_FOUND)
86+
list(GET version_list 0 first_version)
87+
find_package(${library} ${first_version} ${ARGN})
88+
endif()
89+
else()
90+
find_package(${library} ${ARGN})
91+
endif()
92+
5893
# Yay for cmake packages being inconsistent
5994
if(DEFINED ${library}_FOUND)
6095
set(prefix ${library})

CMake/FindOProfile.cmake

Lines changed: 0 additions & 31 deletions
This file was deleted.

CMake/ScmRevGen.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ endif()
3333
string(TIMESTAMP DOLPHIN_WC_BUILD_DATE "%Y-%m-%d" UTC)
3434

3535
# version number
36-
set(DOLPHIN_VERSION_MAJOR "v3.1.2")
36+
set(DOLPHIN_VERSION_MAJOR "v3.1.5")
3737
set(DOLPHIN_VERSION_MINOR "0")
3838
set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION})
3939

CMakeLists.txt

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR}/CMake/FlagsOverr
3030

3131
project(project-plus-dolphin)
3232

33+
if (CMAKE_VERSION VERSION_LESS "3.25" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
34+
set(LINUX TRUE)
35+
endif()
36+
3337
if (MSVC)
3438
if (POLICY CMP0117)
3539
# cmake is a weird language. You can't do if(not POLICY)
@@ -119,7 +123,6 @@ option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON)
119123

120124
option(ENABLE_GPROF "Enable gprof profiling (must be using Debug build)" OFF)
121125
option(FASTLOG "Enable all logs" OFF)
122-
option(OPROFILING "Enable profiling" OFF)
123126

124127
# TODO: Add DSPSpy
125128
option(DSPTOOL "Build dsptool" OFF)
@@ -169,6 +172,7 @@ list(APPEND CMAKE_MODULE_PATH
169172
# Support functions
170173
include(CheckAndAddFlag)
171174
include(CheckCCompilerFlag)
175+
include(CheckSymbolExists)
172176
include(DolphinCompileDefinitions)
173177
include(DolphinDisableWarningsMSVC)
174178
include(DolphinLibraryTools)
@@ -564,16 +568,6 @@ if(ENCODE_FRAMEDUMPS)
564568
endif()
565569
endif()
566570

567-
if(OPROFILING)
568-
find_package(OProfile)
569-
if(OPROFILE_FOUND)
570-
message(STATUS "OProfile found, enabling profiling support")
571-
add_definitions(-DUSE_OPROFILE=1)
572-
else()
573-
message(FATAL_ERROR "OProfile not found. Can't build profiling support.")
574-
endif()
575-
endif()
576-
577571
if(ENABLE_HWDB)
578572
find_package(LIBUDEV REQUIRED)
579573
if(LIBUDEV_FOUND)
@@ -651,7 +645,9 @@ dolphin_find_optional_system_library_pkgconfig(FMT
651645

652646
add_subdirectory(Externals/imgui)
653647
add_subdirectory(Externals/implot)
654-
add_subdirectory(Externals/glslang)
648+
649+
dolphin_find_optional_system_library(glslang Externals/glslang DOLPHIN_TRY_VERSIONS 15 16)
650+
655651
# SPIRV-Cross is used on Windows for GLSL to HLSL conversion for the Direct3D 11 and Direct3D 12
656652
# video backends, and on Apple devices for the Metal video backend.
657653
if(WIN32 OR APPLE)
@@ -737,11 +733,13 @@ dolphin_find_optional_system_library(MBEDTLS Externals/mbedtls 2.28)
737733

738734
dolphin_find_optional_system_library(CURL Externals/curl)
739735

740-
if(NOT ANDROID)
741-
dolphin_find_optional_system_library(Iconv Externals/libiconv-1.14)
742-
else()
743-
message(STATUS "Using static iconv from Externals")
744-
add_subdirectory(Externals/libiconv-1.14 EXCLUDE_FROM_ALL)
736+
if(NOT WIN32)
737+
if(NOT ANDROID)
738+
dolphin_find_optional_system_library(Iconv Externals/libiconv 1.14)
739+
else()
740+
message(STATUS "Using static iconv from Externals")
741+
add_subdirectory(Externals/libiconv EXCLUDE_FROM_ALL)
742+
endif()
745743
endif()
746744

747745
if(NOT ANDROID)
@@ -758,7 +756,7 @@ if(NOT ENABLE_QT)
758756
set(USE_MGBA 0)
759757
endif()
760758
if(USE_MGBA)
761-
dolphin_find_optional_system_library(LIBMGBA Externals/mGBA)
759+
dolphin_find_optional_system_library(LIBMGBA Externals/mGBA 0.11)
762760
endif()
763761

764762
find_package(SYSTEMD)
@@ -788,6 +786,10 @@ endif()
788786

789787
add_subdirectory(Externals/watcher)
790788

789+
if(WIN32 OR LINUX)
790+
add_subdirectory(Externals/cpp-ipc)
791+
endif()
792+
791793
########################################
792794
# Pre-build events: Define configuration variables and write SCM info header
793795
#

Data/Sys/ApprovedInis.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

Data/Sys/Load/GraphicMods/The Legend of Zelda Twilight Princess GC/GZ2.txt

Whitespace-only changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"meta":
3+
{
4+
"title": "Bloom Texture Definitions",
5+
"author": "iwubcode"
6+
},
7+
"groups":
8+
[
9+
{
10+
"name": "Bloom",
11+
"targets": [
12+
{
13+
"type": "efb",
14+
"texture_filename": "efb1_n41_76x56_6"
15+
},
16+
{
17+
"type": "efb",
18+
"texture_filename": "efb1_n42_152x112_6"
19+
}
20+
]
21+
}
22+
]
23+
}

0 commit comments

Comments
 (0)