mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Merge branch 'android-2' into android-jit
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLambdasOnASingleLine: Inline
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: true
|
||||
AfterControlStatement: Always
|
||||
AfterEnum: true
|
||||
AfterExternBlock: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
BeforeElse: true
|
||||
BeforeWhile: true
|
||||
SplitEmptyFunction: false
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeTernaryOperators: true
|
||||
ColumnLimit: 0
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
IndentWidth: 4
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
Language: Cpp
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: All
|
||||
ObjCSpaceAfterProperty: false
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInConditionalStatement: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Latest
|
||||
TabWidth: 4
|
||||
UseTab: Always
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Bug Report / Feature Request
|
||||
about: Tech support does not belong here. You should only file an issue here if you think you have experienced an actual bug with Cemu or you are requesting a feature you believe would make Cemu better.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!---
|
||||
Please keep in mind Cemu is EXPERIMENTAL SOFTWARE.
|
||||
|
||||
Please read the FAQ:
|
||||
https://cemu.info/faq.html
|
||||
|
||||
THIS IS NOT A SUPPORT FORUM, FOR SUPPORT GO TO:
|
||||
https://discord.com/invite/5psYsup
|
||||
|
||||
If the FAQ does not answer your question, please go to:
|
||||
https://discord.com/invite/5psYsup
|
||||
|
||||
When submitting an issue, please check the following:
|
||||
|
||||
- You have read the above.
|
||||
- You have provided the version (commit hash) of Cemu you are using.
|
||||
- You have provided sufficient detail for the issue to be reproduced.
|
||||
- You have provided system specs (if relevant).
|
||||
- Please also provide:
|
||||
- For any issues, a log file
|
||||
- For crashes, a backtrace.
|
||||
- For graphical issues, comparison screenshots with real hardware.
|
||||
- For emulation inaccuracies, a test-case (if able).
|
||||
|
||||
-->
|
||||
@@ -2,4 +2,4 @@ blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Cemu Discord
|
||||
url: https://discord.com/invite/5psYsup
|
||||
about: If you are experiencing an issue with Cemu, and you need tech support, or if you have a general question, try asking in the official Cemu Discord linked here. Piracy is not allowed.
|
||||
about: If you need technical support with Cemu or have other questions the best place to ask is on the official Cemu Discord linked here
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# Docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||
name: Bug Report
|
||||
description: Report an issue with Cemu emulator
|
||||
title: "Enter a title for the bug report here"
|
||||
labels: bug
|
||||
body:
|
||||
- type: markdown
|
||||
id: md_readme
|
||||
attributes:
|
||||
value: |
|
||||
## Important: Read First
|
||||
|
||||
If you discovered a bug you can report it here. Please make sure of the following first:
|
||||
- That you are using the latest version of Cemu
|
||||
- Only report something if you are sure it's a bug and not any technical issue on your end. For troubleshooting help see the [links page](https://github.com/cemu-project/Cemu#links)
|
||||
- Problems specific to a single game should be reported on the [compatibility wiki](https://wiki.cemu.info/wiki/Main_Page) instead
|
||||
- Verify that your problem isn't already mentioned on the [issue tracker](https://github.com/cemu-project/Cemu/issues)
|
||||
|
||||
Additionally, be aware that graphic packs can also causes issues. There is a separate issue tracker for graphic pack bugs over at the [graphic pack repository](https://github.com/cemu-project/cemu_graphic_packs)
|
||||
- type: textarea
|
||||
id: current_behavior
|
||||
attributes:
|
||||
label: Current Behavior
|
||||
description: "What the bug is, in a brief description"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected_behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: "What did you expect to happen?"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps_to_reproduce
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
description: "How to reproduce the issue"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: sys_info
|
||||
attributes:
|
||||
label: System Info (Optional)
|
||||
description: "Your PC specifications. Usually only the operating system and graphics card is important. But feel free to add more info."
|
||||
placeholder: |
|
||||
Info
|
||||
OS: Windows 10
|
||||
GPU: NVIDIA GeForce RTX 4090
|
||||
value: |
|
||||
OS:
|
||||
GPU:
|
||||
- type: textarea
|
||||
id: emulation_settings
|
||||
attributes:
|
||||
label: Emulation Settings (Optional)
|
||||
description: |
|
||||
Any non-default settings. You can leave this empty if you didn't change anything other than input settings.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: logs_files
|
||||
attributes:
|
||||
label: "Logs (Optional)"
|
||||
description: |
|
||||
"Attach `log.txt` from your Cemu folder (*File > Open Cemu folder*)".
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,28 @@
|
||||
# Docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||
name: Feature suggestion
|
||||
description: Suggest a new feature
|
||||
title: "Enter a title for the suggestion here"
|
||||
labels: feature request
|
||||
body:
|
||||
- type: markdown
|
||||
id: md_readme
|
||||
attributes:
|
||||
value: |
|
||||
## Important: Read First
|
||||
|
||||
While we appreciate suggestions, it is important to note that we are a very small team and there are already many more ideas than we could ever implement in the near future. Therefore, please only suggest something if you believe it is a great addition and the idea is reasonably unique.
|
||||
|
||||
*Avoid* to create suggestions for:
|
||||
- Overly obvious features ("Game xyz does not work and should be fixed", "Wiimote support should be improved", "You should add an Android port", "Copy feature xyz from another emulator", "A button to pause/stop emulation")
|
||||
- Niche features which are only interesting to a tiny percentage of users
|
||||
- Large scale features ("Add a Metal backend for MacOS", "Add ARM support", "Add savestates")
|
||||
|
||||
Note that this doesn't mean we aren't interested in these ideas, but rather we likely have them planned anyway and it's mostly up to finding the time to implement them.
|
||||
If you believe your idea is worthwhile even if it doesn't meet all the criteria above, you can still try suggesting it but we might close it.
|
||||
- type: textarea
|
||||
id: idea_suggestion
|
||||
attributes:
|
||||
label: Your suggestion
|
||||
description: "Describe what your suggestion is in as much detail as possible"
|
||||
validations:
|
||||
required: true
|
||||
@@ -16,7 +16,7 @@ env:
|
||||
|
||||
jobs:
|
||||
build-ubuntu:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: "Checkout repo"
|
||||
uses: actions/checkout@v3
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
- name: "Install system dependencies"
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install -y clang-12 cmake freeglut3-dev libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev libudev-dev nasm ninja-build
|
||||
sudo apt install -y clang-15 cmake freeglut3-dev libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev libudev-dev nasm ninja-build
|
||||
|
||||
- name: "Bootstrap vcpkg"
|
||||
run: |
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
|
||||
- name: "cmake"
|
||||
run: |
|
||||
cmake -S . -B build ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DPORTABLE=OFF -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
|
||||
cmake -S . -B build ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DPORTABLE=OFF -DCMAKE_C_COMPILER=/usr/bin/clang-15 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-15 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
|
||||
|
||||
- name: "Build Cemu"
|
||||
run: |
|
||||
@@ -93,7 +93,7 @@ jobs:
|
||||
path: ./bin/Cemu
|
||||
|
||||
build-appimage:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build-ubuntu
|
||||
steps:
|
||||
- name: Checkout Upstream Repo
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
- name: "Install system dependencies"
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install -y clang-12 cmake freeglut3-dev libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build appstream
|
||||
sudo apt install -y clang-15 cmake freeglut3-dev libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build appstream
|
||||
|
||||
- name: "Build AppImage"
|
||||
run: |
|
||||
@@ -183,7 +183,7 @@ jobs:
|
||||
- name: "Build Cemu"
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config ${{ env.BUILD_MODE }} -j 2
|
||||
cmake --build . --config ${{ env.BUILD_MODE }}
|
||||
|
||||
- name: Prepare artifact
|
||||
if: ${{ inputs.deploymode == 'release' }}
|
||||
@@ -232,7 +232,7 @@ jobs:
|
||||
- name: "Install system dependencies"
|
||||
run: |
|
||||
brew update
|
||||
brew install llvm@15 ninja nasm molten-vk
|
||||
brew install llvm@15 ninja nasm molten-vk automake libtool
|
||||
|
||||
- name: "Bootstrap vcpkg"
|
||||
run: |
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
experimentalversion: ${{ github.run_number }}
|
||||
deploy:
|
||||
name: Deploy experimental release
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
needs: call-release-build
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
ls ./bin/
|
||||
cp -R ./bin ./${{ env.CEMU_FOLDER_NAME }}
|
||||
mv cemu-bin-linux-x64/Cemu ./${{ env.CEMU_FOLDER_NAME }}/Cemu
|
||||
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-ubuntu-20.04-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-ubuntu-22.04-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||
|
||||
- name: Create release from macos-bin
|
||||
|
||||
@@ -29,8 +29,8 @@ jobs:
|
||||
- name: "Generate POT file using xgettext"
|
||||
run: >
|
||||
find src -name *.cpp -o -name *.hpp -o -name *.h |
|
||||
xargs xgettext --from-code=utf-8
|
||||
-k_ -kwxTRANSLATE -w 100
|
||||
xargs xgettext --from-code=utf-8 -w 100
|
||||
--keyword="_" --keyword="wxTRANSLATE" --keyword="wxPLURAL:1,2"
|
||||
--check=space-ellipsis --omit-header
|
||||
-o cemu.pot
|
||||
|
||||
|
||||
+4
-1
@@ -17,7 +17,7 @@
|
||||
.idea/
|
||||
|
||||
build/
|
||||
cmake-build-*-*/
|
||||
cmake-build-*/
|
||||
out/
|
||||
.cache/
|
||||
bin/Cemu_*
|
||||
@@ -49,3 +49,6 @@ bin/controllerProfiles/*
|
||||
bin/gameProfiles/*
|
||||
|
||||
bin/graphicPacks/*
|
||||
|
||||
# Ignore Finder view option files created by OS X
|
||||
.DS_Store
|
||||
@@ -3,40 +3,39 @@
|
||||
## Windows
|
||||
|
||||
Prerequisites:
|
||||
- A recent version of Visual Studio 2022 (recommended but not required) with the following additional components:
|
||||
- C++ CMake tools for Windows
|
||||
- Windows 10/11 SDK
|
||||
- git
|
||||
- A recent version of Visual Studio 2022 with the following additional components:
|
||||
- C++ CMake tools for Windows
|
||||
- Windows 10/11 SDK
|
||||
|
||||
Instructions:
|
||||
Instructions for Visual Studio 2022:
|
||||
|
||||
1. Run `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||
2. Launch `Cemu/generate_vs_solution.bat`.
|
||||
- If you installed VS to a custom location or use VS 2019, you may need to manually change the path inside the .bat file.
|
||||
3. Wait until it's done, then open `Cemu/build/Cemu.sln` in Visual Studio.
|
||||
4. Then build the solution and once finished you can run and debug it, or build it and check the /bin folder for the final Cemu_release.exe.
|
||||
2. Open the newly created Cemu directory in Visual Studio using the "Open a local folder" option
|
||||
3. In the menu select Project -> Configure CMake. Wait until it is done, this may take a long time
|
||||
4. You can now build, run and debug Cemu
|
||||
|
||||
You can also skip steps 3-5 and open the root folder of the cloned repo directly in Visual Studio (as a folder) and use the built-in CMake support but be warned that cmake support in VS can be a bit finicky.
|
||||
Any other IDE should also work as long as it has CMake and MSVC support. CLion and Visual Studio Code have been confirmed to work.
|
||||
|
||||
## Linux
|
||||
|
||||
To compile Cemu, a recent enough compiler and STL with C++20 support is required! clang-12 or higher is what we recommend.
|
||||
To compile Cemu, a recent enough compiler and STL with C++20 support is required! clang-15 or higher is what we recommend.
|
||||
|
||||
### Installing dependencies
|
||||
|
||||
#### For Ubuntu and derivatives:
|
||||
`sudo apt install -y cmake curl freeglut3-dev git libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build`
|
||||
`sudo apt install -y cmake curl clang-15 freeglut3-dev git libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build`
|
||||
|
||||
*Additionally, for Ubuntu 22.04 only:*
|
||||
- `sudo apt install -y clang-12`
|
||||
- At step 3 while building, use
|
||||
`cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja`
|
||||
You may also need to install `libusb-1.0-0-dev` as a workaround for an issue with the vcpkg hidapi package.
|
||||
|
||||
At step 3 while building, use:
|
||||
`cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-15 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-15 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja`
|
||||
|
||||
#### For Arch and derivatives:
|
||||
`sudo pacman -S --needed base-devel clang cmake freeglut git glm gtk3 libgcrypt libpulse libsecret linux-headers llvm nasm ninja systemd unzip zip`
|
||||
|
||||
#### For Fedora and derivatives:
|
||||
`sudo dnf install clang cmake cubeb-devel freeglut-devel git glm-devel gtk3-devel kernel-headers libgcrypt-devel libsecret-devel nasm ninja-build perl-core systemd-devel zlib-devel`
|
||||
`sudo dnf install clang cmake cubeb-devel freeglut-devel git glm-devel gtk3-devel kernel-headers libgcrypt-devel libsecret-devel libtool libusb1-devel nasm ninja-build perl-core systemd-devel zlib-devel`
|
||||
|
||||
### Build Cemu using cmake and clang
|
||||
1. `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||
@@ -46,7 +45,8 @@ To compile Cemu, a recent enough compiler and STL with C++20 support is required
|
||||
5. You should now have a Cemu executable file in the /bin folder, which you can run using `./bin/Cemu_release`.
|
||||
|
||||
#### Using GCC
|
||||
While we use and test Cemu using clang, using GCC might work better with your distro (they should be fairly similar performance/issues wise and should only be considered if compilation is the issue).
|
||||
While we build and test Cemu using clang, using GCC might work better with your distro (they should be fairly similar performance/issues wise and should only be considered if compilation is the issue).
|
||||
|
||||
You can use GCC by doing the following:
|
||||
- make sure you have g++ installed in your system
|
||||
- installation for Ubuntu and derivatives: `sudo apt install g++`
|
||||
@@ -86,7 +86,7 @@ You can skip this section if you have an Intel Mac. Every time you compile, you
|
||||
|
||||
### Installing dependencies
|
||||
|
||||
`brew install boost git cmake llvm ninja nasm molten-vk`
|
||||
`brew install boost git cmake llvm ninja nasm molten-vk automake libtool`
|
||||
|
||||
### Build Cemu using cmake and clang
|
||||
1. `git clone --recursive https://github.com/cemu-project/Cemu`
|
||||
|
||||
+28
-1
@@ -20,6 +20,8 @@ if (ENABLE_VCPKG)
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT VCPKG_TARGET_ANDROID)
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux")
|
||||
elseif(APPLE)
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_mac")
|
||||
else()
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||
endif()
|
||||
@@ -99,6 +101,8 @@ if (WIN32)
|
||||
option(ENABLE_DIRECTINPUT "Enables the usage of DirectInput" ON)
|
||||
add_compile_definitions(HAS_DIRECTINPUT)
|
||||
endif()
|
||||
|
||||
option(ENABLE_HIDAPI "Build with HIDAPI" ON)
|
||||
option(ENABLE_SDL "Enables the SDLController backend" ON)
|
||||
|
||||
# audio backends
|
||||
@@ -108,6 +112,23 @@ if (WIN32)
|
||||
endif()
|
||||
option(ENABLE_CUBEB "Enabled cubeb backend" ON)
|
||||
|
||||
# usb hid backends
|
||||
if (WIN32)
|
||||
option(ENABLE_NSYSHID_WINDOWS_HID "Enables the native Windows HID backend for nsyshid" ON)
|
||||
endif ()
|
||||
# libusb and windows hid backends shouldn't be active at the same time; otherwise we'd see all devices twice!
|
||||
if (NOT ENABLE_NSYSHID_WINDOWS_HID)
|
||||
option(ENABLE_NSYSHID_LIBUSB "Enables the libusb backend for nsyshid" ON)
|
||||
else ()
|
||||
set(ENABLE_NSYSHID_LIBUSB OFF CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
if (ENABLE_NSYSHID_WINDOWS_HID)
|
||||
add_compile_definitions(NSYSHID_ENABLE_BACKEND_WINDOWS_HID)
|
||||
endif ()
|
||||
if (ENABLE_NSYSHID_LIBUSB)
|
||||
add_compile_definitions(NSYSHID_ENABLE_BACKEND_LIBUSB)
|
||||
endif ()
|
||||
|
||||
option(ENABLE_WXWIDGETS "Build with wxWidgets UI (Currently required)" ON)
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG true)
|
||||
@@ -129,7 +150,7 @@ find_package(ZLIB REQUIRED)
|
||||
find_package(zstd MODULE REQUIRED) # MODULE so that zstd::zstd is available
|
||||
find_package(OpenSSL COMPONENTS Crypto SSL REQUIRED)
|
||||
find_package(glm REQUIRED)
|
||||
find_package(fmt 9.1.0...<10 REQUIRED)
|
||||
find_package(fmt 9 REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
|
||||
# glslang versions older than 11.11.0 define targets without a namespace
|
||||
@@ -170,6 +191,12 @@ if (ENABLE_DISCORD_RPC)
|
||||
target_include_directories(discord-rpc INTERFACE ./dependencies/discord-rpc/include)
|
||||
endif()
|
||||
|
||||
if (ENABLE_HIDAPI)
|
||||
find_package(hidapi REQUIRED)
|
||||
set(ENABLE_WIIMOTE ON)
|
||||
add_compile_definitions(HAS_HIDAPI)
|
||||
endif ()
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
if(ENABLE_FERAL_GAMEMODE)
|
||||
add_compile_definitions(ENABLE_FERAL_GAMEMODE)
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
"generator": "Ninja",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}"
|
||||
},
|
||||
{
|
||||
"name": "Debug",
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
# Coding style guidelines for Cemu
|
||||
|
||||
This document describes the latest version of our coding-style guidelines. Since we did not use this style from the beginning, older code may not adhere to these guidelines. Nevertheless, use these rules even if the surrounding code does not match.
|
||||
|
||||
Cemu comes with a `.clang-format` file which is supported by most IDEs for formatting. Avoid auto-reformatting whole files, PRs with a lot of formatting changes are difficult to review.
|
||||
|
||||
## Names for variables, functions and classes
|
||||
|
||||
- Always prefix class member variables with `m_`
|
||||
- Always prefix static class variables with `s_`
|
||||
- For variable names: Camel case, starting with a lower case letter after the prefix. Examples: `m_option`, `s_audioVolume`
|
||||
- For functions/class names: Use camel case starting with a capital letter. Examples: `MyClass`, `SetActive`
|
||||
- Avoid underscores in variable names after the prefix. Use `m_myVariable` instead of `m_my_variable`
|
||||
|
||||
## About types
|
||||
|
||||
Cemu provides its own set of basic fixed-width types. They are:
|
||||
`uint8`, `sint8`, `uint16`, `sint16`, `uint32`, `sint32`, `uint64`, `sint64`. Always use these types over something like `uint32_t`. Using `size_t` is also acceptable where suitable. Avoid C types like `int` or `long`. The only exception is when interacting with external libraries which expect these types as parameters.
|
||||
|
||||
## When and where to put brackets
|
||||
|
||||
Always put curly-brackets (`{ }`) on their own line. Example:
|
||||
|
||||
```
|
||||
void FooBar()
|
||||
{
|
||||
if (m_hasFoo)
|
||||
{
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
As an exception, you can put short lambdas onto the same line:
|
||||
```
|
||||
SomeFunc([]() { .... });
|
||||
```
|
||||
You can skip brackets for single-statement `if`. Example:
|
||||
```
|
||||
if (cond)
|
||||
action();
|
||||
```
|
||||
|
||||
## Printing
|
||||
|
||||
Avoid sprintf and similar C-style formatting API. Use `fmt::format()`.
|
||||
In UI related code you can use `formatWxString`, but be aware that number formatting with this function will be locale dependent!
|
||||
|
||||
## Strings and encoding
|
||||
|
||||
We use UTF-8 encoded `std::string` where possible. Some conversions need special handling and we have helper functions for those:
|
||||
```cpp
|
||||
// std::filesystem::path <-> std::string (in precompiled.h)
|
||||
std::string _pathToUtf8(const fs::path& path);
|
||||
fs::path _utf8ToPath(std::string_view input);
|
||||
|
||||
// wxString <-> std::string
|
||||
wxString wxString::FromUTF8(const std::string& s)
|
||||
wxString to_wxString(std::string_view str); // in gui/helpers.h
|
||||
std::string wxString::utf8_string();
|
||||
|
||||
```
|
||||
|
||||
## Logging
|
||||
|
||||
If you want to write to log.txt use `cemuLog_log()`. The log type parameter should be mostly self-explanatory. Use `LogType::Force` if you always want to log something. For example:
|
||||
`cemuLog_log(LogType::Force, "The value is {}", 123);`
|
||||
|
||||
## HLE and endianness
|
||||
|
||||
A pretty large part of Cemu's code base are re-implementations of various Cafe OS modules (e.g. `coreinit.rpl`, `gx2.rpl`...). These generally run in the context of the emulated process, thus special care has to be taken to use types with the correct size and endianness when interacting with memory.
|
||||
|
||||
Keep in mind that the emulated Espresso CPU is 32bit big-endian, while the host architectures targeted by Cemu are 64bit little-endian!
|
||||
|
||||
To keep code simple and remove the need for manual endian-swapping, Cemu has templates and aliases of the basic types with explicit endian-ness.
|
||||
For big-endian types add the suffix `be`. Example: `uint32be`
|
||||
|
||||
When you need to store a pointer in the guest's memory. Use `MEMPTR<T>`. It will automatically store any pointer as 32bit big-endian. The pointer you store must point to memory that is within the guest address space.
|
||||
|
||||
## HLE interfaces
|
||||
|
||||
The implementation for each HLE module is inside a namespace with a matching name. E.g. `coreinit.rpl` functions go into `coreinit` namespace.
|
||||
|
||||
To expose a new function as callable from within the emulated machine, use `cafeExportRegister` or `cafeExportRegisterFunc`. Here is a short example:
|
||||
```cpp
|
||||
namespace coreinit
|
||||
{
|
||||
uint32 OSGetCoreCount()
|
||||
{
|
||||
return Espresso::CORE_COUNT;
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
cafeExportRegister("coreinit", OSGetCoreCount, LogType::CoreinitThread);
|
||||
}
|
||||
}
|
||||
```
|
||||
You may also see some code which uses `osLib_addFunction` directly. This is a deprecated way of registering functions.
|
||||
@@ -5,7 +5,7 @@
|
||||
[](https://matrix.to/#/#cemu:cemu.info)
|
||||
|
||||
This is the code repository of Cemu, a Wii U emulator that is able to run most Wii U games and homebrew in a playable state.
|
||||
It's written in C/C++ and is being actively developed with new features and fixes to increase compatibility, convenience and usability.
|
||||
It's written in C/C++ and is being actively developed with new features and fixes.
|
||||
|
||||
Cemu is currently only available for 64-bit Windows, Linux & macOS devices.
|
||||
|
||||
@@ -24,11 +24,9 @@ Cemu is currently only available for 64-bit Windows, Linux & macOS devices.
|
||||
|
||||
## Download
|
||||
|
||||
You can download the latest Cemu releases from the [GitHub Releases](https://github.com/cemu-project/Cemu/releases/) or from [Cemu's website](https://cemu.info).
|
||||
You can download the latest Cemu releases for Windows, Linux and Mac from the [GitHub Releases](https://github.com/cemu-project/Cemu/releases/). For Linux you can also find Cemu on [flathub](https://flathub.org/apps/info.cemu.Cemu).
|
||||
|
||||
Cemu is currently only available in a portable format so no installation is required besides extracting it in a safe place.
|
||||
|
||||
The native Linux build is currently a work-in-progress. See [Current State Of Linux builds](https://github.com/cemu-project/Cemu/issues/107) for more information about the things to be aware of.
|
||||
On Windows Cemu is currently only available in a portable format so no installation is required besides extracting it in a safe place.
|
||||
|
||||
The native macOS build is currently purely experimental and should not be considered stable or ready for issue-free gameplay. There are also known issues with degraded performance due to the use of MoltenVK and Rosetta for ARM Macs. We appreciate your patience while we improve Cemu for macOS.
|
||||
|
||||
@@ -36,7 +34,7 @@ Pre-2.0 releases can be found on Cemu's [changelog page](https://cemu.info/chang
|
||||
|
||||
## Build Instructions
|
||||
|
||||
To compile Cemu yourself on Windows, Linux or macOS, view the [BUILD.md file](/BUILD.md).
|
||||
To compile Cemu yourself on Windows, Linux or macOS, view [BUILD.md](/BUILD.md).
|
||||
|
||||
## Issues
|
||||
|
||||
@@ -46,6 +44,7 @@ The old bug tracker can be found at [bugs.cemu.info](https://bugs.cemu.info) and
|
||||
## Contributing
|
||||
|
||||
Pull requests are very welcome. For easier coordination you can visit the developer discussion channel on [Discord](https://discord.gg/5psYsup) or alternatively the [Matrix Server](https://matrix.to/#/#cemu:cemu.info).
|
||||
Before submitting a pull request, please read and follow our code style guidelines listed in [CODING_STYLE.md](/CODING_STYLE.md).
|
||||
|
||||
If coding isn't your thing, testing games and making detailed bug reports or updating the (usually outdated) compatibility wiki is also appreciated!
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <andrea@pappacoda.it>
|
||||
# SPDX-License-Identifier: ISC
|
||||
|
||||
find_package(libusb CONFIG)
|
||||
if (NOT libusb_FOUND)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_search_module(libusb IMPORTED_TARGET GLOBAL libusb-1.0 libusb)
|
||||
if (libusb_FOUND)
|
||||
add_library(libusb::libusb ALIAS PkgConfig::libusb)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
find_package_handle_standard_args(libusb
|
||||
REQUIRED_VARS
|
||||
libusb_LINK_LIBRARIES
|
||||
libusb_FOUND
|
||||
VERSION_VAR libusb_VERSION
|
||||
)
|
||||
Vendored
+6
@@ -183,4 +183,10 @@ endif()
|
||||
|
||||
if(MSVC)
|
||||
set_property(TARGET ih264d PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
# tune settings for slightly better performance
|
||||
target_compile_options(ih264d PRIVATE $<$<CONFIG:Release,RelWithDebInfo>:/Oi>) # enable intrinsic functions
|
||||
target_compile_options(ih264d PRIVATE $<$<CONFIG:Release,RelWithDebInfo>:/Ot>) # favor speed
|
||||
target_compile_options(ih264d PRIVATE "/GS-") # disable runtime checks
|
||||
|
||||
endif()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user