diff --git a/android/.gitignore b/android/.gitignore
deleted file mode 100644
index 603b14077..000000000
--- a/android/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-*.iml
-.gradle
-/local.properties
-/.idea/caches
-/.idea/libraries
-/.idea/modules.xml
-/.idea/workspace.xml
-/.idea/navEditor.xml
-/.idea/assetWizardSettings.xml
-.DS_Store
-/build
-/captures
-.externalNativeBuild
-.cxx
diff --git a/android/.idea/.name b/android/.idea/.name
deleted file mode 100644
index eea1d2e85..000000000
--- a/android/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-DuckStation
\ No newline at end of file
diff --git a/android/.idea/codeStyles/Project.xml b/android/.idea/codeStyles/Project.xml
deleted file mode 100644
index 681f41ae2..000000000
--- a/android/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- xmlns:android
-
- ^$
-
-
-
-
-
-
-
-
- xmlns:.*
-
- ^$
-
-
- BY_NAME
-
-
-
-
-
-
- .*:id
-
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
-
-
- .*:name
-
- http://schemas.android.com/apk/res/android
-
-
-
-
-
-
-
-
- name
-
- ^$
-
-
-
-
-
-
-
-
- style
-
- ^$
-
-
-
-
-
-
-
-
- .*
-
- ^$
-
-
- BY_NAME
-
-
-
-
-
-
- .*
-
- http://schemas.android.com/apk/res/android
-
-
- ANDROID_ATTRIBUTE_ORDER
-
-
-
-
-
-
- .*
-
- .*
-
-
- BY_NAME
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/codeStyles/codeStyleConfig.xml b/android/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a179..000000000
--- a/android/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/compiler.xml b/android/.idea/compiler.xml
deleted file mode 100644
index fb7f4a8a4..000000000
--- a/android/.idea/compiler.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml
deleted file mode 100644
index 9bba60dad..000000000
--- a/android/.idea/gradle.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/jarRepositories.xml b/android/.idea/jarRepositories.xml
deleted file mode 100644
index e34606ccd..000000000
--- a/android/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml
deleted file mode 100644
index 860da66a5..000000000
--- a/android/.idea/misc.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/runConfigurations.xml b/android/.idea/runConfigurations.xml
deleted file mode 100644
index e497da999..000000000
--- a/android/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/vcs.xml b/android/.idea/vcs.xml
deleted file mode 100644
index 6c0b86358..000000000
--- a/android/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/.gitignore b/android/app/.gitignore
deleted file mode 100644
index 796b96d1c..000000000
--- a/android/app/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
diff --git a/android/app/build.gradle b/android/app/build.gradle
deleted file mode 100644
index 38ec9c8df..000000000
--- a/android/app/build.gradle
+++ /dev/null
@@ -1,90 +0,0 @@
-apply plugin: 'com.android.application'
-
-android {
- compileSdkVersion 29
- buildToolsVersion "30.0.2"
- defaultConfig {
- applicationId "com.github.stenzek.duckstation"
- minSdkVersion 23
- targetSdkVersion 29
- versionCode(getBuildVersionCode())
- versionName "${getVersion()}"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
-
- ndk {
- debugSymbolLevel "FULL"
- }
- }
- }
-
- externalNativeBuild {
- cmake {
- path "../../CMakeLists.txt"
- version "3.10.2"
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- defaultConfig {
- externalNativeBuild {
- cmake {
- arguments "-DCMAKE_BUILD_TYPE=Release"
- abiFilters "arm64-v8a", "armeabi-v7a", "x86_64"
- }
- }
- }
- sourceSets {
- main.assets.srcDirs += "../../data"
- }
-
- // Blocked on R21 until CMake is updated to 3.19 or later.
- ndkVersion '21.4.7075529'
-}
-
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.3.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'com.google.android.material:material:1.3.0'
- implementation 'androidx.preference:preference:1.1.1'
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation "androidx.viewpager2:viewpager2:1.0.0"
- testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.2'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
-}
-
-// Adapted from Dolphin.
-
-def getVersion() {
- def versionNumber = '0.0-unknown'
-
- try {
- versionNumber = 'git describe --tags --exclude latest --exclude preview'.execute([], project.rootDir).text
- .trim()
- .replaceAll(/(-0)?-[^-]+$/, "")
- } catch (Exception e) {
- logger.error('Cannot find git, defaulting to dummy version number')
- }
-
- return versionNumber
-}
-
-
-def getBuildVersionCode() {
- try {
- def versionNumber = 'git rev-list --first-parent --count HEAD'.execute([], project.rootDir).text
- .trim()
- return Integer.valueOf(versionNumber);
- } catch (Exception e) {
- logger.error('Cannot find git, defaulting to dummy version number')
- }
-
- return 1;
-}
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
deleted file mode 100644
index f1b424510..000000000
--- a/android/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/android/app/src/androidTest/java/com/github/stenzek/duckstation/ExampleInstrumentedTest.java b/android/app/src/androidTest/java/com/github/stenzek/duckstation/ExampleInstrumentedTest.java
deleted file mode 100644
index 71cc603ed..000000000
--- a/android/app/src/androidTest/java/com/github/stenzek/duckstation/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.github.stenzek.duckstation;
-
-import android.content.Context;
-
-import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
-
- assertEquals("com.github.stenzek.duckstation", appContext.getPackageName());
- }
-}
diff --git a/android/app/src/cpp/CMakeLists.txt b/android/app/src/cpp/CMakeLists.txt
deleted file mode 100644
index 2e3fb11ed..000000000
--- a/android/app/src/cpp/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-set(SRCS
- android_controller_interface.cpp
- android_controller_interface.h
- android_host_interface.cpp
- android_host_interface.h
- android_http_downloader.cpp
- android_http_downloader.h
- android_progress_callback.cpp
- android_progress_callback.h
- android_settings_interface.cpp
- android_settings_interface.h
-)
-
-add_library(duckstation-native SHARED ${SRCS})
-target_link_libraries(duckstation-native PRIVATE android frontend-common core common glad imgui)
-
-find_package(OpenSLES)
-if(OPENSLES_FOUND)
- message("Enabling OpenSL ES audio stream")
- target_sources(duckstation-native PRIVATE
- opensles_audio_stream.cpp
- opensles_audio_stream.h)
- target_link_libraries(duckstation-native PRIVATE OpenSLES::OpenSLES)
- target_compile_definitions(duckstation-native PRIVATE "-DUSE_OPENSLES=1")
-endif()
diff --git a/android/app/src/cpp/android_controller_interface.cpp b/android/app/src/cpp/android_controller_interface.cpp
deleted file mode 100644
index 7fea10ecd..000000000
--- a/android/app/src/cpp/android_controller_interface.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
-#include "android_controller_interface.h"
-#include "android_host_interface.h"
-#include "common/assert.h"
-#include "common/file_system.h"
-#include "common/log.h"
-#include "core/controller.h"
-#include "core/host_interface.h"
-#include "core/system.h"
-#include
-Log_SetChannel(AndroidControllerInterface);
-
-AndroidControllerInterface::AndroidControllerInterface() = default;
-
-AndroidControllerInterface::~AndroidControllerInterface() = default;
-
-ControllerInterface::Backend AndroidControllerInterface::GetBackend() const
-{
- return ControllerInterface::Backend::Android;
-}
-
-bool AndroidControllerInterface::Initialize(CommonHostInterface* host_interface)
-{
- if (!ControllerInterface::Initialize(host_interface))
- return false;
-
- return true;
-}
-
-void AndroidControllerInterface::Shutdown()
-{
- ControllerInterface::Shutdown();
-}
-
-void AndroidControllerInterface::PollEvents() {}
-
-void AndroidControllerInterface::ClearBindings()
-{
- std::unique_lock lock(m_controllers_mutex);
- for (ControllerData& cd : m_controllers)
- {
- cd.axis_mapping.clear();
- cd.button_mapping.clear();
- cd.axis_button_mapping.clear();
- cd.button_axis_mapping.clear();
- }
-}
-
-std::optional AndroidControllerInterface::GetControllerIndex(const std::string_view& device)
-{
- std::unique_lock lock(m_controllers_mutex);
- for (u32 i = 0; i < static_cast(m_device_names.size()); i++)
- {
- if (device == m_device_names[i])
- return static_cast(i);
- }
-
- return std::nullopt;
-}
-
-bool AndroidControllerInterface::BindControllerAxis(int controller_index, int axis_number, AxisSide axis_side,
- AxisCallback callback)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (static_cast(controller_index) >= m_controllers.size())
- return false;
-
- m_controllers[controller_index].axis_mapping[axis_number][axis_side] = std::move(callback);
- Log_DevPrintf("Bound controller %d axis %d side %u", controller_index, axis_number, static_cast(axis_side));
- return true;
-}
-
-bool AndroidControllerInterface::BindControllerButton(int controller_index, int button_number, ButtonCallback callback)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (static_cast(controller_index) >= m_controllers.size())
- return false;
-
- m_controllers[controller_index].button_mapping[button_number] = std::move(callback);
- Log_DevPrintf("Bound controller %d button %d", controller_index, button_number);
- return true;
-}
-
-bool AndroidControllerInterface::BindControllerAxisToButton(int controller_index, int axis_number, bool direction,
- ButtonCallback callback)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (static_cast(controller_index) >= m_controllers.size())
- return false;
-
- m_controllers[controller_index].axis_button_mapping[axis_number][BoolToUInt8(direction)] = std::move(callback);
- Log_DevPrintf("Bound controller %d axis %d to button", controller_index, axis_number);
- return true;
-}
-
-bool AndroidControllerInterface::BindControllerHatToButton(int controller_index, int hat_number,
- std::string_view hat_position, ButtonCallback callback)
-{
- return false;
-}
-
-bool AndroidControllerInterface::BindControllerButtonToAxis(int controller_index, int button_number,
- AxisCallback callback)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (static_cast(controller_index) >= m_controllers.size())
- return false;
-
- m_controllers[controller_index].button_axis_mapping[button_number] = std::move(callback);
- Log_DevPrintf("Bound controller %d button %d to axis", controller_index, button_number);
- return true;
-}
-
-void AndroidControllerInterface::SetDeviceNames(std::vector device_names)
-{
- std::unique_lock lock(m_controllers_mutex);
- m_device_names = std::move(device_names);
- m_controllers.resize(m_device_names.size());
-
- for (u32 i = 0; i < static_cast(m_device_names.size()); i++)
- Log_DevPrintf("Controller %u: %s", i, m_device_names[i].c_str());
-}
-
-void AndroidControllerInterface::SetDeviceRumble(u32 index, bool has_vibrator)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (index >= m_controllers.size())
- return;
-
- m_controllers[index].has_rumble = has_vibrator;
-}
-
-void AndroidControllerInterface::HandleAxisEvent(u32 index, u32 axis, float value)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (index >= m_controllers.size())
- return;
-
- Log_DevPrintf("controller %u axis %u %f", index, axis, value);
- if (DoEventHook(Hook::Type::Axis, index, axis, value))
- return;
-
- const ControllerData& cd = m_controllers[index];
- const auto am_iter = cd.axis_mapping.find(axis);
- if (am_iter != cd.axis_mapping.end())
- {
- const AxisCallback& cb = am_iter->second[AxisSide::Full];
- if (cb)
- {
- cb(value);
- return;
- }
- }
-
- // set the other direction to false so large movements don't leave the opposite on
- const bool outside_deadzone = (std::abs(value) >= cd.deadzone);
- const bool positive = (value >= 0.0f);
- const auto bm_iter = cd.axis_button_mapping.find(axis);
- if (bm_iter != cd.axis_button_mapping.end())
- {
- const ButtonCallback& other_button_cb = bm_iter->second[BoolToUInt8(!positive)];
- const ButtonCallback& button_cb = bm_iter->second[BoolToUInt8(positive)];
- if (button_cb)
- {
- button_cb(outside_deadzone);
- if (other_button_cb)
- other_button_cb(false);
- return;
- }
- else if (other_button_cb)
- {
- other_button_cb(false);
- return;
- }
- }
-}
-
-void AndroidControllerInterface::HandleButtonEvent(u32 index, u32 button, bool pressed)
-{
- Log_DevPrintf("controller %u button %u %s", index, button, pressed ? "pressed" : "released");
-
- std::unique_lock lock(m_controllers_mutex);
- if (index >= m_controllers.size())
- return;
-
- if (DoEventHook(Hook::Type::Button, index, button, pressed ? 1.0f : 0.0f))
- return;
-
- const ControllerData& cd = m_controllers[index];
- const auto button_iter = cd.button_mapping.find(button);
- if (button_iter != cd.button_mapping.end() && button_iter->second)
- {
- button_iter->second(pressed);
- return;
- }
-
- const auto axis_iter = cd.button_axis_mapping.find(button);
- if (axis_iter != cd.button_axis_mapping.end() && axis_iter->second)
- {
- axis_iter->second(pressed ? 1.0f : -1.0f);
- return;
- }
-
- Log_DevPrintf("controller %u button %u has no binding", index, button);
-}
-
-bool AndroidControllerInterface::HasButtonBinding(u32 index, u32 button)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (index >= m_controllers.size())
- return false;
-
- const ControllerData& cd = m_controllers[index];
- return (cd.button_mapping.find(button) != cd.button_mapping.end() ||
- cd.button_axis_mapping.find(button) != cd.button_axis_mapping.end());
-}
-
-u32 AndroidControllerInterface::GetControllerRumbleMotorCount(int controller_index)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (static_cast(controller_index) >= m_controllers.size())
- return false;
-
- return m_controllers[static_cast(controller_index)].has_rumble ? NUM_RUMBLE_MOTORS : 0;
-}
-
-void AndroidControllerInterface::SetControllerRumbleStrength(int controller_index, const float* strengths,
- u32 num_motors)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (static_cast(controller_index) >= m_controllers.size())
- return;
-
- const float small_motor = strengths[0];
- const float large_motor = strengths[1];
- static_cast(m_host_interface)
- ->SetControllerVibration(static_cast(controller_index), small_motor, large_motor);
-}
-
-bool AndroidControllerInterface::SetControllerDeadzone(int controller_index, float size /* = 0.25f */)
-{
- std::unique_lock lock(m_controllers_mutex);
- if (static_cast(controller_index) >= m_controllers.size())
- return false;
-
- m_controllers[static_cast(controller_index)].deadzone = std::clamp(std::abs(size), 0.01f, 0.99f);
- Log_InfoPrintf("Controller %d deadzone size set to %f", controller_index,
- m_controllers[static_cast(controller_index)].deadzone);
- return true;
-}
diff --git a/android/app/src/cpp/android_controller_interface.h b/android/app/src/cpp/android_controller_interface.h
deleted file mode 100644
index a22b81f50..000000000
--- a/android/app/src/cpp/android_controller_interface.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#pragma once
-#include "core/types.h"
-#include "frontend-common/controller_interface.h"
-#include
-#include
-#include